Mathwords logoMathwords

Legendre Polynomial — Definition, Formula & Examples

Legendre polynomials are a sequence of orthogonal polynomials Pn(x)P_n(x) that arise as solutions to Legendre's differential equation on the interval [1,1][-1, 1]. They appear frequently in physics and engineering, especially in problems with spherical symmetry.

The Legendre polynomial Pn(x)P_n(x) of degree nn is the polynomial solution to the ordinary differential equation (1x2)y2xy+n(n+1)y=0(1 - x^2)y'' - 2xy' + n(n+1)y = 0 that satisfies Pn(1)=1P_n(1) = 1. The set {Pn}n=0\{P_n\}_{n=0}^{\infty} forms a complete orthogonal system on L2([1,1])L^2([-1,1]) with respect to the weight function w(x)=1w(x) = 1.

Key Formula

Pn(x)=12nn!dndxn[(x21)n]P_n(x) = \frac{1}{2^n\, n!} \frac{d^n}{dx^n}\left[(x^2 - 1)^n\right]
Where:
  • nn = Non-negative integer degree of the polynomial
  • xx = Real variable, typically in $[-1, 1]$
  • dndxn\frac{d^n}{dx^n} = The $n$-th derivative with respect to $x$

How It Works

You can generate any Legendre polynomial using Rodrigues' formula. The first few are P0(x)=1P_0(x) = 1, P1(x)=xP_1(x) = x, P2(x)=12(3x21)P_2(x) = \tfrac{1}{2}(3x^2 - 1), and P3(x)=12(5x33x)P_3(x) = \tfrac{1}{2}(5x^3 - 3x). Their key property is orthogonality: 11Pm(x)Pn(x)dx=0\int_{-1}^{1} P_m(x)\,P_n(x)\,dx = 0 whenever mnm \neq n. This lets you expand an arbitrary function on [1,1][-1,1] as a series of Legendre polynomials, analogous to a Fourier series. You can also build each polynomial from the previous two using Bonnet's recurrence: (n+1)Pn+1(x)=(2n+1)xPn(x)nPn1(x)(n+1)P_{n+1}(x) = (2n+1)\,x\,P_n(x) - n\,P_{n-1}(x).

Worked Example

Problem: Use Rodrigues' formula to find P₂(x).
Step 1: Write the expression inside the derivative for n=2n = 2.
(x21)2=x42x2+1(x^2 - 1)^2 = x^4 - 2x^2 + 1
Step 2: Take the first derivative.
ddx(x42x2+1)=4x34x\frac{d}{dx}(x^4 - 2x^2 + 1) = 4x^3 - 4x
Step 3: Take the second derivative.
d2dx2(x42x2+1)=12x24\frac{d^2}{dx^2}(x^4 - 2x^2 + 1) = 12x^2 - 4
Step 4: Apply the prefactor 1222!=18\frac{1}{2^2 \cdot 2!} = \frac{1}{8}.
P2(x)=18(12x24)=3x212P_2(x) = \frac{1}{8}(12x^2 - 4) = \frac{3x^2 - 1}{2}
Answer: P2(x)=12(3x21)P_2(x) = \dfrac{1}{2}(3x^2 - 1)

Why It Matters

Legendre polynomials are essential in solving Laplace's equation in spherical coordinates, which appears throughout electrostatics, gravitational theory, and quantum mechanics. In courses like mathematical physics or numerical analysis, they also form the basis of Gauss–Legendre quadrature, one of the most efficient methods for numerical integration.

Common Mistakes

Mistake: Forgetting the normalization factor 12nn!\frac{1}{2^n n!} in Rodrigues' formula.
Correction: Without this prefactor the polynomial will not satisfy Pn(1)=1P_n(1) = 1. Always include the 12nn!\frac{1}{2^n n!} term when computing from derivatives.