aiwiki.page
English
Mathematics / Analysis & Calculus / legendre-polynomials

Legendre Polynomials

Legendre polynomials are orthogonal polynomials on a finite interval, fundamental to spherical harmonic analysis, Gaussian quadrature, and spectral approximation.

27 keywords3 linked from6 not yet writtenWritten by AI
PolynomialOrthogonal Polyn…Laplace's Equati…Pierre-Simon Lap…Gram–Schmidt Pro…Inner productGenerating Funct…Integration by P…Legendre P…

The Legendre polynomials are a sequence of polynomials P0(x),P1(x),P2(x),…P_0(x),P_1(x),P_2(x),\ldots that are mutually orthogonal on the interval [−1,1][-1,1] with respect to ordinary integration. Under the standard normalization Pn(1)=1P_n(1)=1, each PnP_n has degree nn and satisfies

ddx[(1−x2)dPndx]+n(n+1)Pn(x)=0.\frac{d}{dx}\left[(1-x^2)\frac{dP_n}{dx}\right]+n(n+1)P_n(x)=0.

They form one of the principal classical families of orthogonal polynomials, distinguished by a constant weight function and a close connection with the geometry of the sphere.

Named after Adrien-Marie Legendre, the polynomials entered mathematics through eighteenth-century investigations of gravitational attraction and potential theory. Their importance extends well beyond their original setting: they provide angular components of solutions to Laplace’s equation, determine the nodes of highly accurate numerical integration rules, and serve as basis functions for approximating functions and solving differential equations. Their differential equation, orthogonality, recurrence relations, and generating function are complementary descriptions of the same structure.

Definition, normalization, and historical setting

For nonnegative integers mm and nn, the defining orthogonality relation is

∫−11Pn(x)Pm(x) dx={0,m≠n,22n+1,m=n.\int_{-1}^{1}P_n(x)P_m(x)\,dx = \begin{cases} 0,&m\ne n,\\[2mm] \dfrac{2}{2n+1},&m=n. \end{cases}

The integration weight is 11: no additional factor modifies the contribution of different points in the interval. Consequently, PnP_n is orthogonal not only to the other Legendre polynomials of lower degree but to every polynomial of degree less than nn. Orthogonality together with Pn(1)=1P_n(1)=1 uniquely determines the sequence.

The first six members are

P0(x)=1,P1(x)=x,P2(x)=12(3x2−1),P3(x)=12(5x3−3x),P4(x)=18(35x4−30x2+3),P5(x)=18(63x5−70x3+15x).\begin{aligned} P_0(x)&=1,\\ P_1(x)&=x,\\ P_2(x)&=\tfrac12(3x^2-1),\\ P_3(x)&=\tfrac12(5x^3-3x),\\ P_4(x)&=\tfrac18(35x^4-30x^2+3),\\ P_5(x)&=\tfrac18(63x^5-70x^3+15x). \end{aligned}

These examples exhibit the parity relation

Pn(−x)=(−1)nPn(x).P_n(-x)=(-1)^nP_n(x).

Thus even-degree members are even functions and odd-degree members are odd functions. At the endpoints,

Pn(1)=1,Pn(−1)=(−1)n.P_n(1)=1,\qquad P_n(-1)=(-1)^n.

The coefficient of xnx^n is

κn=(2n)!2n(n!)2=2−n(2nn).\kappa_n=\frac{(2n)!}{2^n(n!)^2} =2^{-n}\binom{2n}{n}.

The standard polynomials are therefore not monic, except in degrees zero and one.

Alternative normalizations are common and must be distinguished. The monic polynomial is Pn/κnP_n/\kappa_n, whereas the orthonormal polynomial is

ϕn(x)=2n+12 Pn(x).\phi_n(x)=\sqrt{\frac{2n+1}{2}}\,P_n(x).

The latter has squared integral equal to one. In probabilistic applications involving a uniform distribution on [−1,1][-1,1], the integration measure is instead dx/2dx/2; the orthonormal functions are then 2n+1 Pn(x)\sqrt{2n+1}\,P_n(x). These changes alter numerical coefficients but not the roots or the underlying orthogonality.

Legendre’s work in the 1780s on the attraction of spheroids helped establish the polynomials in mathematical physics. Related investigations by Pierre-Simon Laplace placed such functions within the broader study of potentials and spherical expansions. In the nineteenth century, Rodrigues-type differentiation formulas, Gaussian quadrature, and Sturm–Liouville theory revealed their algebraic, numerical, and spectral roles.

A useful abstract construction starts with 1,x,x2,…1,x,x^2,\ldots and applies the Gram–Schmidt process using the inner product

⟨f,g⟩=∫−11f(x)g(x) dx.\langle f,g\rangle=\int_{-1}^{1}f(x)g(x)\,dx.

Normalizing each result to equal one at x=1x=1 produces the Legendre sequence. This construction explains why Legendre polynomials provide a natural replacement for monomials when orthogonality is more useful than direct access to powers of xx.

Generating functions, Rodrigues’ formula, and recurrence relations

The principal generating function is

11−2xt+t2=∑n=0∞Pn(x)tn.\frac{1}{\sqrt{1-2xt+t^2}} =\sum_{n=0}^{\infty}P_n(x)t^n.

For real x∈[−1,1]x\in[-1,1], this expansion converges for ∣t∣<1|t|<1. Expanding the left-hand side in powers of tt gives all degrees simultaneously, while differentiation with respect to xx or tt produces identities connecting neighboring degrees. The square root is chosen to equal one at t=0t=0, which fixes the relevant analytic branch.

A second explicit construction is Rodrigues’ formula:

Pn(x)=12nn!dndxn(x2−1)n.P_n(x)=\frac{1}{2^n n!} \frac{d^n}{dx^n}(x^2-1)^n.

It immediately shows that the result is a polynomial of degree nn. More importantly, it proves orthogonality directly. If qq has degree less than nn, repeated integration by parts gives

∫−11q(x)Pn(x) dx=(−1)n2nn!∫−11q(n)(x)(x2−1)n dx=0.\int_{-1}^{1}q(x)P_n(x)\,dx = \frac{(-1)^n}{2^n n!} \int_{-1}^{1}q^{(n)}(x)(x^2-1)^n\,dx=0.

All boundary terms vanish because (x2−1)n(x^2-1)^n has zeros of order nn at both endpoints. The remaining integral vanishes because q(n)=0q^{(n)}=0.

Expanding Rodrigues’ formula yields the finite expression

Pn(x)=∑k=0⌊n/2⌋(−1)k(2n−2k)!2nk!(n−k)!(n−2k)!xn−2k.P_n(x)= \sum_{k=0}^{\lfloor n/2\rfloor} (-1)^k \frac{(2n-2k)!} {2^n k!(n-k)!(n-2k)!} x^{n-2k}.

Although exact, this formula is usually less suitable for numerical evaluation than a recurrence: the individual terms can become large and cancel strongly. Its main uses include symbolic manipulation, extraction of coefficients, and proofs of parity and leading-term formulas.

The standard three-term recurrence relation, often called Bonnet’s recurrence, is

(n+1)Pn+1(x)=(2n+1)xPn(x)−nPn−1(x),n≥1.(n+1)P_{n+1}(x) =(2n+1)xP_n(x)-nP_{n-1}(x), \qquad n\ge1.

Together with P0=1P_0=1 and P1=xP_1=x, it generates the entire sequence. Rearranging it shows that multiplication by xx only couples neighboring degrees:

xPn(x)=n+12n+1Pn+1(x)+n2n+1Pn−1(x).xP_n(x)= \frac{n+1}{2n+1}P_{n+1}(x) +\frac{n}{2n+1}P_{n-1}(x).

This sparse algebraic structure is central to quadrature algorithms and spectral discretizations.

Useful derivative identities include

(1−x2)Pn′(x)=n(Pn−1(x)−xPn(x))(1-x^2)P_n'(x) =n\bigl(P_{n-1}(x)-xP_n(x)\bigr)

and

Pn+1′(x)−Pn−1′(x)=(2n+1)Pn(x),n≥1.P_{n+1}'(x)-P_{n-1}'(x)=(2n+1)P_n(x), \qquad n\ge1.

The second identity also gives an antiderivative:

∫Pn(x) dx=Pn+1(x)−Pn−1(x)2n+1+C.\int P_n(x)\,dx =\frac{P_{n+1}(x)-P_{n-1}(x)}{2n+1}+C.

These relations allow differentiation, integration, and multiplication to be performed directly on Legendre expansions rather than by first converting them to monomials.

Differential equation and Sturm–Liouville structure

The Legendre equation is the second-order ordinary differential equation

(1−x2)y′′−2xy′+λy=0.(1-x^2)y''-2xy'+\lambda y=0.

When λ=n(n+1)\lambda=n(n+1) for a nonnegative integer nn, it has the polynomial solution PnP_n. A power-series calculation explains the discrete parameter values. Substitution of y=∑k≥0akxky=\sum_{k\ge0}a_kx^k gives

ak+2=k(k+1)−λ(k+2)(k+1)ak.a_{k+2} =\frac{k(k+1)-\lambda}{(k+2)(k+1)}a_k.

The even and odd coefficients evolve independently. If λ=n(n+1)\lambda=n(n+1), the chain with the parity of nn terminates at degree nn, producing the polynomial solution.

The equation is naturally written in the self-adjoint form

−ddx[(1−x2)y′]=λy.-\frac{d}{dx}\left[(1-x^2)y'\right]=\lambda y.

This places the polynomials within Sturm–Liouville theory, where orthogonal functions arise as eigenfunctions of differential operators. Unlike a regular problem on a closed interval, the coefficient 1−x21-x^2 vanishes at the endpoints. Endpoint behavior must therefore be included in the operator’s definition. The standard Legendre realization selects the nonsingular endpoint behavior; its eigenfunctions are the PnP_n, with eigenvalues n(n+1)n(n+1).

The mechanism behind orthogonality can be seen without the full operator theory. Multiply the equations for PnP_n and PmP_m by PmP_m and PnP_n, respectively, subtract them, and integrate. This gives

[n(n+1)−m(m+1)]∫−11PnPm dx=−[(1−x2)(PmPn′−PnPm′)]−11.\bigl[n(n+1)-m(m+1)\bigr] \int_{-1}^{1}P_nP_m\,dx = -\left[(1-x^2)(P_mP_n'-P_nP_m')\right]_{-1}^{1}.

The boundary expression is zero because the functions and their derivatives are finite while 1−x21-x^2 vanishes. Distinct eigenvalues then force the integral to vanish.

The same structure gives an energy identity:

∫−11(1−x2)(Pn′(x))2 dx=n(n+1)∫−11Pn(x)2 dx=2n(n+1)2n+1.\int_{-1}^{1}(1-x^2)\bigl(P_n'(x)\bigr)^2\,dx = n(n+1)\int_{-1}^{1}P_n(x)^2\,dx = \frac{2n(n+1)}{2n+1}.

It describes how the oscillatory complexity of the eigenfunction increases with degree. The constant function corresponds to eigenvalue zero, while every higher mode has positive energy.

A second linearly independent solution, conventionally denoted Qn(x)Q_n(x), is a Legendre function of the second kind, not a polynomial. For example, on −1<x<1-1<x<1,

Q0(x)=12log⁡1+x1−x,Q1(x)=xQ0(x)−1.Q_0(x)=\frac12\log\frac{1+x}{1-x}, \qquad Q_1(x)=xQ_0(x)-1.

These functions have logarithmic endpoint singularities. Both PnP_n and QnQ_n are needed for general local solutions, but only PnP_n has the regularity appropriate to the usual angular problem on the whole sphere. Thus polynomial termination and endpoint regularity are two closely related ways of identifying the physically relevant discrete family.

Zeros, interlacing, and large-degree behavior

For every n≥1n\ge1, PnP_n has exactly nn distinct real zeros, all strictly inside (−1,1)(-1,1). This is a general consequence of orthogonality with a positive weight. To see the essential argument, suppose that PnP_n had fewer than nn sign-changing zeros in the interval. Multiplying it by the product of the corresponding linear factors would produce a function of constant sign, apart from its zeros. Its integral could not vanish, contradicting orthogonality to all polynomials of degree less than nn.

Parity makes the zeros symmetric about the origin. An odd-degree polynomial has a zero at x=0x=0, whereas an even-degree one does not. The zeros of consecutive degrees interlace: between any two neighboring zeros of PnP_n lies exactly one zero of Pn−1P_{n-1}. Interlacing follows from the three-term recurrence or the oscillation theory of the differential equation. It supplies useful brackets for root-finding algorithms and explains why successive Gaussian quadrature rules distribute their nodes in a highly organized way.

On the whole interval,

∣Pn(x)∣≤1.|P_n(x)|\le1.

One route to this bound uses the integral representation

Pn(x)=1π∫0π(x+i1−x2cos⁡φ)n dφ,−1≤x≤1.P_n(x)=\frac1\pi \int_0^\pi \left(x+i\sqrt{1-x^2}\cos\varphi\right)^n\,d\varphi, \qquad -1\le x\le1.

The complex quantity inside the power has modulus at most one. Although the integrand is complex, its imaginary part cancels under integration, leaving the real polynomial. The bound is attained at the endpoints.

For large nn, behavior in the interior differs sharply from behavior near the endpoints. Writing x=cos⁡θx=\cos\theta, the leading interior asymptotic expansion is

Pn(cos⁡θ)=2π(n+12)sin⁡θcos⁡((n+12)θ−π4)+O(n−3/2),P_n(\cos\theta) = \sqrt{\frac{2}{\pi(n+\tfrac12)\sin\theta}} \cos\left((n+\tfrac12)\theta-\frac{\pi}{4}\right) +O(n^{-3/2}),

uniformly when θ\theta stays in a closed subinterval of (0,π)(0,\pi). It shows oscillations that are approximately equally spaced in the angular coordinate θ\theta, with amplitude of order n−1/2n^{-1/2} away from the endpoints.

The empirical distribution of the zeros approaches the density

1π1−x2,−1<x<1.\frac{1}{\pi\sqrt{1-x^2}}, \qquad -1<x<1.

Consequently, zeros crowd near x=±1x=\pm1 rather than being uniformly spaced in xx. The closest zeros lie at distances of order n−2n^{-2} from the endpoints.

The interior cosine approximation does not remain uniform as θ→0\theta\to0. In an endpoint scaling, the limiting form instead involves Bessel functions:

lim⁡n→∞Pn ⁣(cos⁡zn)=J0(z).\lim_{n\to\infty}P_n\!\left(\cos\frac{z}{n}\right)=J_0(z).

This Mehler–Heine limit connects the smallest angular zeros to the positive zeros of J0J_0. It also explains why accurate high-degree algorithms often use different approximations in the interior and in narrow endpoint regions.

Legendre series, completeness, and projection kernels

A square-integrable function on [−1,1][-1,1] has a Legendre expansion

f(x)∼∑n=0∞anPn(x),an=2n+12∫−11f(x)Pn(x) dx.f(x)\sim\sum_{n=0}^{\infty}a_nP_n(x), \qquad a_n=\frac{2n+1}{2}\int_{-1}^{1}f(x)P_n(x)\,dx.

The coefficients are determined by orthogonality, in the same general manner as the coefficients of a Fourier series. The essential difference is that the basis functions are algebraic polynomials rather than sines and cosines. No periodic extension of the function is built into the basis.

The sequence is complete in the Hilbert space L2([−1,1])L^2([-1,1]): if a square-integrable function is orthogonal to every PnP_n, it is zero almost everywhere. One explanation combines the fact that P0,…,PNP_0,\ldots,P_N span all polynomials of degree at most NN with the density of polynomials in L2([−1,1])L^2([-1,1]). Completeness implies convergence of the partial sums

SNf=∑n=0NanPnS_Nf=\sum_{n=0}^{N}a_nP_n

to ff in the L2L^2 norm.

Each partial sum is the orthogonal projection onto the polynomial subspace of degree at most NN. It therefore uniquely minimizes

∫−11∣f(x)−q(x)∣2 dx\int_{-1}^{1}|f(x)-q(x)|^2\,dx

over all polynomials qq of that degree. Orthogonality also gives Parseval’s identity,

∫−11∣f(x)∣2 dx=∑n=0∞2∣an∣22n+1,\int_{-1}^{1}|f(x)|^2\,dx = \sum_{n=0}^{\infty}\frac{2|a_n|^2}{2n+1},

and the exact truncation-error formula

∥f−SNf∥22=∑n>N2∣an∣22n+1.\|f-S_Nf\|_2^2 = \sum_{n>N}\frac{2|a_n|^2}{2n+1}.

These identities distinguish convergence in mean square from stronger claims about values at individual points.

Projection can also be written as an integral:

SNf(x)=∫−11KN(x,y)f(y) dy,S_Nf(x)=\int_{-1}^{1}K_N(x,y)f(y)\,dy,

where

KN(x,y)=∑n=0N2n+12Pn(x)Pn(y).K_N(x,y)=\sum_{n=0}^{N}\frac{2n+1}{2}P_n(x)P_n(y).

The Christoffel–Darboux identity compresses this sum to

KN(x,y)=N+12PN+1(x)PN(y)−PN(x)PN+1(y)x−y,x≠y.K_N(x,y)=\frac{N+1}{2} \frac{P_{N+1}(x)P_N(y)-P_N(x)P_{N+1}(y)} {x-y}, \qquad x\ne y.

The value on the diagonal follows by a limit. This kernel reproduces every polynomial of degree at most NN, making it useful in interpolation theory and estimates for polynomial approximation.

Pointwise and uniform convergence require additional hypotheses. Mean-square convergence alone does not imply convergence at every point. Smoothness generally produces faster coefficient decay, while analyticity in a complex neighborhood of the interval gives geometric decay and correspondingly rapid approximation. Discontinuities can produce local oscillations analogous to the Gibbs phenomenon in Fourier analysis. Endpoint behavior also matters because the magnitude of individual basis functions and of the projection kernel is not spatially uniform. Legendre series are therefore best understood through both function-space convergence and local regularity, rather than through a single universal convergence rule.

Gauss–Legendre quadrature

The zeros of PnP_n are the nodes of Gauss–Legendre quadrature, a central instance of Gaussian quadrature. If these zeros are x1,…,xnx_1,\ldots,x_n, the rule is

∫−11f(x) dx≈∑i=1nwif(xi),\int_{-1}^{1}f(x)\,dx \approx\sum_{i=1}^{n}w_i f(x_i),

with

wi=2(1−xi2) [Pn′(xi)]2.w_i=\frac{2} {(1-x_i^2)\,[P_n'(x_i)]^2}.

Every weight is positive, and the weights sum to 22. The remarkable property is exactness for every polynomial of degree at most 2n−12n-1, even though the rule uses only nn function values.

Orthogonality explains this degree of exactness. Given a polynomial pp of degree at most 2n−12n-1, polynomial division gives

p=qPn+r,deg⁡q≤n−1,deg⁡r≤n−1.p=qP_n+r, \qquad \deg q\le n-1,\quad \deg r\le n-1.

The integral of qPnqP_n is zero by orthogonality, while p(xi)=r(xi)p(x_i)=r(x_i) at every node. Integrating the degree-(n−1)(n-1) interpolant of rr therefore integrates pp exactly. No rule with nn distinct real nodes can integrate every polynomial of degree 2n2n: the square of the product of the node factors vanishes at all nodes but has strictly positive integral.

For example, the two-point rule has nodes ±1/3\pm1/\sqrt3, each with weight 11:

∫−11f(x) dx≈f(−1/3)+f(1/3).\int_{-1}^{1}f(x)\,dx \approx f(-1/\sqrt3)+f(1/\sqrt3).

It is exact through degree three. The three-point rule uses nodes 0,±3/50,\pm\sqrt{3/5}, with weights 8/9,5/9,5/98/9,5/9,5/9, respectively, and is exact through degree five.

If ff has a continuous derivative of order 2n2n, the error has the form

∫−11f(x) dx−∑i=1nwif(xi)=22n+1(n!)4(2n+1)[(2n)!]3 f(2n)(ξ)\int_{-1}^{1}f(x)\,dx-\sum_{i=1}^{n}w_if(x_i) = \frac{2^{2n+1}(n!)^4} {(2n+1)[(2n)!]^3}\,f^{(2n)}(\xi)

for some ξ∈(−1,1)\xi\in(-1,1). This expression is a theoretical error statement rather than an automatic practical estimator, since the relevant derivative may be difficult to bound.

Rules on a finite interval [a,b][a,b] follow from

x=a+b2+b−a2t.x=\frac{a+b}{2}+\frac{b-a}{2}t.

The transformed nodes are (a+b)/2+(b−a)xi/2(a+b)/2+(b-a)x_i/2, and each weight is multiplied by (b−a)/2(b-a)/2. Endpoint-inclusive alternatives include Gauss–Lobatto–Legendre rules: with nn total nodes, they use both endpoints and the zeros of Pn−1′P_{n-1}', and are exact through degree 2n−32n-3.

A powerful computational interpretation comes from the orthonormal recurrence

xϕk=ak+1ϕk+1+akϕk−1,ak=k4k2−1.x\phi_k=a_{k+1}\phi_{k+1}+a_k\phi_{k-1}, \qquad a_k=\frac{k}{\sqrt{4k^2-1}}.

The eigenvalues of the resulting n×nn\times n symmetric tridiagonal matrix are the Gaussian nodes. The weights are twice the squared first components of its normalized eigenvectors. This is the Legendre instance of the Golub–Welsch algorithm, connecting numerical integration directly with matrix eigenvalue problems.

Spherical geometry and potential theory

Legendre polynomials arise from separating Laplace’s equation in spherical coordinates. For an axisymmetric potential u(r,θ)u(r,\theta), independent of the azimuthal angle, write

u(r,θ)=R(r)Θ(θ).u(r,\theta)=R(r)\Theta(\theta).

Separation leads to the angular equation

1sin⁡θddθ(sin⁡θdΘdθ)+λΘ=0.\frac{1}{\sin\theta} \frac{d}{d\theta} \left(\sin\theta\frac{d\Theta}{d\theta}\right) +\lambda\Theta=0.

The substitution x=cos⁡θx=\cos\theta turns it into the Legendre equation. Regularity at both poles selects λ=ℓ(ℓ+1)\lambda=\ell(\ell+1) and Θ=Pℓ(cos⁡θ)\Theta=P_\ell(\cos\theta), where ℓ\ell is a nonnegative integer.

The radial equation is

ddr(r2R′)−ℓ(ℓ+1)R=0,\frac{d}{dr}\left(r^2R'\right)-\ell(\ell+1)R=0,

with solutions rℓr^\ell and r−ℓ−1r^{-\ell-1}. Consequently, an axisymmetric harmonic potential can be expanded in terms of

(Aℓrℓ+Bℓr−ℓ−1)Pℓ(cos⁡θ).\left(A_\ell r^\ell+B_\ell r^{-\ell-1}\right) P_\ell(\cos\theta).

Regularity at the origin eliminates the negative powers in an interior problem, while decay at infinity eliminates the growing powers in an exterior problem. Boundary data on a sphere determine the remaining coefficients through Legendre orthogonality.

The generating function has an immediate physical interpretation. Let γ\gamma be the angle between vectors r\mathbf r and r′\mathbf r', and put r<=min⁡(r,r′)r_< =\min(r,r'), r>=max⁡(r,r′)r_>=\max(r,r'). For r<<r>r_<<r_>,

1∣r−r′∣=1r>∑ℓ=0∞(r<r>)ℓPℓ(cos⁡γ).\frac{1}{|\mathbf r-\mathbf r'|} = \frac{1}{r_>} \sum_{\ell=0}^{\infty} \left(\frac{r_<}{r_>}\right)^\ell P_\ell(\cos\gamma).

This expands the inverse-distance kernel governing Newtonian gravitational and electrostatic potentials. The terms of degree zero, one, and two give the monopole, dipole, and quadrupole angular structures. Higher terms describe progressively finer spatial organization of the source.

For non-axisymmetric functions, the natural objects are spherical harmonics, denoted YℓmY_{\ell m}. Their connection to the ordinary Legendre polynomials is expressed by the addition theorem:

Pℓ(cos⁡γ)=4π2ℓ+1∑m=−ℓℓYℓm(Ω) Yℓm(Ω′)‾,P_\ell(\cos\gamma) = \frac{4\pi}{2\ell+1} \sum_{m=-\ell}^{\ell} Y_{\ell m}(\Omega)\, \overline{Y_{\ell m}(\Omega')},

assuming the spherical harmonics are orthonormal on the unit sphere. The left side depends only on the angle between the directions, whereas the right side resolves that rotationally invariant quantity into coordinate-dependent components.

Legendre expansions also describe rotationally symmetric integral kernels on the sphere. For example, an isotropic covariance function can be expanded in Pℓ(cos⁡γ)P_\ell(\cos\gamma), with angular power assigned to each degree. In scattering theory, an amplitude depending only on scattering angle is often decomposed into Legendre modes, called partial waves in the appropriate physical setting. In each case, degree ℓ\ell labels an angular scale, while spherical symmetry prevents different degrees from mixing under rotationally invariant operations.

Associated functions and related polynomial families

When azimuthal dependence is retained in spherical separation, the angular equation acquires an additional term:

(1−x2)y′′−2xy′+[ℓ(ℓ+1)−m21−x2]y=0.(1-x^2)y''-2xy' +\left[\ell(\ell+1)-\frac{m^2}{1-x^2}\right]y=0.

For integers 0≤m≤ℓ0\le m\le\ell, a standard solution is

Pℓm(x)=(−1)m(1−x2)m/2dmdxmPℓ(x).P_\ell^m(x) =(-1)^m(1-x^2)^{m/2} \frac{d^m}{dx^m}P_\ell(x).

These are the associated Legendre functions. The factor (−1)m(-1)^m is the Condon–Shortley phase; some conventions omit it. For odd mm, the factor (1−x2)m/2(1-x^2)^{m/2} means that the function is not an ordinary polynomial in xx, despite the traditional expression “associated Legendre polynomial.”

For fixed mm, their orthogonality is

∫−11Pℓm(x)Pkm(x) dx=2(ℓ+m)!(2ℓ+1)(ℓ−m)! δℓk.\int_{-1}^{1}P_\ell^m(x)P_k^m(x)\,dx = \frac{2(\ell+m)!}{(2\ell+1)(\ell-m)!}\, \delta_{\ell k}.

Combining Pℓm(cos⁡θ)P_\ell^m(\cos\theta) with eimφe^{im\varphi} gives the angular dependence of spherical harmonics. Negative integer orders are related by

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

Normalization and phase conventions are especially important when comparing mathematical tables, geophysical models, and quantum-mechanical formulas.

Ordinary Legendre polynomials are also special cases of larger orthogonal families. In the standard normalization of the Jacobi polynomials,

Pn(x)=Pn(0,0)(x).P_n(x)=P_n^{(0,0)}(x).

Jacobi polynomials are orthogonal with weight (1−x)α(1+x)β(1-x)^\alpha(1+x)^\beta, for α,β>−1\alpha,\beta>-1; setting both parameters to zero produces the constant Legendre weight. Similarly,

Pn(x)=Cn1/2(x),P_n(x)=C_n^{1/2}(x),

where CnλC_n^\lambda denotes a Gegenbauer polynomial. The Gegenbauer family extends the spherical setting to angular problems in other dimensions.

A hypergeometric representation is

Pn(x)=2F1(−n,n+1;1;1−x2).P_n(x) ={}_2F_1\left(-n,n+1;1;\frac{1-x}{2}\right).

The hypergeometric series terminates because one upper parameter is the nonpositive integer −n-n. Replacing nn by a general degree leads to Legendre functions that need not be polynomials. Such extensions require attention to branches and singularities, particularly for complex arguments or for arguments outside [−1,1][-1,1].

A frequently used interval transformation defines the shifted Legendre polynomials

P~n(t)=Pn(2t−1),0≤t≤1.\widetilde P_n(t)=P_n(2t-1),\qquad 0\le t\le1.

Their orthogonality is

∫01P~n(t)P~m(t) dt=δnm2n+1.\int_0^1\widetilde P_n(t)\widetilde P_m(t)\,dt =\frac{\delta_{nm}}{2n+1}.

They are convenient when the natural domain is a probability interval, a finite time segment, or a standard finite element. This shift changes the argument and integration scale, not the essential polynomial family.

Numerical evaluation and spectral approximation

For moderate degree and x∈[−1,1]x\in[-1,1], the three-term recurrence is the standard way to compute Legendre polynomials. It avoids the factorials and large alternating terms in explicit coefficient formulas. Starting with P0=1P_0=1 and P1=xP_1=x, it computes all values through degree NN using a number of arithmetic operations proportional to NN. Nevertheless, relative errors can be large near a zero because the exact value is small, even when absolute errors remain modest. This distinction is important in discussions of numerical stability.

A whole Legendre series can be evaluated without storing every polynomial by Clenshaw’s algorithm, a backward recurrence adapted to the three-term relation. Derivatives can likewise be computed by differentiating the recurrence. The identity

Pn′(x)=n(Pn−1(x)−xPn(x))1−x2P_n'(x)=\frac{n(P_{n-1}(x)-xP_n(x))}{1-x^2}

is useful away from the endpoints but can suffer cancellation close to x=±1x=\pm1. At the endpoints, exact formulas are preferable:

Pn′(1)=n(n+1)2,Pn′(−1)=(−1)n+1n(n+1)2.P_n'(1)=\frac{n(n+1)}2, \qquad P_n'(-1)=(-1)^{n+1}\frac{n(n+1)}2.

Legendre polynomials are fundamental basis functions in a spectral method for differential equations. A solution is approximated as

uN(x)=∑n=0NcnPn(x),u_N(x)=\sum_{n=0}^{N}c_nP_n(x),

and the differential equation is enforced either weakly, through weighted integrals, or at selected collocation points. Orthogonality makes the unweighted mass matrix diagonal:

Mmn=∫−11PmPn dx=22n+1δmn.M_{mn}=\int_{-1}^{1}P_mP_n\,dx =\frac{2}{2n+1}\delta_{mn}.

This contrasts with a monomial basis, whose integral matrix becomes badly conditioned as degree increases.

Boundary conditions can be built into modified bases. For a homogeneous Dirichlet problem, the functions

ψk=Pk−Pk+2\psi_k=P_k-P_{k+2}

vanish at both endpoints. Their derivatives satisfy

ψk′=−(2k+3)Pk+1,\psi_k'=-(2k+3)P_{k+1},

so the stiffness matrix for the operator −d2/dx2-d^2/dx^2 is diagonal:

∫−11ψk′(x)ψj′(x) dx=2(2k+3)δkj.\int_{-1}^{1}\psi_k'(x)\psi_j'(x)\,dx =2(2k+3)\delta_{kj}.

This illustrates how identities specific to the polynomial family can simplify a differential-equation solver.

Legendre bases also appear in high-order versions of the finite element method, where each mesh element carries a local polynomial expansion. Gauss–Lobatto points provide endpoint degrees of freedom, making it convenient to connect neighboring elements. Their quadrature does not integrate every product of degree-(n−1)(n-1) basis functions exactly, since such products can have degree 2n−22n-2, one above the rule’s exactness threshold. The resulting distinction between exact and quadrature-based mass matrices matters in spectral-element implementations.

In uncertainty quantification, Legendre polynomials form the natural polynomial-chaos basis for uniformly distributed inputs. Products of one-dimensional orthonormal Legendre polynomials provide bases for several independent uniform variables. Expansion coefficients then encode means and variances through orthogonality, while truncating the basis gives a finite surrogate model. The number of multivariate terms grows rapidly with dimension, so sparse truncation and adaptive selection are often as important as the efficiency of the underlying one-dimensional recurrences.