You are on page 1of 11

The Legendre and the associated

differential equation
This is an article from my home page: www.olewitthansen.dk

Ole Witt-Hansen (2020)


Contents

1. The Legendre equation.............................................................................................................1


2. Series expansion solution to the equation ................................................................................1
3. Rodrigues formula....................................................................................................................4
3.1 Differentiating a product n-times...........................................................................................4
3. Proof of Rodrigues formula .....................................................................................................5
4. Associated Legendre polynomials: ..........................................................................................7
The Legendre and associated Polynomials 1

1. The Legendre equation


The Legendre equation comes frequently up in physics, and dealing with the properties of the
solutions is a substantial part of most standard books in mathematical physics.
However the Legendre polynomials are rather complex mathematics, and most often only the
results are presented, but not the detailed derivation. The Legendre differential equation reads:

d2y dy
(1.1) (1  x ) 2  2 x  n(n  1) y  0
2

dx dx

There are two linear independent classes of solutions to the equation: Pn (x) and Qn (x) , we shall
here only occupy ourselves with Pn (x) . Pn (x) are called Legendre polynomials.
The most compact way to state the solution to the Legendre equation is the Rodrigues formula:

n
1 d 
(1.2) Pn ( x)  n   ( x 2  1) n
2 n!  dx 

Unfortunately it is not possible to verify Rodrigues formula directly by insertion.


One has either to use the series expansion solution to the Legendre equation together with applying
the binomial formula on Rodrigues equation or some mathematical tricks, as we shall see below.

Especially in connection with physics n is often replaced with l. In connection with the series
expansion, it is in fact necessary.

d2y dy
(1  x 2 ) 2
 2 x  l (l  1) y  0
dx dx

2. Series expansion solution to the equation


Assume a series expansion solution:

y  a0  a1 x  a2 x 2  a3 x 3  a4 x 4  ...  an x n  ...
y '  a1  2a2 x  3a3 x 2  4a4 x 3  ...  nan x n 1  ...
y ' '  2a2  6a3 x  12a4 x 2  ...  n(n  1)an x n  2  ...

(1  x 2 ) y ' '  2a2  6a3 x  12a4 x 2  ...  n(n  1)an x n  2  ...


 (2a2 x 2  6a3 x 3  12a4 x 4  ...  n(n  1)an x n  ...
 2 xy '  2 xa1  4a2 x 2  6a3 x 3  8a4 x 4  ...  2nan x n  ...
n(n  1) y  n(n  1)a0  n(n  1)a1 x  n(n  1)a2 x 2  n(n  1)a3 x 3  n(n  1)a4 x 4  ...  n(n  1)an x n  ...

We put the three terms in the Differential equation together, collecting the coefficients of the
various terms having the power of x. Since the collected series is identically zero, each of the
coefficients to a certain power of x must necessarily be zero. It is rather messy to complete this
The Legendre and associated Polynomials 2

task, but below we have established a schema for the powers from 0 to 3 and for n.

const x x2 x3 xn
y'’ 2a2 6a3 12a4 20a5 (n  2)(n  1)an  2
-x2y’’  2a2  6a3  n(n  1)an
-2xy’  2a1  4a2  6a3  2nan
l(l+1)y l (l  1)a0 l (l  1) a1 l (l  1) a 2 l (l  1)a 3 l (l  1)an

For the first four terms we get:


l (l  1)
const: 2a2  l (l  1)a0  0  a2   a0
2
(l  1)(l  2)
x: 6a3  2a1  l (l  1)a1  0  a3   a1
6

(l  2)(l  3) l (l  1)(l  2)(l  3)


x2 : 12a4  2a2  4a2  l (l  1)a2  a4   a2   a0
12 4!

(l  4)(l  3)
x3 : 20a5  12a3  l (l  1)a3  a5   a3
20
(l  1)(l  3)(l  2)(l  4)
 a1
5!

(n  2)(n  1)an  2  (l 2  l  n 2  n)an  0 


xn :
(n  2)(n  1)an  2  (l  n)(l  n  1)an  0

(l  n)(l  n  1)
(2.1) an  2   an
(n  2)(n  1)

The solution then separates in two series, one for even power of x, and one for odd power of x,
corresponding to the solutions Pn(x).

 l (l  1) 2 l (l  1)(l  2)(l  3) 4 
y  a0 1  x  x  ...  
 2! 4! 
 (l  1)(l  2) 3 (l  1)(l  2)(l  3)(l  4) 5 
a1  x  x  x  ... 
 3! 5! 

It is important to notice that for integer l, the solutions to Lagrange’s differential equation are
polynomials. This follows from the recursion relation:
The Legendre and associated Polynomials 3

(l  n)(l  n  1)
an  2   an
(n  2)(n  1)

For n = l , an+2 =0 , and from the recursion relation it follows that an+4 = an+6 = an+8 = …= 0.

n
1 d 
The first 4 Legendre polynomials: Pn ( x)  n   ( x 2  1) n are
2 n!  dx 

P0 ( x)  1,
1 d 2
P1 ( x)  ( x  1)  x
2 dx
1 d2 2
P2 ( x)  2 2
( x  1) 2  12 (3x 2  1)
2 2! dx
1 d3 2
P3 ( x)  3 ( x  1)3  12 (5 x 3  3x)
2 3! dx 3

The Legendre polynomials are especially in physics written with x  cos instead of x.
The Legendre polynomial normalization and orthogonal properties are therefore defined in the
interval [-1,1]. The formula is (from which we shall abstain from making the proof, because…)

1
2
 P ( x) P ( x)dx  2n  1
1
m n mn

You may for example easily verify:

1 1

 P0 ( x) dx  1dx  x1  2
2 1

1 1

 x dx   x 
1 1
3 1
 P ( x) dx  1  
2 2 1 2
1 3 1 3
1 1

 
1 1
1
 P ( x) P ( x)dx  
1
1 2
1
1
2
(3 x 3  x)dx  1 3
2 4
x 4  12 x 2 1
0

As it is seen from the definition equation:


d2y dy
(1  x 2 ) 2  2 x  n(n  1) y  0
dx dx
the Legendre polynomials have the eigenvalues n(n+1). Since the Legendre polynomials are an
infinite series of orthogonal functions, “any” function may be expanded on them.

1

2n  1
f ( x)   cn Pn ( x)
2 1
where cn  Pn ( x) f ( x)dx
n 0
The Legendre and associated Polynomials 4

3. Rodrigues formula
n
1 d 
(3.1) Pn ( x)  n   ( x 2  1) n
2 n!  dx 

We claim that the Rodrigues formula above is a solution to the Legendre differential equation.
It is, however, not possible to verify this directly without differentiation to the bottom for a fixed n

There are other ways, however. One is to use the binomial formula to expand ( x 2  1) n into powers
of x2 and carry out n times of differentiation, but it is rather extensive.
Another way, (but also rather circumstantial) is to take as a starting point the function:

dv
v( x)  ( x 2  1) n  ( x 2  1)  ( x 2  1)n 2 x( x 2  1) n 1  2nx( x 2  1) n  2nxv
dx
So
dv
(3.2) ( x 2  1)  2nxv
dx
d nv
Then we differentiate this identity n + 1 times to show that is in fact a solution to the
dx n
Legendre differential equation, as it ought to be according to Rodrigues formula.

3.1 Differentiating a product n-times


We shall first look for a general formula, differentiating a product of two functions ( fg ) n-times.
dk f
The k-times differentiated function k
, we write for simplicity as f (k ) for k >2, and f ( 0)  f
dx
To find the formula we begin with the product rule.

1
1
( fg )'  f ' g  fg '     f (1 k ) g ( k )
k 0  k 
2
2
( fg )' '  f ' ' g  f ' g ' f ' g ' fg ' '  f ' ' g  2 f ' g ' fg ' '     f ( 2  k ) g ( k )
k 0  k 

( fg )  f g  f ' ' g '2 f ' ' g '2 f ' g ' ' f ' g ' ' fg
3 ( 3) ( 3)

3
 3
 f (3) g  3 f ' ' g '3 f ' g ' ' fg (3)     f ( 3 k ) g ( k )
k 0  k 

Leading to
n
n
(3.2) ( fg )( n )     f ( n  k ) g ( k )
k 0  k 

This formula may of course be verified by induction, and it goes as follows.


It is only necessary to look at two terms in sequence from (3.2).

n  n  ( n  k 1) ( k 1)


…+   f ( n  k ) g ( k ) +   f g +…
k   k  1
The Legendre and associated Polynomials 5

And when we differentiate w eget:

 n  ( n  k 1) ( k )  n  ( n  k ) ( k 1)  n  ( n  k ) ( k 1)  n  ( n  k 1) ( k  2)


  f g    f g    f g    f g
k  k   k  1  k  1

The products of the two functions are the same in the second and third term, so we hold their
binomial coefficients together.

n  n  n! n!
      
 k   k  1 k!(n  k )! (k  1)!(n  k  1)!
n!  1 1  n!  k 1 n  k 
     
k!(n  k  1)!  n  k k  1  k!(n  k  1)!  (n  k )(k  1) 
n!  n 1  (n  1)!
   
k!(n  k  1)!  (n  k )(k  1)  (k  1)!(n  k )!

 n  1 ( n  k ) ( k 1)
As it should be, namely:   f g
 k  1

3. Proof of Rodrigues formula


We return to the proof of Rodrigues formula, where v  ( x 2  1) n by differentiating the equation:

dv
( x 2  1)  2nxv n+1 times.
dx

dv
We adapt f  ( x 2  1) and g  , and n -> n+1 in the formula (3.2) so:
dx
n 1 n  1
  ( n 1  k ) ( k )
(3.3) ( fg )( n 1)     f g
k 0  k 

Since f ( x)  ( x 2  1) we notice that:

f ' ( x)  2 x, f ' ' ( x)  2, f ( 3) ( x)  0 , so f ( n 1 k ) = 0 when n + 1 – k > 2  k < n -1,

so the lower limit for k is n -1. We then get 3 terms.


The Legendre and associated Polynomials 6

n 1
 n  1 ( n  1  k ) ( k )
( fg )( n 1)   
k  n 1  k 
 f g

n(n  1) ( 2 ) ( n 1)
 f g  (n  1) f ' g ( n )  fg ( n 1)
2
n(n  1) d n 1 dv d n dv d n 1 dv
(3.4)  2 n 1  (n  1)2 x n  ( x  1) n 1
2

2 dx dx dx dx dx dx
n n 1 n2
d v d v d v
 n(n  1) n  (n  1)2 x n 1  ( x 2  1) n  2
dx dx dx
d d v
2 n
d d v n
d nv
  
 ( x  1) 2  n   2 x(n  1)  n   n(n  1) n
2

dx  dx  dx  dx  dx

dv
Then we turn to the right hand term 2nxv in ( x 2  1)  2nxv , using f = 2nx and g =v in the
dx
n 1 n  1
  ( n 1  k ) ( k )
formula: ( fg )( n 1)     f g .
k 0  k 

Since f ( x)  2nx we see that when n+1- k > 1 then f ( n 1 k )  0 , so the lower limit of k must be n.

n 1 n  1
  ( n 1 k ) ( k )
( fg )( n 1)     f g 
k n  k 

(3.5) 2n(n  1) f ' g ( n )  fg ( n 1)


d nv d d nv
 2n(n  1)  2 nx
dx n dx dx n
So we have that
dv
( x 2  1)  2nxv
dx
implies
d 2  d nv  d  d nv  d nv d nv d d nv
( x 2  1)    ( n  1) 2 x    n ( n  1)  2 n ( n  1)  2 nx
dx 2  dx n  dx  dx n  dx n dx n dx dx n
d 2  d nv  d  d nv  d nv
(3.6) ( x 2  1)    2 x    n ( n  1) 0
dx 2  dx n  dx  dx n  dx n
d nv
If we put y  we get:
dx n
d2y dy
(3.7) ( x 2  1) 2
 2 x  n(n  1) y  0
dx dx
d nv
So we see that y  n is indeed a solution to Lagrange equation, and since
dx

n
1 d 
(3.8) v( x)  ( x  1)
2 n
and Pn ( x)  n   ( x 2  1) n
2 n!  dx 
The Legendre and associated Polynomials 7

Then it follows that the Rodrigues polynomial Pn (x) is indeed a solution to Lagrange’s differential
equation.

4. Associated Legendre polynomials:

The Legendre polynomials:


n
1 d  2
(4.1) Pn ( x)  n   ( x  1)
n

2 n!  dx 

Are solutions to the Legendre differential equation:

d2y dy
(4.2) (1  x 2 ) 2
 2 x  n(n  1) y  0
dx dx

The associated Legendre differential equation is:

 m2 
(4.3) (1  x 2 ) y ' '2 xy ' l (l  1)  y  0
 1  x 2 

We shall prove that the equation (4.2) has the solution:

m dm
Pl m ( x)  (1  x 2 ) 2 Pl ( x)
dx m

However, establishing this is far from simple. In the literature it is mostly stated as a fact and
therefore I have chosen to fill in the details. We shall begin by trying with a solution of the form:

(4.4) y  (1  x 2 ) n u where we for simplicity have put n  m


2
,

First we do some preliminary calculations

y '  n(1  x 2 ) n 1 (2 x)u  (1  x 2 )n u ' 


 2nx(1  x 2 ) n 1 u  (1  x 2 ) n u '

y ' '  2n(1  x 2 ) n 1 u  4n(n  1)(1  x 2 ) n  2 x 2u  2 xn(1  x 2 )n 1u '2 xn(1  x 2 ) n 1 u ' (1  x 2 ) n u ' '

y ' '  2n(1  x 2 ) n 1 u  4n(n  1)(1  x 2 ) n  2 x 2u  4 xn(1  x 2 ) n 1 u '(1  x 2 ) n u ' '

Insert in the associated Lagrange equation:


The Legendre and associated Polynomials 8

 
(1  x 2 )  2n(1  x 2 ) n 1 u  4nx 2 (n  1)(1  x 2 ) n  2 u  4 xn(1  x 2 ) n 1 u ' (1  x 2 ) n u ' ' 
 m2  
2 x(2nx(1  x 2 ) n 1 u  (1  x 2 ) n u ' )   l (l  1)  (1  x 2 ) n u  0
2 
 1  x 

 2n(1  x ) u  4nx (n  1)(1  x ) u  4 xn(1  x ) u '(1  x ) u' '


2 n 2 2 n 1 2 n 2 n 1


 4 x n(1  x ) u  2 x(1  x ) u ' l (l  1)(1  x )  m (1  x ) u  0
2 2 n 1 2 n 2 n 2 2 n 1

 2n(1  x 2 ) n u  4nx 2 (n  1)(1  x 2 ) n 1 u  4 xn(1  x 2 ) n u '(1  x 2 ) n 1 u ' '


 
 4 x 2 n(1  x 2 ) n 1 u  2 x(1  x 2 ) n u ' l (l  1)(1  x 2 ) n  4n 2 (1  x 2 ) n 1 u  0

Division by (1  x 2 ) n 1 :

 2n(1  x 2 )u  4nx 2 (n  1)u  4 xn(1  x 2 )u ' (1  x 2 ) 2 u ' '




 4 x 2 nu  2 x(1  x 2 )u ' l (l  1)(1  x 2 )  4n 2 u  0
 2n(1  x 2 )u  4nx 2 (n  1)u  4 xn(1  x 2 )u ' (1  x 2 ) 2 u ' '


 4 x 2 nu  2 x(1  x 2 )u ' l (l  1)(1  x 2 )  4n 2 u  0
(1  x 2 ) 2 u ' '4 xn(1  x 2 )u '2 x(1  x 2 )u '2n(1  x 2 )u  4nx 2 (n  1)u


 4 x 2 nu  l (l  1)(1  x 2 )  4n 2 u  0 
(1  x 2 ) 2 u ' '2 x(1  x 2 )(2n  1)u '(2n(1  x 2 )  4nx 2 (n  1)


 4 x 2 n  4n 2 )u  l (l  1)(1  x 2 ) u  0 
(1  x 2 ) 2 u ' '2 x(1  x 2 )(2n  1)u ' (2n(1  x 2 )  4n 2 x 2


 4n 2 )u  l (l  1)(1  x 2 ) u  0 
(1  x 2 ) 2 u ' '2 x(1  x 2 )(2n  1)u ' (2n(1  x 2 )  4n 2 x 2


 4n 2 )u  l (l  1)(1  x 2 ) u  0 
(1  x 2 ) 2 u ' '2 x(1  x 2 )(2n  1)u '(1  x 2 )(2n  4n 2 )u  l (l  1)(1  x 2 )u  0 

(1  x 2 ) 2 u ' '2 x(1  x 2 )(2n  1)u '(1  x 2 )(2n  4n 2 )u  l (l  1)(1  x 2 )u  0

Divide by (1  x 2 ) and replace by 2n by m.

(4.5) (1  x 2 )u ' '2 x(m  1)u ' l (l  1)  (m(m  1) u  0

For m = 0, we recognize (4.5) as the Legendre equation


The Legendre and associated Polynomials 9

(4.6) (1  x 2 )u ' '2 xu 'l (l  1)u  0

which has the solution u = Pl(x). If we differentiate the equation (4.5) we get:

(1  x 2 )(u ' )' '2 x(u ' )'2(m  1)u '2 x(m  1)(u ' )' (l (l  1)  m(m  1))u '  0 

(1  x 2 )(u ' )' '2 x(m  2)(u ' )' (l (l  1)  (m  1)(m  2))u '  0

But this just (4.5) with u’ in place of u, and m+1 instead of m. But this is the differential equation
d
of u '  Pl ( x) with m =1 instead of m = 0.
dx
d2
By differentiating another time, we find that u ' '  2 Pl ( x) is a solution with m = 2.
dx
m
So returning to our tentative solution: y  (1  x ) u , we can see that:
2 2

m dm
(4.7) y  Pl m ( x)  (1  x 2 ) 2 Pl ( x)
dx m

Are the solutions to the associated Legendre equation.

The expressions (4.7) are therefore called the associated Legendre functions.
For m = 0 the associated Legendre functions are the same as the Legendre polynomials.
Below is listed the first six Legendre functions.

P00 ( x)  1 P11 ( x)   1  x 2
P10 ( x)  x P21 ( x)  3 x 1  x 2
P20 ( x)  12 (3 x 2  1) P22 ( x)  3(1  x 2 )

As it is the case for the Legendre polynomials, the associated Legendre functions are
orthonormalized functions, since we have the relation, (which we do not prove, because…)

1
(l  m)!
P ( x)Pl m ( x)dx  k l
m
k
1
(l  m)!

You might also like