Categories: Mathematics.

Legendre polynomials

The Legendre polynomials are a set of functions that sometimes arise in physics. They are the eigenfunctions u(x)u(x) of Legendre’s differential equation, which is a (Sturm-Liouville) eigenvalue problem for ℓ(ℓ+1)\ell (\ell + 1), where ℓ\ell turns out to be a non-negative integer:

(1−x2)u′′−2xu′+ℓ(ℓ+1)u=0\begin{aligned} \boxed{ (1 - x^2) u'' - 2 x u' + \ell (\ell + 1) u = 0 } \end{aligned}

The ℓ\ellth-degree Legendre polynomial Pℓ(x)P_\ell(x) is given in the form of a Rodrigues’ formula by:

Pℓ(x)=12ℓℓ!dℓdxℓ(x2−1)ℓ\begin{aligned} P_\ell(x) &= \frac{1}{2^\ell \ell!} \dvn{\ell}{}{x}(x^2 - 1)^\ell \end{aligned}

The first handful of Legendre polynomials Pℓ(x)P_\ell(x) are therefore as follows:

P0(x)=1P1(x)=xP2(x)=12(3x2−1)P3(x)=12(5x3−3x)P4(x)=18(35x4−30x2+3)\begin{gathered} P_0(x) = 1 \qquad \quad P_1(x) = x \qquad \quad P_2(x) = \frac{1}{2} (3 x^2 - 1) \\ P_3(x) = \frac{1}{2} (5 x^3 - 3 x) \qquad \quad P_4(x) = \frac{1}{8} (35 x^4 - 30 x^2 + 3) \end{gathered}

And then more PℓP_\ell can be computed quickly using Bonnet’s recursion formula:

(ℓ+1)Pℓ+1(x)=(2ℓ+1)xPℓ(x)−ℓPℓ−1(x)\begin{aligned} \boxed{ (\ell + 1) P_{\ell + 1}(x) = (2 \ell + 1) x P_\ell(x) - \ell P_{\ell - 1}(x) } \end{aligned}

The derivative of a given PℓP_\ell can be calculated recursively using the following relation:

ddxPℓ+1=(ℓ+1)Pℓ(x)+xddxPℓ(x)\begin{aligned} \boxed{ \dv{}{x}P_{\ell + 1} = (\ell + 1) P_\ell(x) + x \dv{}{x}P_\ell(x) } \end{aligned}

Noteworthy is that the Legendre polynomials are mutually orthogonal for x∈[−1,1]x \in [-1, 1]:

⟨Pm | Pn⟩=∫−11Pm(x) Pn(x)dx=22n+1δnm\begin{aligned} \boxed{ \Inprod{P_m}{P_n} = \int_{-1}^{1} P_m(x) \: P_n(x) \dd{x} = \frac{2}{2 n + 1} \delta_{nm} } \end{aligned}

As was to be expected from Sturm-Liouville theory. Likewise, they form a complete basis in the Hilbert space of piecewise continuous functions f(x)f(x) on x∈[−1,1]x \in [-1, 1], meaning:

f(x)=∑ℓ=0∞aℓPℓ(x)=∑ℓ=0∞⟨Pℓ | f⟩⟨Pℓ | Pℓ⟩Pℓ(x)\begin{aligned} \boxed{ f(x) = \sum_{\ell = 0}^\infty a_\ell P_\ell(x) = \sum_{\ell = 0}^\infty \frac{\Inprod{P_\ell}{f}}{\Inprod{P_\ell}{P_\ell}} P_\ell(x) } \end{aligned}

Each Legendre polynomial PℓP_\ell comes with a set of associated Legendre polynomials Pℓm(x)P_\ell^m(x) of order mm and degree ℓ\ell. These are the non-singular solutions of the general Legendre equation, where mm and ℓ\ell are integers satisfying −ℓ≤m≤ℓ-\ell \le m \le \ell:

(1−x2)u′′−2xu′+(ℓ(ℓ+1)−m21−x2)u=0\begin{aligned} \boxed{ (1 - x^2) u'' - 2 x u' + \Big( \ell (\ell + 1) - \frac{m^2}{1 - x^2} \Big) u = 0 } \end{aligned}

The ℓ\ellth-degree mmth-order associated Legendre polynomial PℓmP_\ell^m is as follows for m≥0m \ge 0:

Pℓm(x)=(−1)m(1−x2)m/2dmdxmPℓ(x)\begin{aligned} P_\ell^m(x) = (-1)^m (1 - x^2)^{m/2} \dvn{m}{}{x}P_\ell(x) \end{aligned}

Here, the (−1)m(-1)^m in front is called the Condon-Shortley phase, and is omitted by some authors. For negative orders mm, an additional constant factor is necessary:

Pℓ−m(x)=(−1)m(ℓ−m)!(ℓ+m)!Pℓm(x)\begin{aligned} P_\ell^{-m}(x) = (-1)^m \frac{(\ell - m)!}{(\ell + m)!} P_\ell^m(x) \end{aligned}

Beware, the name is misleading: if mm is odd, then PℓmP_\ell^m is actually not a polynomial. Moreover, not all PℓmP_\ell^m are mutually orthogonal (but some are).