Legendre Polynomials

⚡ Key Takeaways

Legendre polynomials Pn(x)P_n(x) are an infinite family of orthogonal polynomials on [−1,1][-1,1], with PnP_n of degree nn. Key result: they form a complete orthogonal basis for L2[−1,1]L^2[-1,1] and are the polynomial eigenfunctions of the Legendre differential operator. Where they apply: solving Laplace's equation in spherical coordinates, multipole expansions, Gaussian quadrature, and approximation theory. Who/when: introduced by Adrien-Marie Legendre in 1782–1785 in studies of gravitational potential.

💡 The Core Insight

A single generating "seed" — the inverse-distance function 1/1−2xt+t21/\sqrt{1-2xt+t^2} — encodes the entire family. Expanding it as a power series in tt produces the Pn(x)P_n(x) as coefficients. Everything else (orthogonality, recurrences, the ODE, the values at ±1\pm1) follows from manipulating this one expression. The deeper unifying theme is orthogonality with respect to the uniform weight on [−1,1][-1,1]: the Legendre polynomials are the answer to "what is the natural orthogonal polynomial basis for the interval?"

Formal Statement

DefinitionLegendre Polynomials via Rodrigues' Formula

The nn-th Legendre polynomial is defined by Rodrigues' formula:

1
Pn(x)=12n n! dndxn[(x2−1)n],n=0,1,2,…\quad P_n(x) = \frac{1}{2^n\, n!}\,\frac{d^n}{dx^n}\left[(x^2-1)^n\right], \qquad n = 0,1,2,\dots

Derivation hint: (x2−1)n(x^2-1)^n is a degree-2n2n polynomial whose nn-th derivative is degree nn; the prefactor 1/(2nn!)1/(2^n n!) fixes the normalization Pn(1)=1P_n(1)=1. Here x∈[−1,1]x \in [-1,1] is the variable (often x=cos⁡θx = \cos\theta in physical applications), nn is the degree, and PnP_n is a polynomial of exactly degree nn. The first few are:

2
P0=1,  P1=x,  P2=12(3x2−1),  P3=12(5x3−3x),  P4=18(35x4−30x2+3).\quad P_0 = 1,\; P_1 = x,\; P_2 = \tfrac{1}{2}(3x^2-1),\; P_3 = \tfrac{1}{2}(5x^3-3x),\; P_4 = \tfrac{1}{8}(35x^4-30x^2+3).

Derivation hint: apply [1] for each nn, or use the recurrence [7] starting from P0,P1P_0,P_1.

DefinitionLegendre's Differential Equation

The Pn(x)P_n(x) are the polynomial solutions of the second-order linear ODE

3
ddx ⁣[(1−x2)dydx]+n(n+1) y=0,\quad \frac{d}{dx}\!\left[(1-x^2)\frac{dy}{dx}\right] + n(n+1)\,y = 0,

equivalently (1−x2)y′′−2x y′+n(n+1)y=0(1-x^2)y'' - 2x\,y' + n(n+1)y = 0. Derivation hint: substitute y=Pny = P_n from Rodrigues' formula and differentiate, or derive from separation of variables in Laplace's equation where n(n+1)n(n+1) is the separation constant. This is a Sturm–Liouville problem with weight w(x)=1w(x)=1, eigenvalue λn=n(n+1)\lambda_n = n(n+1), and natural boundary conditions of boundedness at x=±1x = \pm 1 (regular singular points).

TheoremOrthogonality and Norm

On [−1,1][-1,1] the Legendre polynomials satisfy

4
∫−11Pm(x) Pn(x) dx=22n+1 δmn,\quad \int_{-1}^{1} P_m(x)\,P_n(x)\,dx = \frac{2}{2n+1}\,\delta_{mn},

where δmn\delta_{mn} is the Kronecker delta. Derivation hint: orthogonality (the m≠nm\neq n case) follows from the Sturm–Liouville structure of [3]; the norm 2/(2n+1)2/(2n+1) follows from integrating Rodrigues' formula by parts nn times.

TheoremGenerating Function

For ∣t∣<1|t| < 1 and ∣x∣≤1|x| \le 1,

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

Derivation hint: this is the multipole expansion of 1/∣r−r′∣1/|\mathbf{r}-\mathbf{r}'| with x=cos⁡θx=\cos\theta, t=r</r>t = r_</r_>; expand the square root as a binomial/Taylor series in tt and collect powers.

TheoremCompleteness / Legendre Series

Every f∈L2[−1,1]f \in L^2[-1,1] has a convergent (in L2L^2 norm) expansion

6
f(x)=∑n=0∞cnPn(x),cn=2n+12∫−11f(x) Pn(x) dx.\quad f(x) = \sum_{n=0}^{\infty} c_n P_n(x), \qquad c_n = \frac{2n+1}{2}\int_{-1}^{1} f(x)\,P_n(x)\,dx.

Derivation hint: project ff onto each PnP_n using orthogonality [4]; the coefficient formula inverts to give cnc_n. Completeness follows from the Stone–Weierstrass theorem (polynomials are dense).

DefinitionThree-Term Recurrence

The polynomials satisfy

7
(n+1)Pn+1(x)=(2n+1) x Pn(x)−n Pn−1(x),\quad (n+1)P_{n+1}(x) = (2n+1)\,x\,P_n(x) - n\,P_{n-1}(x),

with P0=1P_0 = 1, P1=xP_1 = x. Derivation hint: differentiate the generating function [5] with respect to tt, multiply by (1−2xt+t2)(1-2xt+t^2), and equate coefficients of tnt^n.

Why It Holds / Derivation

ProofOrthogonality from the Sturm–Liouville Form

Step 1. Write Legendre's equation [3] in self-adjoint form: [(1−x2)Pn′]′=−n(n+1)Pn\big[(1-x^2)P_n'\big]' = -n(n+1)P_n.

Step 2. Multiply the equation for PnP_n by PmP_m and the equation for PmP_m by PnP_n:

Pm[(1−x2)Pn′]′=−n(n+1)PmPn,P_m\big[(1-x^2)P_n'\big]' = -n(n+1)P_mP_n,
Pn[(1−x2)Pm′]′=−m(m+1)PmPn.P_n\big[(1-x^2)P_m'\big]' = -m(m+1)P_mP_n.

Step 3. Subtract and integrate over [−1,1][-1,1]. The left side is a total derivative:

∫−11ddx[(1−x2)(PmPn′−PnPm′)]dx=[(1−x2)(PmPn′−PnPm′)]−11.\int_{-1}^{1}\frac{d}{dx}\Big[(1-x^2)(P_mP_n' - P_nP_m')\Big]dx = \big[(1-x^2)(P_mP_n'-P_nP_m')\big]_{-1}^{1}.

Step 4. The boundary term vanishes because (1−x2)=0(1-x^2)=0 at x=±1x=\pm1. Hence

[m(m+1)−n(n+1)]∫−11PmPn dx=0.\big[m(m+1) - n(n+1)\big]\int_{-1}^{1}P_mP_n\,dx = 0.

Step 5. For m≠nm\neq n the bracket m(m+1)−n(n+1)≠0m(m+1)-n(n+1)\neq0, forcing the integral to be zero. This proves the δmn\delta_{mn} structure in [4]. ■\blacksquare

∎
ProofNorm via Rodrigues' Formula

Step 1. Using [1], ∫−11Pn2 dx=1(2nn!)2∫−11dndxn(x2−1)n⋅dndxn(x2−1)n dx\int_{-1}^{1}P_n^2\,dx = \frac{1}{(2^n n!)^2}\int_{-1}^{1}\frac{d^n}{dx^n}(x^2-1)^n \cdot \frac{d^n}{dx^n}(x^2-1)^n\,dx.

Step 2. Integrate by parts nn times. Each boundary term vanishes because (x2−1)n(x^2-1)^n and its first n−1n-1 derivatives are zero at x=±1x=\pm1. This yields

∫−11Pn2 dx=(−1)n(2nn!)2∫−11(x2−1)n d2ndx2n(x2−1)n dx.\int_{-1}^{1}P_n^2\,dx = \frac{(-1)^n}{(2^n n!)^2}\int_{-1}^{1}(x^2-1)^n\,\frac{d^{2n}}{dx^{2n}}(x^2-1)^n\,dx.

Step 3. The 2n2n-th derivative of the degree-2n2n polynomial (x2−1)n(x^2-1)^n is the constant (2n)!(2n)!.

Step 4. Thus the integral becomes (−1)n(2n)!(2nn!)2∫−11(x2−1)n dx=(2n)!(2nn!)2∫−11(1−x2)n dx\frac{(-1)^n(2n)!}{(2^n n!)^2}\int_{-1}^{1}(x^2-1)^n\,dx = \frac{(2n)!}{(2^n n!)^2}\int_{-1}^{1}(1-x^2)^n\,dx.

Step 5. Using ∫−11(1−x2)n dx=22n+1(n!)2(2n+1)!\int_{-1}^{1}(1-x^2)^n\,dx = \frac{2^{2n+1}(n!)^2}{(2n+1)!} (a Beta-function integral), everything cancels to give 22n+1\frac{2}{2n+1}, confirming [4]. ■\blacksquare

∎
AL
Adrien-Marie Legendre
1752–1833

Legendre was a French mathematician who introduced these polynomials in 1782 while computing the gravitational attraction of spheroids ("Recherches sur l'attraction des sphéroïdes homogènes"). He recognized that the inverse-distance kernel could be expanded in a series whose coefficients are functions of the angle between two position vectors — these "Legendre coefficients" later bore his name. He also made foundational contributions to number theory (the law of quadratic reciprocity), elliptic integrals (the Legendre forms), and the method of least squares. Famously, the only authenticated portrait of him is a caricature, long mistaken for a different Legendre.

Building Intuition

🧠 Intuition

Think of the monomials 1,x,x2,x3,…1, x, x^2, x^3,\dots as a set of "directions" in function space that are not perpendicular — they overlap a lot (e.g. ∫−111⋅x2 dx≠0\int_{-1}^1 1\cdot x^2\,dx \neq 0). The Legendre polynomials are exactly what you get by running Gram–Schmidt orthogonalization on the monomials using the inner product ⟨f,g⟩=∫−11fg dx\langle f,g\rangle = \int_{-1}^1 fg\,dx. So PnP_n is "the part of xnx^n that is perpendicular to all lower-degree polynomials." Geometrically, expanding a function in Legendre series is like finding its coordinates along mutually perpendicular axes — and because the axes are orthogonal, each coordinate cnc_n is computed independently, with no interference. The oscillation count grows with nn: PnP_n has exactly nn real roots, all inside (−1,1)(-1,1), so higher-degree terms capture finer wiggles of ff, exactly like Fourier modes capture higher frequencies.

:::svg[The first four Legendre polynomials on [-1,1]. Note all pass through (1,1) and that P_n has exactly n roots in (-1,1).] -1 1 y=1 P0 P1 P2 P3 x

Worked Examples

ExampleExpanding f(x) = x² in Legendre Polynomials

Given: f(x)=x2f(x) = x^2 on [−1,1][-1,1]. Express it as ∑cnPn\sum c_n P_n.

Step 1. Since ff is degree 2, only P0,P1,P2P_0, P_1, P_2 can appear. Write x2=c0P0+c1P1+c2P2x^2 = c_0 P_0 + c_1 P_1 + c_2 P_2.

Step 2. Use the closed forms: P0=1P_0=1, P1=xP_1=x, P2=12(3x2−1)P_2=\frac{1}{2}(3x^2-1). Solve P2P_2 for x2x^2:

x2=2P2+13=23P2+13P0.x^2 = \frac{2P_2 + 1}{3} = \frac{2}{3}P_2 + \frac{1}{3}P_0.

Step 3. Verify with the projection formula [6]. For c2c_2: c2=52∫−11x2⋅12(3x2−1) dx=54∫−11(3x4−x2) dx=54(65−23)=54⋅815=23.c_2 = \frac{5}{2}\int_{-1}^1 x^2 \cdot \frac{1}{2}(3x^2-1)\,dx = \frac{5}{4}\int_{-1}^1(3x^4 - x^2)\,dx = \frac{5}{4}\left(\frac{6}{5} - \frac{2}{3}\right) = \frac{5}{4}\cdot\frac{8}{15} = \frac{2}{3}. ✓

Step 4. And c1=0c_1 = 0 by odd-symmetry, c0=12∫−11x2 dx=13c_0 = \frac{1}{2}\int_{-1}^1 x^2\,dx = \frac{1}{3}. ✓

x2=13P0(x)+23P2(x)\boxed{x^2 = \tfrac{1}{3}P_0(x) + \tfrac{2}{3}P_2(x)}

(dimensionless coefficients)

ExampleElectrostatic Potential via Multipole Expansion

Given: A point charge q=2×10−9 Cq = 2\times10^{-9}\,\text{C} sits on the zz-axis at distance a=0.10 ma = 0.10\,\text{m} from the origin. Find the potential at a field point at radius r=0.50 mr = 0.50\,\text{m}, angle θ=60∘\theta = 60^\circ from the zz-axis, keeping the dipole term.

Step 1. The exact potential is V=q4πε01∣r−a∣V = \frac{q}{4\pi\varepsilon_0}\frac{1}{|\mathbf{r}-\mathbf{a}|}. With ∣r−a∣=r2−2racos⁡θ+a2|\mathbf{r}-\mathbf{a}| = \sqrt{r^2 - 2ra\cos\theta + a^2}, factor out rr and set t=a/r=0.20t = a/r = 0.20, x=cos⁡60∘=0.5x=\cos60^\circ = 0.5.

Step 2. By the generating function [5]:

V=q4πε0r∑n=0∞(ar)nPn(cos⁡θ).V = \frac{q}{4\pi\varepsilon_0 r}\sum_{n=0}^\infty \left(\frac{a}{r}\right)^n P_n(\cos\theta).

Step 3. Compute terms with k=q4πε0r=(8.99×109)(2×10−9)0.50=35.96 Vk = \frac{q}{4\pi\varepsilon_0 r} = \frac{(8.99\times10^9)(2\times10^{-9})}{0.50} = 35.96\,\text{V}:

  • n=0n=0: P0=1P_0=1, term =k(1)(1)=35.96 V= k(1)(1) = 35.96\,\text{V}.
  • n=1n=1: P1(0.5)=0.5P_1(0.5)=0.5, term =k(0.20)(0.5)=3.596 V= k(0.20)(0.5) = 3.596\,\text{V}.

Step 4. Sum monopole + dipole: V≈35.96+3.60=39.56 VV \approx 35.96 + 3.60 = 39.56\,\text{V}.

V≈39.6 V\boxed{V \approx 39.6\,\text{V}}

(The next term, n=2n=2: P2(0.5)=−0.125P_2(0.5)=-0.125, contributes only k(0.04)(−0.125)≈−0.18k(0.04)(-0.125)\approx-0.18 V, so the expansion converges quickly.)

Common Misconceptions

⚠️ Common mistake

The normalization is NOT to unit norm. A frequent error is assuming ∫−11Pn2 dx=1\int_{-1}^1 P_n^2\,dx = 1. In fact it equals 22n+1\frac{2}{2n+1} — the Legendre polynomials are orthogonal but not orthonormal. If you need an orthonormal set, use P~n=2n+12 Pn\widetilde{P}_n = \sqrt{\frac{2n+1}{2}}\,P_n. Forgetting the 2n+12\frac{2n+1}{2} factor in the coefficient formula [6] is the single most common source of wrong Legendre series.

⚠️ Common mistake

Legendre polynomials live on [−1,1][-1,1], not arbitrary intervals. To expand a function on [a,b][a,b] you must first change variables: let x=2u−(a+b)b−ax = \frac{2u - (a+b)}{b-a} to map [a,b]→[−1,1][a,b]\to[-1,1], then apply the standard formulas. Skipping this rescaling destroys orthogonality.

Counterexample

One might guess that since PnP_n are "nice" polynomials, the Legendre series of any continuous function converges pointwise everywhere. False. Like Fourier series, Legendre series can fail to converge pointwise at points of discontinuity or even at isolated continuous points for badly behaved functions; near a jump discontinuity they exhibit a Gibbs phenomenon with overshoot. Convergence is guaranteed in the L2L^2 norm (by completeness [6]), and pointwise only under additional smoothness (e.g. piecewise C1C^1). The mere fact that the basis functions are smooth polynomials does not transfer smoothness to the partial sums of a rough target.

Connections

connection

Legendre polynomials sit at the center of a web of related ideas. They are the m=0m=0 case of the Associated Legendre Functions, which combine with eimϕe^{im\phi} to build the Spherical Harmonics YℓmY_\ell^m — the angular eigenfunctions on the sphere. They are a special case (α=β=0\alpha=\beta=0) of the Jacobi Polynomials and the limiting case (α→12\alpha\to\frac{1}{2}) of the Gegenbauer Polynomials. As orthogonal polynomials they belong to the general theory of Sturm-Liouville Theory, and their roots are the optimal nodes in Gaussian Quadrature. The expansion [6] is the analogue, for the interval [−1,1][-1,1], of Fourier Series on a circle, both being instances of eigenfunction expansions for self-adjoint operators in Hilbert Spaces.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1782: Adrien-Marie Legendre introduces the polynomials in his memoir on the attraction of spheroids, as coefficients in the expansion of the inverse-distance potential.
- 1785: Legendre publishes further results, establishing key properties and the connection to gravitational potentials.
- 1782–1799: Pierre-Simon Laplace develops spherical harmonics in the Mécanique Céleste, embedding Legendre's functions in the broader theory of harmonic analysis on the sphere.
- 1816: Olinde Rodrigues publishes the differentiation formula [1] (now called Rodrigues' formula) in his doctoral work.
- 1837: Charles Sturm and Joseph Liouville develop the general eigenvalue theory of second-order ODEs, retroactively explaining the orthogonality and completeness of PnP_n.
- 1814 / 1826: Gauss (1814) and later Jacobi (1826) develop Gaussian quadrature, identifying the roots of PnP_n as optimal integration nodes.
- 1875–1880s: Heine and others systematize the theory of orthogonal polynomials, placing Legendre polynomials within a general framework.
- 1885: Edward Heine's treatise consolidates results on spherical and Legendre functions.
- 20th century: With the rise of quantum mechanics (1920s) and digital computation (1950s onward), Legendre polynomials become indispensable in physics and numerical analysis; modern stable algorithms (e.g. via the recurrence [7]) make Gauss–Legendre quadrature routine.

Subtleties & Limits

open-problem

While the theory of Legendre polynomials on [−1,1][-1,1] is classically complete, several research-adjacent subtleties persist. (1) Efficient computation of high-order Gauss–Legendre nodes: classical Newton iteration on PnP_n becomes ill-conditioned for very large nn; asymptotic-expansion-based methods (Bogaert, 2014) achieving O(1)O(1) work per node are still being refined. (2) Optimal convergence rates of Legendre spectral methods for PDEs with corner singularities, and how to mitigate the Gibbs phenomenon via filtering or reprojection (e.g. Gegenbauer reconstruction). (3) Sharp Lebesgue-constant and pointwise-convergence estimates for Legendre series of functions of limited regularity remain an active topic in approximation theory. These are practical/analytical refinements rather than open foundational questions — the existence, orthogonality, and completeness are fully settled.

See Also

Associated Legendre Functions · Spherical Harmonics · Jacobi Polynomials · Gegenbauer Polynomials · Chebyshev Polynomials · Hermite Polynomials · Sturm-Liouville Theory · Gaussian Quadrature · Fourier Series · Laplace's Equation