Legendre polynomials – recurrence relations & ODE

Required math: calculus

Required physics: none

The Legendre polynomials can be obtained either from an expansion of the simple cosine rule for triangles or from a solution of Legendre’s differential equation. We’ve seen how both these methods work in other posts, but we need to prove that the polynomials obtained in the two cases really are the same. That’s the objective of this post, although on the way we’ll derive a few interesting recurrence relations that relate the polynomials and their derivatives to each other.

The starting point of the derivation of the polynomials from the cosine rule was the Taylor expansion

\displaystyle   g(x,t) \displaystyle  = \displaystyle  (1+t^{2}-2xt)^{-1/2}\ \ \ \ \ (1)
\displaystyle  \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}P_{n}(x)t^{n} \ \ \ \ \ (2)

By taking the derivative with respect to {t}, we get

\displaystyle   \frac{\partial g}{\partial t} \displaystyle  = \displaystyle  \frac{x-t}{(1+t^{2}-2xt)^{3/2}}\ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}nP_{n}(x)t^{n-1} \ \ \ \ \ (4)

Multiplying through by {(1+t^{2}-2xt)} and using the earlier equation, we get

\displaystyle   (1+t^{2}-2xt)\sum_{n=0}^{\infty}nP_{n}(x)t^{n-1} \displaystyle  = \displaystyle  (x-t)(1+t^{2}-2xt)^{-1/2}\ \ \ \ \ (5)
\displaystyle  \displaystyle  = \displaystyle  (x-t)\sum_{n=0}^{\infty}P_{n}(x)t^{n} \ \ \ \ \ (6)

We now have two power series in {t} equal to each other, which means each separate power of {t} must be equal, according to the uniqueness of power series. Since {t} appears in the factors multiplying each series, we need to multiply these factors into the series and relabel some of the summation indexes so that each series has a term in {t^{n}}.

\displaystyle   \sum_{n=0}^{\infty}nP_{n}(x)t^{n-1}+\sum_{n=0}^{\infty}nP_{n}(x)t^{n+1}-\sum_{n=0}^{\infty}2xnP_{n}(x)t^{n} \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}xP_{n}(x)t^{n}-\sum_{n=0}^{\infty}P_{n}(x)t^{n+1}\ \ \ \ \ (7)
\displaystyle  \sum_{n=0}^{\infty}(n+1)P_{n+1}(x)t^{n}+\sum_{n=1}^{\infty}(n-1)P_{n-1}(x)t^{n}-\sum_{n=0}^{\infty}2xnP_{n}(x)t^{n} \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}xP_{n}(x)t^{n}-\sum_{n=1}^{\infty}P_{n-1}(x)t^{n} \ \ \ \ \ (8)

Extracting the coefficient of {t^{n}} from this equation (assuming {n\ge1}), we get

\displaystyle   (n+1)P_{n+1}(x)+(n-1)P_{n-1}(x)-2xnP_{n}(x) \displaystyle  = \displaystyle  xP_{n}(x)-P_{n-1}(x)\ \ \ \ \ (9)
\displaystyle  (2n+1)xP_{n}(x) \displaystyle  = \displaystyle  (n+1)P_{n+1}(x)+nP_{n-1}(x)\ \ \ \ \ (10)
\displaystyle  P_{n+1}(x) \displaystyle  = \displaystyle  \frac{1}{n+1}[(2n+1)xP_{n}(x)-nP_{n-1}(x)] \ \ \ \ \ (11)

Thus using the starting values of {P_{0}=1} and {P_{1}=x}, we can generate all higher polynomials from this recurrence relation.

Now to the matter of demonstrating that these polynomials are the same as those encountered when solving Legendre’s differential equation. We start with the cosine rule expansion above, and this time take the derivative with respect to {x}:

\displaystyle   \frac{\partial g}{\partial x} \displaystyle  = \displaystyle  \frac{t}{(1+t^{2}-2xt)^{3/2}}\ \ \ \ \ (12)
\displaystyle  \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}P_{n}'(x)t^{n} \ \ \ \ \ (13)

Again, we multiply through by {(1+t^{2}-2xt)}:

\displaystyle   (1+t^{2}-2xt)\sum_{n=0}^{\infty}P_{n}'(x)t^{n} \displaystyle  = \displaystyle  t(1+t^{2}-2xt)^{-1/2}\ \ \ \ \ (14)
\displaystyle  \displaystyle  = \displaystyle  t\sum_{n=0}^{\infty}P_{n}(x)t^{n} \ \ \ \ \ (15)

From here, we multiply the factors into the series and redefine the summation indexes in the usual way:

\displaystyle   \sum_{n=0}^{\infty}P_{n}'(x)t^{n}+\sum_{n=0}^{\infty}P_{n}'(x)t^{n+2}-\sum_{n=0}^{\infty}2xP_{n}'(x)t^{n+1} \displaystyle  = \displaystyle  \sum_{n=0}^{\infty}P_{n}(x)t^{n+1}\ \ \ \ \ (16)
\displaystyle  \sum_{n=0}^{\infty}P'_{n}(x)t^{n}+\sum_{n=2}^{\infty}P'_{n-2}(x)t^{n}-\sum_{n=1}^{\infty}2xP'_{n-1}(x)t^{n} \displaystyle  = \displaystyle  \sum_{n=1}^{\infty}P_{n-1}(x)t^{n}\ \ \ \ \ (17)
\displaystyle  P'_{n}(x)+P'_{n-2}(x)-2xP'_{n-1}(x) \displaystyle  = \displaystyle  P_{n-1}(x) \ \ \ \ \ (18)



which is valid for {n\ge2}.

Shifting the index by 1 gives us a relation in line with that above, which is now valid for {n\ge1}:

\displaystyle  P_{n}(x)=P'_{n+1}(x)+P'_{n-1}(x)-2xP'_{n}(x) \ \ \ \ \ (19)

There are several other recurrence relations that can be derived, but our main goal is to show that {P_{n}(x)} satisfies Legendre’s equation, so we’d better focus on that. From the above relation for {P_{n+1}(x)}, we can take the derivative to get:

\displaystyle   P'_{n+1}(x) \displaystyle  = \displaystyle  \frac{1}{n+1}[(2n+1)(P_{n}(x)+xP'_{n}(x))-nP'_{n-1}(x)]\ \ \ \ \ (20)
\displaystyle  2(n+1)P'_{n+1}(x) \displaystyle  = \displaystyle  2(2n+1)P_{n}(x)+2x(2n+1)P'_{n}(x)-2nP'_{n-1}(x) \ \ \ \ \ (21)

Adding this to {(2n+1)} times 19 we get

\displaystyle   (2n+2)P'_{n+1}(x)+(2n+1)P_{n}(x) \displaystyle  = \displaystyle  2(2n+1)P_{n}(x)+(2n+1)P'_{n+1}(x)+P'_{n-1}(x) \ \ \ \ \ (22)

Cancelling terms gives

\displaystyle  P'_{n+1}(x)-P'_{n-1}(x)=(2n+1)P_{n}(x) \ \ \ \ \ (23)

Rearranging 19 gives us

\displaystyle  P_{n}(x)+2xP'_{n}(x)=P'_{n+1}(x)+P'_{n-1}(x) \ \ \ \ \ (24)

Taking {\frac{1}{2}}(2423) gives us the relation

\displaystyle  P'_{n-1}(x)=-nP_{n}(x)+xP'_{n}(x) \ \ \ \ \ (25)

Taking {\frac{1}{2}}(24+23) gives

\displaystyle   P'_{n+1}(x) \displaystyle  = \displaystyle  (n+1)P_{n}(x)+xP'_{n}(x)\ \ \ \ \ (26)
\displaystyle  P'_{n}(x) \displaystyle  = \displaystyle  nP_{n-1}(x)+xP'_{n-1}(x) \ \ \ \ \ (27)



where we’ve shifted the index by 1 in the second line. Adding this equation to {x} times 25 we get

\displaystyle  (1-x^{2})P'_{n}(x)=nP_{n-1}(x)-nxP_{n}(x) \ \ \ \ \ (28)

Taking the derivative of this equation we get

\displaystyle   -2xP'_{n}(x)+(1-x^{2})P''_{n}(x) \displaystyle  = \displaystyle  nP'_{n-1}(x)-nP_{n}(x)-nxP'_{n}(x)\ \ \ \ \ (29)
\displaystyle  (1-x^{2})P''_{n}(x)+(n-2)xP'_{n}(x)+nP_{n}(x) \displaystyle  = \displaystyle  nP'_{n-1}(x) \ \ \ \ \ (30)

We now use 25 to substitute for {P'_{n-1}(x)}:

\displaystyle   (1-x^{2})P''_{n}(x)+(n-2)xP'_{n}(x)+nP_{n}(x) \displaystyle  = \displaystyle  -n^{2}P_{n}(x)+nxP'_{n}(x)\ \ \ \ \ (31)
\displaystyle  (1-x^{2})P''_{n}(x)-2xP'_{n}(x)+n(n+1)P_{n}(x) \displaystyle  = \displaystyle  0\ \ \ \ \ (32)
\displaystyle  \frac{d}{dx}((1-x^{2})P'_{n}(x))+n(n+1)P_{n}(x) \displaystyle  = \displaystyle  0 \ \ \ \ \ (33)



which is, finally, Legendre’s equation, as we saw it when we derived the Legendre polynomials as its solutions (except we used {l} instead of {n} as the index). Thus the Legendre polynomials obtained via the cosine rule or via Legendre’s differential equation are the same.

One thought on “Legendre polynomials – recurrence relations & ODE

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>