JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Legendre's Equation & Legendre Polynomials

Whenever a physics problem has spherical symmetry, the same little equation appears — and for the right parameters its series solution miraculously stops, becoming a polynomial. Meet the Legendre polynomials, their orthogonality, and why they run the show in electrostatics and the hydrogen atom.

Where this equation comes from

Earlier in this rung you learned to attack an ODE that has no closed-form answer by writing the solution as a power series and grinding out its coefficients one by one. Legendre's equation is the showcase problem for that method, and it earns its fame honestly: it is the equation you cannot avoid the moment a problem lives on a sphere. Write it as (1 - x^2) y'' - 2x y' + l(l+1) y = 0, where l is a constant you get to dial. The strange-looking combination l(l+1) is not an accident — it is exactly the shape that falls out of the geometry, as we will see.

Here is the short version of how it arises. Take Laplace's equation, nabla^2 V = 0, the master equation of electrostatics and gravity, and write it in spherical coordinates. Then use separation of variables — split the unknown into a product of a radial piece, a polar-angle piece, and an azimuthal piece. The radial and azimuthal parts come out easily; the polar-angle part, after the substitution x = cos(theta), is Legendre's equation exactly. So x here is not a length — it is the cosine of the angle from the north pole, and it lives on the interval from -1 to +1.

Solving by series — and a happy accident

The point x = 0 is an ordinary point of the equation (nothing blows up there), so the plain power-series method applies — no need for the heavier Frobenius machinery you met for singular points. Substitute y = sum of a_k x^k, plug into (1 - x^2) y'' - 2x y' + l(l+1) y = 0, and collect powers of x. After lining up the indices you are left with a two-term recurrence relation linking a_{k+2} back to a_k: a_{k+2} = a_k times [k(k+1) - l(l+1)] / [(k+1)(k+2)]. Choosing a_0 and a_1 freely gives the two independent solutions any second-order equation must have.

Now look hard at that recurrence and watch the magic. The numerator is k(k+1) - l(l+1). The instant k equals l, that factor is exactly zero — so a_{l+2} = 0, and then a_{l+4} = 0, and the whole tail of the series collapses to nothing. If l is a non-negative integer, one of the two series simply terminates: it stops being an infinite series and becomes an honest polynomial of degree l. That is the happy accident at the heart of the subject. Normalize each such polynomial so that its value at x = 1 is 1, and you have the Legendre polynomials P_l(x).

Recurrence:  a_{k+2} = a_k * [ k(k+1) - l(l+1) ] / [ (k+1)(k+2) ]

Numerator vanishes when k = l  =>  series stops at degree l.

First few Legendre polynomials (normalized P_l(1) = 1):
  P_0(x) = 1
  P_1(x) = x
  P_2(x) = (1/2)(3 x^2 - 1)
  P_3(x) = (1/2)(5 x^3 - 3 x)
  P_4(x) = (1/8)(35 x^4 - 30 x^2 + 3)
The recurrence cuts the series off at degree l; the resulting polynomials, normalized to P_l(1) = 1, are the Legendre polynomials.

Be honest about the other solution, though. For each integer l only ONE of the two series terminates; the partner solution (called Q_l, a Legendre function of the second kind) stays an infinite series and blows up at x = +1 and x = -1 — exactly the north and south poles. Physics throws it away because real potentials must stay finite there. So the polynomials are not the whole story; they are the half that survives the demand of finiteness.

Three faces of the same object

Once a special function settles in, mathematicians collect different ways to summon it, and each face is useful for a different job. The series-and-recurrence face we just built is good for proving things term by term. A second face is the Rodrigues formula, a single tidy expression: P_l(x) = (1 / (2^l l!)) times the l-th derivative of (x^2 - 1)^l. Differentiate (x^2 - 1)^l exactly l times, scale by the constant, and the polynomial pops out whole — no recurrence bookkeeping required.

The third face is a generating function, and it is the one physicists secretly love most: 1 / sqrt(1 - 2 x t + t^2) = sum over l of P_l(x) t^l. Pack all the Legendre polynomials into the coefficients of a single power series in t. This is not a coincidence dressed up as a formula — that left-hand side IS the inverse-distance 1/|r - r'| that appears in every electrostatics problem, expanded in powers of the distance ratio. So the generating function is literally the statement 'the potential of a point charge, written out in spherical harmonics.' Three faces — series, Rodrigues, generating function — and all three describe the same family P_l(x).

Orthogonality: the property that makes them useful

The single most important fact about these polynomials is that they are mutually orthogonal on the interval from -1 to +1. Concretely: the definite integral from -1 to 1 of P_m(x) P_n(x) dx is zero whenever m and n differ, and equals 2/(2n+1) when m = n. Think of each P_l as a 'direction' in an infinite-dimensional space of functions, and this integral as a dot product; orthogonality says the directions are mutually perpendicular, like the x, y, z axes. That perpendicularity is not luck — it follows because Legendre's equation is a Sturm-Liouville problem, and such problems always hand you an orthogonal family of solutions.

Why does orthogonality matter so much? Because it lets you take ANY reasonable function f(x) on -1 to 1 and write it as a Legendre series: f(x) = sum over l of c_l P_l(x). To find a particular coefficient c_n you do not solve a giant linear system — you just project, exactly as you would read off the x-component of a vector by dotting it with the x-axis. Multiply both sides by P_n(x), integrate from -1 to 1, and every term on the right vanishes by orthogonality except the n-th. What survives gives c_n = [(2n+1)/2] times the integral from -1 to 1 of f(x) P_n(x) dx. One integral per coefficient, each computed independently. This is the same idea as a Fourier series — sines and cosines were one orthogonal family, Legendre polynomials are another suited to the sphere.

Where they actually appear

Start with electrostatics, the home turf. Suppose you know the voltage on the surface of a sphere as a function of latitude, and you want the potential everywhere outside. The recipe is mechanical once you have Legendre polynomials. Expand the boundary data as a Legendre series in cos(theta); pair each P_l(cos theta) with the radial solution r^l (inside) or 1/r^{l+1} (outside) that the separated radial equation supplied; add them up. The l = 0 term is the monopole (total charge), l = 1 is the dipole, l = 2 the quadrupole — the famous multipole expansion is nothing but a Legendre series in angle, with the radial powers attached.

  1. Separate Laplace's equation in spherical coordinates; the polar-angle factor, with x = cos(theta), obeys Legendre's equation.
  2. Demand the solution stay finite at the poles x = +1 and x = -1; this forces l to be a non-negative integer and selects P_l, discarding the divergent partner Q_l.
  3. Match the boundary data by expanding it as a Legendre series; project with the orthogonality integral to read off each coefficient.
  4. Attach each angular term P_l(cos theta) to its radial partner (r^l inside, 1/r^{l+1} outside) and sum — that is the full potential.

Now the deeper appearance: the hydrogen atom. Schrodinger's equation for an electron bound to a proton is again a problem with spherical symmetry, so it separates the same way, and the polar-angle factor is again governed by Legendre's equation (its associated cousin, to be precise, once the azimuthal index enters). The integer l that made the series terminate is exactly the quantum number of orbital angular momentum, and the combination l(l+1) is, up to constants, the eigenvalue of the angular-momentum-squared operator. The reason an electron's angular momentum is quantized in whole-number steps is the very same reason the Legendre series had to stop: only integer l keeps the wavefunction finite at the poles. The shapes you have seen labeled s, p, d, f orbitals are pictures of P_l and its associated relatives.

The pattern to carry forward

Step back and notice the shape of what just happened, because the next guides repeat it almost verbatim with Bessel and Hermite. A physical problem with a symmetry forces a particular ODE. Solving it by series produces a recurrence; a quantization condition (here, l a non-negative integer) makes the series terminate or stay well-behaved; the surviving solutions form an orthogonal family; and that orthogonality turns 'expand any function in this basis' into a routine of one projection integral per coefficient. Legendre is the cleanest first instance of this machine because its solutions are honest polynomials.

One honest caveat to keep you grounded: the termination into polynomials is a privilege of integer l. For non-integer l the Legendre equation still has perfectly good solutions, but they are genuine infinite series (Legendre functions, not polynomials) that generally misbehave at the poles. The clean polynomial world you have been touring exists precisely because physics, by demanding finiteness on a closed sphere, selects the integer values — geometry quietly choosing arithmetic. That selection principle, not the polynomials alone, is the real lesson.