Unit 7, lesson 41

Legendre's Equation and Orthogonal Polynomials

How the series solution of Legendre's equation terminates in Legendre polynomials, how the standard normalization fixes their scale, and why they are orthogonal eigenfunctions of a boundedness problem.

  • Video 41
  • Bessel and Legendre Functions

Separating Laplace’s equation in spherical coordinates, for a solution that does not depend on the longitude, leaves an equation in the polar angle θ\theta, and the substitution x=cos⁡θx = \cos\theta places it on the interval −1≤x≤1-1 \le x \le 1 with the two poles at the ends. That equation has singular points exactly at the poles, and for most values of its parameter every nonzero solution is unbounded near at least one of them. This lesson shows how special parameter values make a series solution stop as a polynomial, builds the cubic Legendre polynomial, and explains why Legendre polynomials of different degrees are orthogonal.

Key terms

Legendre’s equation

Definition Let λ\lambda be a real constant. Legendre’s equation is

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

where xx is the independent variable and y′=dy/dxy' = dy/dx. The parameter is usually written λ=n(n+1)\lambda = n(n + 1), and the case of an integer n≥0n \ge 0 is the important one. Since ((1−x2)y′)′=(1−x2)y′′−2xy′((1 - x^2)y')' = (1 - x^2)y'' - 2xy', the equation has the self-adjoint form

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

The leading coefficient vanishes only at x=±1x = \pm 1, so (−1,1)(-1, 1) is a regular interval and x=0x = 0 is an ordinary point. A power series solution about 00 therefore converges at least for ∣x∣<1\lvert x \rvert < 1, the distance to the nearest singular point. The endpoints are regular singular points. Near x=1x = 1 the normalized coefficients p(x)=−2x/(1−x2)p(x) = -2x/(1 - x^2) and q(x)=λ/(1−x2)q(x) = \lambda/(1 - x^2) give (x−1) p(x)=2x/(1+x)(x - 1)\,p(x) = 2x/(1 + x) and (x−1)2q(x)=−λ(x−1)/(1+x)(x - 1)^2q(x) = -\lambda(x - 1)/(1 + x), both analytic at 11, and the indicial equation is r2=0r^2 = 0. Because of this repeated root, only the multiples of one solution stay bounded near x=1x = 1, and every other solution grows like a logarithm there. Replacing xx by −x-x leaves the equation unchanged, so the same holds at x=−1x = -1.

In plain words Legendre’s equation is a second-order linear equation that behaves well strictly inside the interval from −1-1 to 11 and becomes singular at its two ends. At each end, the solutions that stay finite form a single family of multiples.

Example Let Θ(θ)\Theta(\theta) be a function of the polar angle with 0<θ<π0 < \theta < \pi, and set x=cos⁡θx = \cos\theta and y(x)=Θ(θ)y(x) = \Theta(\theta). The chain rule gives dΘ/dθ=−sin⁡θ y′(x)d\Theta/d\theta = -\sin\theta\,y'(x), so sin⁡θ dΘ/dθ=−(1−x2) y′\sin\theta\,d\Theta/d\theta = -(1 - x^2)\,y'. Differentiating once more in θ\theta and dividing by sin⁡θ\sin\theta gives

1sin⁡θ ddθ(sin⁡θ dΘdθ)=((1−x2) y′)′.\begin{aligned} &\frac{1}{\sin\theta}\,\frac{d}{d\theta}\left(\sin\theta\,\frac{d\Theta}{d\theta}\right) \\[0.4em] &\quad = \bigl((1 - x^2)\,y'\bigr)'. \end{aligned}

The angular equation from separating Laplace’s equation sets this expression plus λΘ\lambda\Theta equal to 00, so it is Legendre’s equation in the variable xx. The poles θ=0\theta = 0 and θ=π\theta = \pi become the singular points x=1x = 1 and x=−1x = -1. For instance y=xy = x, which is Θ=cos⁡θ\Theta = \cos\theta, solves the equation with λ=2\lambda = 2, since (1−x2)⋅0−2x+2x=0(1 - x^2) \cdot 0 - 2x + 2x = 0.

Polynomial termination

Definition Substitute a power series y=∑akxky = \sum a_k x^k about the ordinary point x=0x = 0. The coefficient of xkx^k collects (k+2)(k+1)ak+2(k + 2)(k + 1)a_{k+2} from y′′y'', then −k(k−1)ak-k(k - 1)a_k from −x2y′′-x^2y'', −2kak-2ka_k from −2xy′-2xy' and λak\lambda a_k, so

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

for k≥0k \ge 0, with a0a_0 and a1a_1 free. The even coefficients form one chain and the odd coefficients another. If λ=n(n+1)\lambda = n(n + 1) for an integer n≥0n \ge 0, the numerator is zero at k=nk = n, so an+2=0a_{n+2} = 0 and every later coefficient with the parity of nn vanishes. That chain terminates, and with a nonzero first coefficient it gives a polynomial of degree nn. The other chain never terminates when its first coefficient is nonzero, because k(k+1)=n(n+1)k(k + 1) = n(n + 1) has no other solution with k≥0k \ge 0. The ratio ak+2/aka_{k+2}/a_k along it tends to 11, so it is an infinite series with radius of convergence exactly 11. Its sum is not a multiple of the polynomial, so by the endpoint analysis above it is unbounded as x→1x \to 1, and by its parity also as x→−1x \to -1. Hence for λ=n(n+1)\lambda = n(n + 1) the polynomial solutions are exactly the multiples of one polynomial of degree nn. For any other λ\lambda the numerator is never zero, so neither chain terminates and no nonzero solution is a polynomial. Here nn is the degree of a polynomial, while the differential equation has order 22 for every nn.

In plain words Each coefficient is the one two steps earlier times a factor, and for λ=n(n+1)\lambda = n(n + 1) that factor becomes zero when the index reaches nn. From there on the chain of that parity is stuck at zero and the series ends. The other chain is not affected and runs on forever.

Example For n=1n = 1, so λ=2\lambda = 2, the odd chain stops at once and gives y=xy = x. The even chain with a0=1a_0 = 1 has the factor (k−1)(k+2)/((k+2)(k+1))=(k−1)/(k+1)(k - 1)(k + 2)/((k + 2)(k + 1)) = (k - 1)/(k + 1), so

y=1−x2−x43−x65−⋯ ,y = 1 - x^2 - \frac{x^4}{3} - \frac{x^6}{5} - \cdots,

and for −1<x<1-1 < x < 1 this sum equals

1−x2ln⁡1+x1−x,1 - \frac{x}{2}\ln\frac{1 + x}{1 - x},

which tends to −∞-\infty both as x→1x \to 1 and as x→−1x \to -1.

Legendre polynomials

Definition For an integer n≥0n \ge 0, the Legendre polynomial PnP_n is the polynomial solution of degree nn of Legendre’s equation with λ=n(n+1)\lambda = n(n + 1), scaled so that Pn(1)=1P_n(1) = 1. It is also given by Rodrigues’ formula

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

The first five are

P0(x)=1,P1(x)=x,P2(x)=3x2−12,P3(x)=5x3−3x2,P4(x)=35x4−30x2+38.\begin{gathered} P_0(x) = 1, \quad P_1(x) = x, \\[0.4em] P_2(x) = \frac{3x^2 - 1}{2}, \\[0.4em] P_3(x) = \frac{5x^3 - 3x}{2}, \\[0.4em] P_4(x) = \frac{35x^4 - 30x^2 + 3}{8}. \end{gathered}

Each PnP_n contains only powers with the parity of nn, so Pn(−x)=(−1)nPn(x)P_n(-x) = (-1)^nP_n(x) and Pn(−1)=(−1)nP_n(-1) = (-1)^n. Each PnP_n has degree exactly nn, so P0,…,PnP_0, \dots, P_n span all polynomials of degree at most nn.

In plain words The Legendre polynomials are the terminating solutions, one for each degree, all scaled to equal 11 at x=1x = 1. Even degrees give even polynomials and odd degrees give odd ones.

Example Build P3P_3. Here λ=12\lambda = 12, and the odd chain is the one that stops, so take a0=0a_0 = 0. At k=1k = 1 the factor is (2−12)/6=−53(2 - 12)/6 = -\tfrac{5}{3}, so a3=−53a1a_3 = -\tfrac{5}{3}a_1, and at k=3k = 3 the factor is (12−12)/20=0(12 - 12)/20 = 0, so a5=0a_5 = 0. The solution is a1(x−53x3)a_1(x - \tfrac{5}{3}x^3), whose value at x=1x = 1 is −23a1-\tfrac{2}{3}a_1. Setting this equal to 11 gives a1=−32a_1 = -\tfrac{3}{2}, so

P3(x)=5x3−3x2.P_3(x) = \frac{5x^3 - 3x}{2}.

To check, P3′=(15x2−3)/2P_3' = (15x^2 - 3)/2 and P3′′=15xP_3'' = 15x. In (1−x2)P3′′−2xP3′+12P3(1 - x^2)P_3'' - 2xP_3' + 12P_3 the coefficient of xx is 15+3−18=015 + 3 - 18 = 0 and the coefficient of x3x^3 is −15−15+30=0-15 - 15 + 30 = 0.

Standard normalization

Definition The standard normalization of the Legendre polynomials is Pn(1)=1P_n(1) = 1. It is always possible, because a nonzero polynomial solution pp of the equation with λ=n(n+1)\lambda = n(n + 1) cannot vanish at x=1x = 1. Differentiating the equation mm times and setting x=1x = 1 gives

p(m+1)(1)=cm p(m)(1),cm=(n−m)(n+m+1)2(m+1),\begin{aligned} p^{(m+1)}(1) &= c_m\,p^{(m)}(1), \\[0.4em] c_m &= \frac{(n - m)(n + m + 1)}{2(m + 1)}, \end{aligned}

so p(1)=0p(1) = 0 would make every derivative of pp vanish at 11, and the only polynomial with that property is zero. The case m=0m = 0 also gives Pn′(1)=n(n+1)/2P_n'(1) = n(n + 1)/2. This normalization fixes a value, not a size. The squared integral norm of PnP_n is

∫−11Pn(x)2 dx=22n+1,\int_{-1}^{1} P_n(x)^2\,dx = \frac{2}{2n + 1},

so the rescaled polynomials (2n+1)/2 Pn\sqrt{(2n + 1)/2}\,P_n are the ones with norm 11. Both scalings are in use, and a formula for expansion coefficients depends on which one is meant.

In plain words A solution can be multiplied by any constant, so a scale has to be chosen. The standard choice makes every Legendre polynomial equal 11 at x=1x = 1, which is the pole θ=0\theta = 0. Having the value 11 at an endpoint is a different thing from having integral size 11.

Example For P3P_3 the normalization gave a1=−32a_1 = -\tfrac{3}{2}, and then P3(1)=1P_3(1) = 1, P3(−1)=−1P_3(-1) = -1 and P3′(1)=6=12/2P_3'(1) = 6 = 12/2. Since P32=(25x6−30x4+9x2)/4P_3^2 = (25x^6 - 30x^4 + 9x^2)/4 and ∫−11x2j dx=2/(2j+1)\int_{-1}^{1} x^{2j}\,dx = 2/(2j + 1),

∫−11P32 dx=14(507−12+6)=27.\begin{aligned} \int_{-1}^{1} P_3^2\,dx &= \frac{1}{4}\left(\frac{50}{7} - 12 + 6\right) \\[0.4em] &= \frac{2}{7}. \end{aligned}

So the version of norm 11 is 7/2 P3\sqrt{7/2}\,P_3, whose value at x=1x = 1 is 7/2≈1.87\sqrt{7/2} \approx 1.87 rather than 11.

Orthogonality of Legendre polynomials

Definition Use the inner product ⟨f,g⟩=∫−11f(x) g(x) dx\langle f, g \rangle = \int_{-1}^{1} f(x)\,g(x)\,dx, which has weight 11. For integers m,n≥0m, n \ge 0 with m≠nm \ne n,

∫−11Pm(x) Pn(x) dx=0.\int_{-1}^{1} P_m(x)\,P_n(x)\,dx = 0.

The reason is the self-adjoint form. Write λk=k(k+1)\lambda_k = k(k + 1) and B(x)=(1−x2)(PnPm′−PmPn′)B(x) = (1 - x^2)(P_nP_m' - P_mP_n'). Multiplying the equation for PmP_m by PnP_n, the equation for PnP_n by PmP_m, and subtracting shows that B′B' equals (λn−λm)PmPn(\lambda_n - \lambda_m)P_mP_n, so

(λn−λm)∫−11PmPn dx=B(1)−B(−1).\begin{aligned} &(\lambda_n - \lambda_m)\int_{-1}^{1} P_mP_n\,dx \\[0.4em] &\quad = B(1) - B(-1). \end{aligned}

Both B(1)B(1) and B(−1)B(-1) are zero, because 1−x21 - x^2 vanishes at the ends and the polynomials and their derivatives are finite there. Since k(k+1)k(k + 1) is strictly increasing for k≥0k \ge 0, the factor λn−λm\lambda_n - \lambda_m is not zero, and the integral must vanish. It follows that PnP_n is orthogonal to every polynomial of degree less than nn. Together with the norm 2/(2n+1)2/(2n + 1), orthogonality shows that if f=∑k=0NckPkf = \sum_{k=0}^{N} c_kP_k, then for each n≤Nn \le N

cn=2n+12∫−11f(x) Pn(x) dx.c_n = \frac{2n + 1}{2}\int_{-1}^{1} f(x)\,P_n(x)\,dx.

In plain words The integral of a product measures how much two functions overlap on the interval from −1-1 to 11. Different Legendre polynomials have zero overlap, so the amount of each PnP_n in a combination can be read off with one integral, without interference from the others.

Example The product xP3(x)xP_3(x) is (5x4−3x2)/2(5x^4 - 3x^2)/2. With ∫−11x4 dx=25\int_{-1}^{1} x^4\,dx = \tfrac{2}{5} and ∫−11x2 dx=23\int_{-1}^{1} x^2\,dx = \tfrac{2}{3}, the two terms give 5⋅25=25 \cdot \tfrac{2}{5} = 2 and 3⋅23=23 \cdot \tfrac{2}{3} = 2, so

∫−11xP3 dx=12(2−2)=0.\int_{-1}^{1} xP_3\,dx = \frac{1}{2}(2 - 2) = 0.

For an expansion, take f(x)=x3f(x) = x^3. It is odd and of degree 33, so only P1P_1 and P3P_3 can appear. The formula gives c1=32∫−11x4 dx=35c_1 = \tfrac{3}{2}\int_{-1}^{1} x^4\,dx = \tfrac{3}{5} and c3=72∫−11x3P3 dx=72⋅435=25c_3 = \tfrac{7}{2}\int_{-1}^{1} x^3P_3\,dx = \tfrac{7}{2} \cdot \tfrac{4}{35} = \tfrac{2}{5}, so

x3=35 P1(x)+25 P3(x),x^3 = \frac{3}{5}\,P_1(x) + \frac{2}{5}\,P_3(x),

which checks, since 35x+15(5x3−3x)=x3\tfrac{3}{5}x + \tfrac{1}{5}(5x^3 - 3x) = x^3.

Legendre polynomials as eigenfunctions

Definition The Legendre eigenvalue problem asks for the numbers λ\lambda for which

((1−x2) y′)′+λy=0\bigl((1 - x^2)\,y'\bigr)' + \lambda y = 0

has a nonzero solution yy on −1<x<1-1 < x < 1 that stays bounded as x→1−x \to 1^- and as x→−1+x \to -1^+. Such a λ\lambda is an eigenvalue and such a yy an eigenfunction. The eigenvalues are exactly λ=n(n+1)\lambda = n(n + 1) with n=0,1,2,…n = 0, 1, 2, \dots, and the eigenfunctions for λ=n(n+1)\lambda = n(n + 1) are the nonzero multiples of PnP_n. This is a singular Sturm-Liouville problem. The coefficient 1−x21 - x^2 of the derivative term vanishes at both endpoints, the weight is 11, and the boundedness requirements take the place of boundary conditions. For λ=n(n+1)\lambda = n(n + 1), the solutions bounded near x=1x = 1 are the multiples of PnP_n, and PnP_n is bounded near x=−1x = -1 as well. For every other real λ\lambda, a standard result on the endpoint behavior of Legendre functions shows that every nonzero solution bounded near x=1x = 1 is unbounded as x→−1+x \to -1^+, so no eigenfunction exists. The orthogonality of PmP_m and PnP_n is the usual orthogonality of eigenfunctions with different eigenvalues, and the boundary term vanishes because 1−x21 - x^2 does.

In plain words Asking for a solution that is finite at both poles is only possible for the special values λ=n(n+1)\lambda = n(n + 1), and then the solution is a multiple of PnP_n. That is why the Legendre polynomials are the angular building blocks of axially symmetric problems on a whole sphere.

Example For λ=6\lambda = 6 the eigenfunctions are the nonzero multiples of P2P_2. In the angle form, Θ(θ)=P2(cos⁡θ)=(3cos⁡2θ−1)/2\Theta(\theta) = P_2(\cos\theta) = (3\cos^2\theta - 1)/2 has sin⁡θ dΘ/dθ=−3sin⁡2θcos⁡θ\sin\theta\,d\Theta/d\theta = -3\sin^2\theta\cos\theta, whose derivative in θ\theta is

3sin⁡3θ−6sin⁡θcos⁡2θ=sin⁡θ (3−9cos⁡2θ).\begin{aligned} &3\sin^3\theta - 6\sin\theta\cos^2\theta \\[0.4em] &\quad = \sin\theta\,(3 - 9\cos^2\theta). \end{aligned}

Dividing by sin⁡θ\sin\theta gives 3−9cos⁡2θ=−6Θ3 - 9\cos^2\theta = -6\Theta, so the angular equation holds with λ=6\lambda = 6, and Θ\Theta is finite at both poles. By contrast, λ=5\lambda = 5 lies strictly between the eigenvalues 22 and 66. Neither chain of the series terminates, and no nonzero solution is bounded at both poles.

Check yourself

  1. Use the recurrence with n=2n = 2 to construct P2P_2, and check that it satisfies Legendre’s equation.
Show the answer

Here λ=6\lambda = 6, and the even chain is the one that stops, so take a1=0a_1 = 0. At k=0k = 0 the factor is (0−6)/2=−3(0 - 6)/2 = -3, so a2=−3a0a_2 = -3a_0, and at k=2k = 2 it is (6−6)/12=0(6 - 6)/12 = 0, so a4=0a_4 = 0. The solution is a0(1−3x2)a_0(1 - 3x^2), whose value at x=1x = 1 is −2a0-2a_0. Setting this equal to 11 gives a0=−12a_0 = -\tfrac{1}{2}, so

P2(x)=3x2−12.P_2(x) = \frac{3x^2 - 1}{2}.

With P2′=3xP_2' = 3x and P2′′=3P_2'' = 3, the left side of the equation is (1−x2)⋅3−2x⋅3x+3(3x2−1)(1 - x^2) \cdot 3 - 2x \cdot 3x + 3(3x^2 - 1), which equals 3−3x2−6x2+9x2−3=03 - 3x^2 - 6x^2 + 9x^2 - 3 = 0.

  1. Write x2x^2 as a combination of Legendre polynomials, computing the coefficients with orthogonality.
Show the answer

Since x2x^2 has degree 22, it is c0P0+c1P1+c2P2c_0P_0 + c_1P_1 + c_2P_2 with cn=2n+12∫−11x2Pn dxc_n = \tfrac{2n + 1}{2}\int_{-1}^{1} x^2P_n\,dx. The first coefficient is c0=12⋅23=13c_0 = \tfrac{1}{2} \cdot \tfrac{2}{3} = \tfrac{1}{3}, and c1=32∫−11x3 dx=0c_1 = \tfrac{3}{2}\int_{-1}^{1} x^3\,dx = 0 because the integrand is odd. The last one is

c2=54∫−11(3x4−x2) dx=54(65−23)=23.\begin{aligned} c_2 &= \frac{5}{4}\int_{-1}^{1} (3x^4 - x^2)\,dx \\[0.4em] &= \frac{5}{4}\left(\frac{6}{5} - \frac{2}{3}\right) = \frac{2}{3}. \end{aligned}

So x2=13+23P2(x)x^2 = \tfrac{1}{3} + \tfrac{2}{3}P_2(x), and indeed 13+13(3x2−1)=x2\tfrac{1}{3} + \tfrac{1}{3}(3x^2 - 1) = x^2.

  1. Compute ∫01P1(x) P2(x) dx\int_0^1 P_1(x)\,P_2(x)\,dx. Does the result contradict the orthogonality of Legendre polynomials, and which step of the proof fails on [0,1][0, 1]?
Show the answer

The integral is

∫013x3−x2 dx=12(34−12)=18.\begin{aligned} \int_0^1 \frac{3x^3 - x}{2}\,dx &= \frac{1}{2}\left(\frac{3}{4} - \frac{1}{2}\right) \\[0.4em] &= \frac{1}{8}. \end{aligned}

There is no contradiction. Orthogonality is a statement about the interval [−1,1][-1, 1], where this odd integrand integrates to 00. On [0,1][0, 1] the identity from the proof reads (λ2−λ1)∫01P1P2 dx=B(1)−B(0)(\lambda_2 - \lambda_1)\int_0^1 P_1P_2\,dx = B(1) - B(0) with B(x)=(1−x2)(P2P1′−P1P2′)B(x) = (1 - x^2)(P_2P_1' - P_1P_2'). The factor 1−x21 - x^2 still makes B(1)=0B(1) = 0, but at x=0x = 0 it equals 11, and B(0)=P2(0)⋅1−0=−12B(0) = P_2(0) \cdot 1 - 0 = -\tfrac{1}{2}. Both sides equal 12\tfrac{1}{2}, since 4⋅18=124 \cdot \tfrac{1}{8} = \tfrac{1}{2}, so the step that fails is the vanishing of the boundary term at the left end.

How this lesson connects