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:

(1x2)u2xu+(+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!ddx(x21)\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(3x21)P3(x)=12(5x33x)P4(x)=18(35x430x2+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 PP_\ell can be computed quickly using Bonnet’s recursion formula:

(+1)P+1(x)=(2+1)xP(x)P1(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 PP_\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)==0aP(x)==0P|fP|PP(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 PP_\ell comes with a set of associated Legendre polynomials Pm(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:

(1x2)u2xu+((+1)m21x2)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 PmP_\ell^m is as follows for m0m \ge 0:

Pm(x)=(1)m(1x2)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:

Pm(x)=(1)m(m)!(+m)!Pm(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 PmP_\ell^m is actually not a polynomial. Moreover, not all PmP_\ell^m are mutually orthogonal (but some are).