Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE

Legendre polynomials

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:

P(x) = 1
P(x) = x
(n+1)Pn+1 (x) = (2n+1)x P(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 P(x) for any given x.

The LegendreSum subroutine calculates the sum of Legendre polynomials cP(x) + cP(x) + ... + cP(x) using Clenshaw's recurrence formula.

The LegendreCoefficients subroutine can represent P(x) as a sum of powers of x: c + cx + ... + cx n.

Report a bug

Source codes

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



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008