# Legendre polynomials

(Redirected from Legendre polynomial)
The six first Legendre polynomials.

In physical science and mathematics, Legendre polynomials (named after Adrien-Marie Legendre, who discovered them in 1782) are a system of complete and orthogonal polynomials, with a vast number of mathematically beautiful properties, and numerous applications. They can be defined in many ways, and the various definitions highlight different aspects as well as suggest generalizations and connections to different mathematical structures and physical and numerical applications.

Closely related to the Legendre polynomials are associated Legendre polynomials, Legendre functions, Legendre functions of the second kind, and associated Legendre functions. For each of these see the separate Wikipedia articles.

## Definition by construction as an orthogonal system

In this approach, the polynomials are defined as an orthogonal system with respect to the weight function ${\displaystyle w(x)=1}$  over the interval ${\displaystyle [-1,1]}$ . That is, ${\displaystyle P_{n}(x)}$  is a polynomial of degree ${\displaystyle n}$ , such that

${\displaystyle \int _{-1}^{1}P_{m}(x)P_{n}(x)\,dx=0\quad {\text{if }}n\neq m.}$

This determines the polynomials completely up to an overall scale factor, which is fixed by the standardization ${\displaystyle P_{n}(1)=1}$ . That this is a constructive definition is seen thus: ${\displaystyle P_{0}(x)=1}$  is the only correctly standardized polynomial of degree 0. ${\displaystyle P_{1}(x)}$  must be orthogonal to ${\displaystyle P_{0}}$ , leading to ${\displaystyle P_{1}(x)=x}$ , and ${\displaystyle P_{2}(x)}$  is determined by demanding orthogonality to ${\displaystyle P_{0}}$  and ${\displaystyle P_{1}}$ , and so on. ${\displaystyle P_{n}}$  is fixed by demanding orthogonality to all ${\displaystyle P_{m}}$  with ${\displaystyle m . This gives ${\displaystyle n}$  conditions, which, along with the standardization ${\displaystyle P_{n}(1)=1}$  fixes all ${\displaystyle n+1}$  coefficients in ${\displaystyle P_{n}(x)}$ . With work, all the coefficients of every polynomial can be systematically determined, leading to the explicit representation in powers of ${\displaystyle x}$  given below.

This definition of the ${\displaystyle P_{n}}$ 's is the simplest one. It does not appeal to the theory of differential equations. Second, the completeness of the polynomials follows immediately from the completeness of the powers 1, ${\displaystyle x,x^{2},x^{3},\ldots }$ . Finally, by defining them via orthogonality with respect to the most obvious weight function on a finite interval, it sets up the Legendre polynomials as one of the three classical orthogonal polynomial systems. The other two are the Laguerre polynomials, which are orthogonal over the half line ${\displaystyle [0,\infty )}$ , and the Hermite polynomials, orthogonal over the full line ${\displaystyle (-\infty ,\infty )}$ , with weight functions that are the most natural analytic functions that ensure convergence of all integrals.

## Definition via generating function

The Legendre polynomials can also be defined as the coefficients in a formal expansion in powers of ${\displaystyle t}$  of the generating function[1]

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

(2)

The coefficient of ${\displaystyle t^{n}}$  is a polynomial in ${\displaystyle x}$  of degree ${\displaystyle n}$ . Expanding up to ${\displaystyle t^{1}}$  gives

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

Expansion to higher orders gets increasingly cumbersome, but is possible to do systematically, and again leads to one of the explicit forms given below.

It is possible to obtain the higher ${\displaystyle P_{n}}$ 's without resorting to direct expansion of the Taylor series, however. Eq. 2 is differentiated with respect to t on both sides and rearranged to obtain

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

Replacing the quotient of the square root with its definition in Eq. 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 all the rest to be generated recursively.

The generating function approach is directly connected to the multipole expansion in electrostatics, as explained below, and is how the polynomials were first defined by Legendre in 1782.

## Definition via differential equation

A third definition is in terms of solutions to Legendre's differential equation

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

(1)

This differential equation has regular singular points at x = ±1 so if a solution is sought using the standard Frobenius or power series method, a series about the origin will only converge for |x| < 1 in general. 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). The orthogonality and completeness of these solutions is best seen from the viewpoint of Sturm–Liouville theory. We rewrite the differential equation as an eigenvalue problem,

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

with the eigenvalue ${\displaystyle \lambda }$  in lieu of ${\displaystyle n(n+1)}$ . If we demand that the solution be regular at ${\displaystyle x=\pm 1}$ , the differential operator on the left is Hermitean. The eigenvalues are found to be of the form n(n + 1), with ${\displaystyle n=0,1,2,\ldots }$ , and the eigenfunctions are the ${\displaystyle P_{n}(x)}$ . The orthogonality and completeness of this set of solutions follows at once from the larger framework of Sturm-Liouville theory.

The differential equation admits another, non-polynomial solution, the Legendre functions of the second kind ${\displaystyle Q_{n}}$ . A two-parameter generalization of (Eq. 1) is called Legendre's general differential equation, solved by the Associated Legendre polynomials. Legendre functions are solutions of Legendre's differential equation (generalized or not) with non-integer parameters.

In physical settings, Legendre's differential equation arises naturally whenever one solves Laplace's equation (and related partial differential equations) by separation of variables in spherical coordinates. From this standpoint, the eigenfunctions of the angular part of the Laplacian operator are the spherical harmonics, of which the Legendre polynomials are (up to a multiplicative constant) the subset that is left invariant by rotations about the polar axis. The polynomials appear as ${\displaystyle P_{n}(\cos \theta )}$  where ${\displaystyle \theta }$  is the polar angle. This approach to the Legendre polynomials provides a deep connection to rotational symmetry. Many of their properties which are found laboriously through the methods of analysis — for example the addition theorem — are more easily found using the methods of symmetry and group theory, and acquire profound physical and geometrical meaning.

## Orthonormality and completeness

The standardization ${\displaystyle P_{n}(1)=1}$  fixes the normalization of the Legendre polynomials (with respect to the L2 norm on the interval −1 ≤ x ≤ 1). Since they are also orthogonal with respect to the same norm, the two statements can be combined into the single equation,

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

(where δmn denotes the Kronecker delta, equal to 1 if m = n and to 0 otherwise). This normalization is most readily found by employing Rodrigues' formula, given below.

That the polynomials are complete means the following. Given any piecewise continuous function ${\displaystyle f(x)}$  with finitely many discontinuities in the interval [−1,1], the sequence of sums

${\displaystyle f_{n}(x)=\sum _{\ell =0}^{n}a_{\ell }P_{\ell }(x)}$

converges in the mean to ${\displaystyle f(x)}$  as ${\displaystyle n\to \infty }$ , provided we take

${\displaystyle a_{\ell }={\frac {2\ell +1}{2}}\int _{-1}^{1}f(x)P_{\ell }(x)\,dx.}$

This completeness property underlies all the expansions discussed in this article, and is often stated in the form

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

with −1 ≤ x ≤ 1 and −1 ≤ y ≤ 1.

## Rodrigues' formula and other explicit formulas

An especially compact expression for the Legendre polynomials is given by Rodrigues' formula:

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

This formula enables derivation of a large number of properties of the ${\displaystyle P_{n}}$ 's. Among these are explicit representations such as

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

where the last, which is also immediate from the recursion formula, expresses the Legendre polynomials by simple monomials and involves the multiplicative formula of the binomial coefficient.[clarification needed]

The first few Legendre polynomials are:

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

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

## Applications of Legendre polynomials

### Expanding a 1/r potential

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

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

where r and r are the lengths of the vectors x and x respectively and γ is the angle between those two vectors. The series converges when 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, 2 Φ(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 is the axis of symmetry and θ is the angle between the position of the observer and the 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 )\,.}$

Al and Bl are to be determined according to the boundary condition of each problem.[3]

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

### Legendre polynomials in multipole expansions

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 Φ(r,θ) (in spherical coordinates) due to a point charge located on the z-axis at z = a (see diagram right) varies as

${\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 cos , also denoted as the Chebyshev polynomials Tn(cos θ) ≡ cos , can also be multipole expanded by the Legendre polynomials Pn(cos θ). The first several orders are as follows:

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

Another property is the expression for sin (n + 1)θ, 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 have definite parity. That is, they are symmetric or antisymmetric,[4] according to

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

Another useful property is

${\displaystyle \int _{-1}^{1}P_{n}(x)\,dx=0}$  for ${\displaystyle n\geq 1}$ ,

which follows from considering the orthogonality relation with ${\displaystyle P_{0}(x)=1}$ . It is convenient when a Legendre series ${\displaystyle \sum _{i}a_{i}P_{i}}$  is used to approximate a function or experimental data: the average of the series over the interval [-1, 1] is simply given by the leading expansion coefficient ${\displaystyle a_{0}}$ .

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 1) 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}}\,.}$

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

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

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

where the unit vectors r and r have spherical coordinates (θ,φ) and (θ′,φ′), respectively.

### Recursion relations

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 {\frac {x^{2}-1}{n}}{\frac {d}{dx}}P_{n}(x)=xP_{n}(x)-P_{n-1}(x)\,}$

or, with the alternative expression, which also holds at the endpoints

${\displaystyle {\frac {d}{dx}}P_{n+1}(x)=(n+1)P_{n}(x)+x{\frac {d}{dx}}P_{n}(x)\,.}$

Useful for the integration of Legendre polynomials is

${\displaystyle (2n+1)P_{n}(x)={\frac {d}{dx}}{\bigl (}P_{n+1}(x)-P_{n-1}(x){\bigr )}\,.}$

${\displaystyle {\frac {d}{dx}}P_{n+1}(x)=(2n+1)P_{n}(x)+{\bigl (}2(n-2)+1{\bigr )}P_{n-2}(x)+{\bigl (}2(n-4)+1{\bigr )}P_{n-4}(x)+\cdots }$

or equivalently

${\displaystyle {\frac {d}{dx}}P_{n+1}(x)={\frac {2P_{n}(x)}{\left\|P_{n}\right\|^{2}}}+{\frac {2P_{n-2}(x)}{\left\|P_{n-2}\right\|^{2}}}+\cdots }$

where ||Pn|| is the norm over the interval −1 ≤ x ≤ 1

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

### Asymptotes

Asymptotically for l → ∞[5]

{\displaystyle {\begin{aligned}P_{\ell }(\cos \theta )&=J_{0}(\ell \theta )+{\mathcal {O}}\left(\ell ^{-1}\right)\\&={\frac {2}{\sqrt {2\pi \ell \sin \theta }}}\cos \left(\left(\ell +{\tfrac {1}{2}}\right)\theta -{\frac {\pi }{4}}\right)+{\mathcal {O}}\left(\ell ^{-1}\right),\quad \theta \in (0,\pi ),\end{aligned}}}

and for arguments of magnitude greater than 1

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

where J0 and I0 are Bessel functions.

### Zeros

All ${\displaystyle n}$  zeros of ${\displaystyle P_{n}(x)}$  are real, distinct from each other, and lie in the interval ${\displaystyle (-1,1)}$ . Further, if we regard them as dividing the interval ${\displaystyle [-1,1]}$  into ${\displaystyle n+1}$  subintervals, each subinterval will contain exactly one zero of ${\displaystyle P_{n+1}}$ . This is known as the interlacing property. Because of the parity property it is evident that if ${\displaystyle x_{k}}$  is a zero of ${\displaystyle P_{n}(x)}$ , so is ${\displaystyle -x_{k}}$ . These zeros play an important role in numerical integration based on Gaussian quadrature. The specific quadrature based on the ${\displaystyle P_{n}}$ 's is known as Gauss-Legendre quadrature.

## Legendre polynomials with transformed argument

### Shifted Legendre polynomials

The shifted Legendre polynomials are defined as

${\displaystyle {\widetilde {P}}_{n}(x)=P_{n}(2x-1)\,}$ .

Here the "shifting" function x ↦ 2x − 1 is an affine transformation that bijectively maps the interval [0,1] to the interval [−1,1], implying that the polynomials n(x) are orthogonal on [0,1]:

${\displaystyle \int _{0}^{1}{\widetilde {P}}_{m}(x){\widetilde {P}}_{n}(x)\,dx={\frac {1}{2n+1}}\delta _{mn}\,.}$

An explicit expression for the shifted Legendre polynomials is given by

${\displaystyle {\widetilde {P}}_{n}(x)=(-1)^{n}\sum _{k=0}^{n}{\binom {n}{k}}{\binom {n+k}{k}}(-x)^{k}\,.}$

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

${\displaystyle {\widetilde {P}}_{n}(x)={\frac {1}{n!}}{\frac {d^{n}}{dx^{n}}}\left(x^{2}-x\right)^{n}\,.}$

The first few shifted Legendre polynomials are:

${\displaystyle {\begin{array}{r|r}n&{\widetilde {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\\5&252x^{5}-630x^{4}+560x^{3}-210x^{2}+30x-1\end{array}}}$

### Legendre rational functions

The Legendre rational functions are a sequence of orthogonal functions on [0, ∞). They are obtained by composing the Cayley transform with Legendre polynomials.

A rational Legendre function of degree n is defined as:

${\displaystyle R_{n}(x)={\frac {\sqrt {2}}{x+1}}\,P_{n}\left({\frac {x-1}{x+1}}\right)\,.}$

They are eigenfunctions of the singular Sturm-Liouville problem:

${\displaystyle (x+1)\partial _{x}(x\partial _{x}((x+1)v(x)))+\lambda v(x)=0}$

with eigenvalues

${\displaystyle \lambda _{n}=n(n+1)\,.}$