|

The Legendre polynomials, sometimes called Legendre functions of the first kind, are defined as solutions of Legendre's differential equation:

Solutions corresponding to the non-negative integer n can be expressed using Rodrigues' formula

or can be constructed using the three term recurrence relation:
P0 (x) = 1
P1 (x) = x
(n+1)Pn+1 (x) = (2n+1)x Pn (x)-nPn-1 (x)
Unit description
The recurrence relation given above is the most efficient way to calculate the Legendre polynomial. The LegendreCalculate subroutine uses this relation to calculate Pn (x) for any given x.
The LegendreSum subroutine calculates the sum of Legendre polynomials c0 P0 (x) + c1 P1 (x) + ... + cn Pn (x) using Clenshaw's recurrence formula.
The LegendreCoefficients subroutine can represent Pn (x) as a sum of powers of x: c0 + c1 x + ... + cn x n.
Report a bug
C#
C# 1.0 source.
legendre.csharp.zip - Legendre polynomials
C++
C++ source.
legendre.cpp.zip - Legendre polynomials
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)
Delphi
Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
legendre.delphi.zip - Legendre polynomials
Visual Basic 6
Visual Basic 6 source.
legendre.vb6.zip - Legendre polynomials
Zonnon beta
Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
legendre.zonnon.zip - Legendre polynomials
|