# Legendre polynomials

(Redirected from Legendre polynomial)
For Legendre's Diophantine equation, see Legendre's equation.
Associated Legendre polynomials are the most general solution to Legendre's Equation and Legendre polynomials are solutions that are azimuthally symmetric.

In mathematics, Legendre functions are solutions to Legendre's differential equation:

${\displaystyle {d \over dx}\left[(1-x^{2}){d \over dx}P_{n}(x)\right]+n(n+1)P_{n}(x)=0.}$

(1)

They are named after Adrien-Marie Legendre. This ordinary differential equation is frequently encountered in physics and other technical fields. In particular, it occurs when solving Laplace's equation (and related partial differential equations) in spherical coordinates.

The Legendre differential equation may be solved using the standard power series method. The equation has regular singular points at x = ±1 so, in general, a series solution about the origin will only converge for |x| < 1. When n is an integer, the solution Pn(x) that is regular at x = 1 is also regular at x = −1, and the series for this solution terminates (i.e. it is a polynomial).

These solutions for n = 0, 1, 2, ... (with the normalization Pn(1) = 1) form a polynomial sequence of orthogonal polynomials called the Legendre polynomials. Each Legendre polynomial Pn(x) is an nth-degree polynomial. It may be expressed using Rodrigues' formula:

${\displaystyle P_{n}(x)={1 \over 2^{n}n!}{d^{n} \over dx^{n}}\left[(x^{2}-1)^{n}\right].}$

That these polynomials satisfy the Legendre differential equation (1) follows by differentiating n + 1 times both sides of the identity

${\displaystyle (x^{2}-1){\frac {d}{dx}}(x^{2}-1)^{n}=2nx(x^{2}-1)^{n}}$

and employing the general Leibniz rule for repeated differentiation.[1] The Pn can also be defined as the coefficients in a Taylor series expansion:[2]

${\displaystyle {\frac {1}{\sqrt {1-2xt+t^{2}}}}=\sum _{n=0}^{\infty }P_{n}(x)t^{n}.}$

(2)

In physics, this ordinary generating function is the basis for multipole expansions.

## Recursive definition

Expanding the Taylor series in Equation (2) for the first two terms gives

${\displaystyle P_{0}(x)=1,\quad P_{1}(x)=x}$

for the first two Legendre Polynomials. To obtain further terms without resorting to direct expansion of the Taylor series, equation (2) is differentiated with respect to t on both sides and rearranged to obtain

${\displaystyle {\frac {x-t}{\sqrt {1-2xt+t^{2}}}}=(1-2xt+t^{2})\sum _{n=1}^{\infty }nP_{n}(x)t^{n-1}.}$

Replacing the quotient of the square root with its definition in (2), and equating the coefficients of powers of t in the resulting expansion gives Bonnet’s recursion formula

${\displaystyle (n+1)P_{n+1}(x)=(2n+1)xP_{n}(x)-nP_{n-1}(x).\,}$

This relation, along with the first two polynomials P0 and P1, allows the Legendre Polynomials to be generated recursively.

Explicit representations include

{\displaystyle {\begin{aligned}P_{n}(x)&={\frac {1}{2^{n}}}\sum _{k=0}^{n}{n \choose k}^{2}(x-1)^{n-k}(x+1)^{k}\\&=\sum _{k=0}^{n}{n \choose k}{-n-1 \choose k}\left({\frac {1-x}{2}}\right)^{k}\\&=2^{n}\cdot \sum _{k=0}^{n}(-1)^{k}x^{k}{n \choose k}{{\frac {n+k-1}{2}} \choose n},\end{aligned}}}

where the latter, which is immediate from the recursion formula, expresses the Legendre polynomials by simple monomials and involves the multiplicative formula of the binomial coefficient.

The first few Legendre polynomials are:

${\displaystyle {\begin{array}{r|r}n&P_{n}(x)\\\hline 0&1\\1&x\\2&{\frac {1}{2}}(3x^{2}-1)\\3&{\frac {1}{2}}(5x^{3}-3x)\\4&{\frac {1}{8}}(35x^{4}-30x^{2}+3)\\5&{\frac {1}{8}}(63x^{5}-70x^{3}+15x)\\6&{\frac {1}{16}}(231x^{6}-315x^{4}+105x^{2}-5)\\7&{\frac {1}{16}}(429x^{7}-693x^{5}+315x^{3}-35x)\\8&{\frac {1}{128}}(6435x^{8}-12012x^{6}+6930x^{4}-1260x^{2}+35)\\9&{\frac {1}{128}}(12155x^{9}-25740x^{7}+18018x^{5}-4620x^{3}+315x)\\10&{\frac {1}{256}}(46189x^{10}-109395x^{8}+90090x^{6}-30030x^{4}+3465x^{2}-63)\\\hline \end{array}}}$

The graphs of these polynomials (up to n = 5) are shown below:

## Orthogonality

An important property of the Legendre polynomials is that they are orthogonal with respect to the L2-norm on the interval −1 ≤ x ≤ 1:

${\displaystyle \int _{-1}^{1}P_{m}(x)P_{n}(x)\,dx={2 \over {2n+1}}\delta _{mn}}$

(where δmn denotes the Kronecker delta, equal to 1 if m = n and to 0 otherwise). In fact, an alternative derivation of the Legendre polynomials is by carrying out the Gram–Schmidt process on the polynomials {1, xx2, ...} with respect to this inner product. The reason for this orthogonality property is that the Legendre differential equation can be viewed as a Sturm–Liouville problem, where the Legendre polynomials are eigenfunctions of a Hermitian differential operator:

${\displaystyle {d \over dx}\left[(1-x^{2}){d \over dx}P(x)\right]=-\lambda P(x),}$

where the eigenvalue λ corresponds to n(n + 1).

## Applications of Legendre polynomials in physics

The Legendre polynomials were first introduced in 1782 by Adrien-Marie Legendre[3] as the coefficients in the expansion of the Newtonian potential

${\displaystyle {\frac {1}{\left|\mathbf {x} -\mathbf {x} ^{\prime }\right|}}={\frac {1}{\sqrt {r^{2}+r^{\prime 2}-2rr'\cos \gamma }}}=\sum _{\ell =0}^{\infty }{\frac {r^{\prime \ell }}{r^{\ell +1}}}P_{\ell }(\cos \gamma )}$

where ${\displaystyle r}$ and ${\displaystyle r'}$ are the lengths of the vectors ${\displaystyle \mathbf {x} }$ and ${\displaystyle \mathbf {x} ^{\prime }}$ respectively and ${\displaystyle \gamma }$ is the angle between those two vectors. The series converges when ${\displaystyle r>r'}$. The expression gives the gravitational potential associated to a point mass or the Coulomb potential associated to a point charge. The expansion using Legendre polynomials might be useful, for instance, when integrating this expression over a continuous mass or charge distribution.

Legendre polynomials occur in the solution of Laplace's equation of the static potential, ${\displaystyle \nabla ^{2}\Phi (\mathbf {x} )=0}$, in a charge-free region of space, using the method of separation of variables, where the boundary conditions have axial symmetry (no dependence on an azimuthal angle). Where ${\displaystyle {\widehat {\mathbf {z} }}}$ is the axis of symmetry and ${\displaystyle \theta }$ is the angle between the position of the observer and the ${\displaystyle {\widehat {\mathbf {z} }}}$ axis (the zenith angle), the solution for the potential will be

${\displaystyle \Phi (r,\theta )=\sum _{\ell =0}^{\infty }\left[A_{\ell }r^{\ell }+B_{\ell }r^{-(\ell +1)}\right]P_{\ell }(\cos \theta ).}$

${\displaystyle A_{\ell }}$ and ${\displaystyle B_{\ell }}$ are to be determined according to the boundary condition of each problem.[4]

They also appear when solving Schrödinger equation in three dimensions for a central force.

### Legendre polynomials in multipole expansions

Figure 2

Legendre polynomials are also useful in expanding functions of the form (this is the same as before, written a little differently):

${\displaystyle {\frac {1}{\sqrt {1+\eta ^{2}-2\eta x}}}=\sum _{k=0}^{\infty }\eta ^{k}P_{k}(x)}$

which arise naturally in multipole expansions. The left-hand side of the equation is the generating function for the Legendre polynomials.

As an example, the electric potential ${\displaystyle \Phi (r,\theta )}$ (in spherical coordinates) due to a point charge located on the z-axis at ${\displaystyle z=a}$ (Figure 2) varies like

${\displaystyle \Phi (r,\theta )\propto {\frac {1}{R}}={\frac {1}{\sqrt {r^{2}+a^{2}-2ar\cos \theta }}}.}$

If the radius r of the observation point P is greater than a, the potential may be expanded in the Legendre polynomials

${\displaystyle \Phi (r,\theta )\propto {\frac {1}{r}}\sum _{k=0}^{\infty }\left({\frac {a}{r}}\right)^{k}P_{k}(\cos \theta )}$

where we have defined η = a/r < 1 and x = cos θ. This expansion is used to develop the normal multipole expansion.

Conversely, if the radius r of the observation point P is smaller than a, the potential may still be expanded in the Legendre polynomials as above, but with a and r exchanged. This expansion is the basis of interior multipole expansion.

### Legendre polynomials in trigonometry

The trigonometric functions ${\displaystyle \cos n\theta }$, also denoted as the Chebyshev polynomials ${\displaystyle T_{n}(\cos \theta )\equiv \cos n\theta }$, can also be multipole expanded by the Legendre polynomials ${\displaystyle P_{n}(\cos \theta )}$. The first several orders are as follows:

{\displaystyle {\begin{aligned}T_{0}(\cos \theta )&=&1&=&P_{0}(\cos \theta )\\T_{1}(\cos \theta )&=&\cos \theta &=&P_{1}(\cos \theta )\\T_{2}(\cos \theta )&=&\cos 2\theta &=&{\frac {1}{3}}(4P_{2}(\cos \theta )-P_{0}(\cos \theta ))\\T_{3}(\cos \theta )&=&\cos 3\theta &=&{\frac {1}{5}}(8P_{3}(\cos \theta )-3P_{1}(\cos \theta ))\\T_{4}(\cos \theta )&=&\cos 4\theta &=&{\frac {1}{105}}(192P_{4}(\cos \theta )-80P_{2}(\cos \theta )-7P_{0}(\cos \theta ))\\T_{5}(\cos \theta )&=&\cos 5\theta &=&{\frac {1}{63}}(128P_{5}(\cos \theta )-56P_{3}(\cos \theta )-9P_{1}(\cos \theta ))\\T_{6}(\cos \theta )&=&\cos 6\theta &=&{\frac {1}{1155}}(2560P_{6}(\cos \theta )-1152P_{4}(\cos \theta )-220P_{2}(\cos \theta )-33P_{0}(\cos \theta ))\end{aligned}}}

Another property is the expression for ${\displaystyle \sin(n+1)\theta }$, which is

${\displaystyle {\frac {\sin(n+1)\theta }{\sin \theta }}=\sum _{\ell =0}^{n}P_{\ell }(\cos \theta )P_{n-\ell }(\cos \theta )}$

## Additional properties of Legendre polynomials

Legendre polynomials are symmetric or antisymmetric, that is

${\displaystyle P_{n}(-x)=(-1)^{n}P_{n}(x).\,}$[5]

Since the differential equation and the orthogonality property are independent of scaling, the Legendre polynomials' definitions are "standardized" (sometimes called "normalization", but note that the actual norm is not unity) by being scaled so that

${\displaystyle P_{n}(1)=1.\,}$

The derivative at the end point is given by

${\displaystyle P_{n}'(1)={\frac {n(n+1)}{2}}.\,}$

As discussed above, the Legendre polynomials obey the three term recurrence relation known as Bonnet’s recursion formula

${\displaystyle (n+1)P_{n+1}(x)=(2n+1)xP_{n}(x)-nP_{n-1}(x)\,}$

and

${\displaystyle {x^{2}-1 \over n}{d \over dx}P_{n}(x)=xP_{n}(x)-P_{n-1}(x).}$

Useful for the integration of Legendre polynomials is

${\displaystyle (2n+1)P_{n}(x)={d \over dx}\left[P_{n+1}(x)-P_{n-1}(x)\right].}$

${\displaystyle {d \over dx}P_{n+1}(x)=(2n+1)P_{n}(x)+(2(n-2)+1)P_{n-2}(x)+(2(n-4)+1)P_{n-4}(x)+\ldots }$

or equivalently

${\displaystyle {d \over dx}P_{n+1}(x)={2P_{n}(x) \over \|P_{n}\|^{2}}+{2P_{n-2}(x) \over \|P_{n-2}\|^{2}}+\ldots }$

where ${\displaystyle \|P_{n}\|}$ is the norm over the interval −1 ≤ x ≤ 1

${\displaystyle \|P_{n}\|={\sqrt {\int _{-1}^{1}(P_{n}(x))^{2}\,dx}}={\sqrt {\frac {2}{2n+1}}}.}$

From Bonnet’s recursion formula one obtains by induction the explicit representation

${\displaystyle P_{n}(x)=\sum _{k=0}^{n}(-1)^{k}{\begin{pmatrix}n\\k\end{pmatrix}}^{2}\left({\frac {1+x}{2}}\right)^{n-k}\left({\frac {1-x}{2}}\right)^{k}.}$

${\displaystyle \sum _{j=0}^{n}P_{j}(x)\geq 0\qquad (x\geq -1).}$

A sum of Legendre polynomials is related to the Dirac delta function for ${\displaystyle -1\leq y\leq 1}$ and ${\displaystyle -1\leq x\leq 1}$

${\displaystyle \delta (y-x)={\frac {1}{2}}\sum _{\ell =0}^{\infty }(2\ell +1)P_{\ell }(y)P_{\ell }(x)\,.}$

The Legendre polynomials of a scalar product of unit vectors can be expanded with spherical harmonics using

${\displaystyle P_{\ell }({r}\cdot {r'})={\frac {4\pi }{2\ell +1}}\sum _{m=-\ell }^{\ell }Y_{\ell m}(\theta ,\phi )Y_{\ell m}^{*}(\theta ',\phi ')\,.}$

where the unit vectors r and r' have spherical coordinates ${\displaystyle (\theta ,\phi )}$ and ${\displaystyle (\theta ',\phi ')}$, respectively.

Asymptotically for ${\displaystyle \ell \rightarrow \infty }$ for arguments less than unity

${\displaystyle P_{\ell }(\cos \theta )=J_{0}(\ell \theta )+{\mathcal {O}}(\ell ^{-1})={\frac {2}{\sqrt {2\pi \ell \sin \theta }}}\cos \left[\left(\ell +{\frac {1}{2}}\right)\theta -{\frac {\pi }{4}}\right]+{\mathcal {O}}(\ell ^{-1})}$

and for arguments greater than unity

${\displaystyle P_{\ell }\left({\frac {1}{\sqrt {1-e^{2}}}}\right)=I_{0}(\ell e)+{\mathcal {O}}(\ell ^{-1})={\frac {1}{\sqrt {2\pi \ell e}}}{\frac {(1+e)^{(\ell +1)/2}}{(1-e)^{\ell /2}}}+{\mathcal {O}}(\ell ^{-1})\,,}$

where ${\displaystyle J_{0}}$ and ${\displaystyle I_{0}}$ are Bessel functions.

## Shifted Legendre polynomials

The shifted Legendre polynomials are defined as ${\displaystyle {\tilde {P_{n}}}(x)=P_{n}(2x-1)}$. Here the "shifting" function ${\displaystyle x\mapsto 2x-1}$ (in fact, it is an affine transformation) is chosen such that it bijectively maps the interval [0, 1] to the interval [−1, 1], implying that the polynomials ${\displaystyle {\tilde {P_{n}}}(x)}$ are orthogonal on [0, 1]:

${\displaystyle \int _{0}^{1}{\tilde {P_{m}}}(x){\tilde {P_{n}}}(x)\,dx={1 \over {2n+1}}\delta _{mn}.}$

An explicit expression for the shifted Legendre polynomials is given by

${\displaystyle {\tilde {P_{n}}}(x)=(-1)^{n}\sum _{k=0}^{n}{n \choose k}{n+k \choose k}(-x)^{k}.}$

The analogue of Rodrigues' formula for the shifted Legendre polynomials is

${\displaystyle {\tilde {P_{n}}}(x)={\frac {1}{n!}}{d^{n} \over dx^{n}}\left[(x^{2}-x)^{n}\right].\,}$

The first few shifted Legendre polynomials are:

${\displaystyle {\begin{array}{r|r}n&{\tilde {P_{n}}}(x)\\\hline 0&1\\1&2x-1\\2&6x^{2}-6x+1\\3&20x^{3}-30x^{2}+12x-1\\4&70x^{4}-140x^{3}+90x^{2}-20x+1\end{array}}}$

## Legendre functions of the second kind ${\displaystyle (Q_{n})}$

As well as polynomial solutions, the Legendre equation has non-polynomial solutions represented by infinite series. These are the Legendre functions of the second kind, denoted by ${\displaystyle Q_{n}(x)}$.

${\displaystyle Q_{n}(x)={\frac {n!}{1\cdot 3\cdots (2n+1)}}\left[x^{-(n+1)}+{\frac {(n+1)(n+2)}{2(2n+3)}}x^{-(n+3)}+{\frac {(n+1)(n+2)(n+3)(n+4)}{2\cdot 4(2n+3)(2n+5)}}x^{-(n+5)}+\cdots \right]}$

The differential equation

${\displaystyle {d \over dx}\left[(1-x^{2}){d \over dx}f(x)\right]+n(n+1)f(x)=0}$

has the general solution

${\displaystyle f(x)=AP_{n}(x)+BQ_{n}(x)}$,

where A and B are constants.

## Legendre functions of fractional degree

Main article: Legendre function

Legendre functions of fractional degree exist and follow from insertion of fractional derivatives as defined by fractional calculus and non-integer factorials (defined by the gamma function) into the Rodrigues' formula. The resulting functions continue to satisfy the Legendre differential equation throughout (−1,1), but are no longer regular at the endpoints. The fractional degree Legendre function Pn agrees with the associated Legendre polynomial P0
n
.