You are on page 1of 10

LEGENDRE POLYNOMIALS AND APPLICATIONS

We construct Legendre polynomials and apply them to solve Dirichlet problems


in spherical coordinates.
1. Legendre equation: series solutions
The Legendre equation is the second order dierential equation
(1 x2 )y  2xy  + y = 0

(1)

which can also be written in self-adjoint form as




(2)
(1 x2 )y  + y = 0 .
This equation has regular singular points at x = 1 and at x = 1 while x = 0 is an
ordinary point. We can nd power series solutions centered at x = 0 (the radius of
convergence will be at least 1). Now we construct such series solutions.
Assume that


y=
c j xj
j=0

be a solution of (1). By substituting such a series in (1), we get




j(j 1)cj xj2 2x
jcj xj1 +
c j xj = 0
(1 x2 )

j=2

j(j 1)cj xj2

j=2

j=1

j(j 1)cj xj

j=2


j=1

j=0

2jcj xj +

c j xj = 0

j=0

After re-indexing the rst series and grouping the other series, we get



(j + 2)(j + 1)cj+2 xj
(j 2 + j )cj xj = 0
j=0

and then




j=0


(j + 2)(j + 1)cj+2 (j 2 + j )cj xj = 0 .

j=0

By equating each coecient to 0, we obtain the recurrence relations


(j + 1)j
cj+2 =
cj ,
j = 0, 1, 2,
(j + 2)(j + 1)
We can obtain two independent solutions as follows. For the rst solution we
make c0 = 0 and c1 = 0. In this case the recurrence relation gives
2
12
c1 = 0, c5 =
c3 = 0, , codd = 0 .
c3 =
6
20
The coecients with even index can be written in terms of c0 :
(2 3 )
(2 3 )()

c0 , c 4 =
c2 =
c0
c2 =
2
43
4!
Date: April 14, 2014.
1

LEGENDRE POLYNOMIALS AND APPLICATIONS

we prove by induction that


c2k =

[(2k 1)(2k 2) ][(2k 3)(2k 4) ] [3 2 ][]


c0
(2k)!

We can write this in compact form as


k1


c0
c2k =
[(2i + 1)(2i) ]
(2k)! i=1
This give a solution
y1 (x) = c0

k1


k=0

i=0


[(2i + 1)(2i) ]

x2k
(2k)!

A second series solution (independent from the rst) can be obtained by making
c0 = 0 and c1 = 0. In this case ceven = 0 and

 k

c1
[2i(2i 1) ]
c2k+1 =
(2k + 1)! i=1
The corresponding solution is
y2 (x) = c1

 k




k=0


[(2i)(2i 1) ]

i=1

x2k+1
(2k + 1)!

Remark 1. It can be proved by using the ratio test that the series dening y1 and
y2 converge on the interval (1, 1) (check this as an exercise).
2. It is also proved that for every either y1 or y2 is unbounded on (1, 1). That
is, as x 1 or as x 1, one of the following holds, either |y1 (x)| or
|y2 (x)| .
3. The only case in which Legendre equation has a bounded solution on [1, 1] is
when the parameter has the form = n(n + 1) with n = 0 or n Z+ . In this
case either y1 or y2 is a polynomial (the series terminates). This case is considered
below.
2. Legendre polynomials
Consider the following problem
Problem. Find the parameters R so that the Legendre equation


(3)
(1 x2 )y  + y = 0, 1 x 1 .
has a bounded solution.
This is a singular Sturm-Liouville problem. It is singular because the function
(1 x2 ) equals 0 when x = 1. For such a problem, we dont need boundary conditions. The boundary conditions are replaced by the boundedness of the solution.
As was pointed out in the above remark, the only values of for which we have
bounded solutions are = n(n + 1) with n = 0, 1, 2, . These values of are
the eigenvalues of the SL-problem.
To understand why this is so, we go back to the construction of the series solutions and look again at the recurrence relations giving the coecients
cj+2 =

(j + 1)j
cj ,
(j + 2)(j + 1)

j = 0, 1, 2,

LEGENDRE POLYNOMIALS AND APPLICATIONS

If = n(n + 1), then


cn+2 =

(n + 1)n
cn = 0.
(n + 2)(n + 1)

By repeating the argument, we get cn+4 = 0 and in general cn+2k = 0 for k 1.


This means
if n = 2p (even), the series for y1 terminates at c2p and y1 is a polynomial
of degree 2p. The series for y2 is innite and has radius of convergence
equal to 1 and y2 is unbounded.
If n = 2p + 1 (odd), then the series for y2 terminates at c2p+1 and y2 is a
polynomial of degree 2p + 1 while the solution y1 is unbounded.
For = n(n+1), we can rewrite the recurrence relation for a polynomial solution
in terms of cn . We have,
cj =

(j + 2)(j + 1)
(j + 2)(j + 1)
cj+2 =
cj+2 ,
j(j + 1) n(n + 1)
(n j)(n + j + 1)

for j = n 2, n 4, 1 or 0. Equivalently,
cn2k =

(n 2k + 2)(n 2k + 1)
cn2k+2 ,
(2k)(2n 2k + 1)

k = 1, 2, , [n/2].

I will leave it as an exercise to verify the following formula for cn2k in terms of cn :
cn2k =

(1)k
n(n 1) (n 2k + 1)
cn .
2k k! (2n 1)(2n 3) (2n 2k + 1)

The polynomial solution is therefore


 (1)k
n(n 1) (n 2k + 1)
cn xn2k
2k k! (2n 1)(2n 3) (2n 2k + 1)

[n/2]

y(x) =

k=0

where cn is an arbitrary constant. The n-th Legendre polynomial Pn (x) is the above
polynomial of degree n for the particular value of cn
cn =

(2n)!
.
2n (n!)2

This particular value of cn is chosen to make Pn (1) = 1. We have then (after


simplication)
Pn (x) =

[n/2]
1  (1)k (2n 2k)! n2k
x
.
2n
k!(n k)!(n 2k)!
k=0

Note that if n is even (resp. odd), then the only powers of x involved in Pn are
even (resp. odd) and so Pn is an even (resp. odd).
The rst six Legendre polynomials are.
P0 (x) = 1
1
P2 (x) = (3x2 1)
2
1
P4 (x) = (35x4 30x2 + 3)
8
We have the following proposition.

P1 (x) = x
1
P3 (x) = (5x3 3x)
2
1
P5 (x) = (63x5 70x3 + 15x)
8

LEGENDRE POLYNOMIALS AND APPLICATIONS

P0
P
2
P4
P6

P1
P
3
P5
P7

Proposition. If y(x) is a bounded solution on the interval (1, 1) of the Legendre


equation (1) with = n(n + 1), then there exists a constant K such that
y(x) = KPn (x)
where Pn is the n-th Legendre polynomial.
Remark. When = n(n + 1) a second solution of the Legendre equation, independent from Pn , can be found in the form
1
1+x
+ Rn (x)
Qn (x) = Pn (x) ln
2
1x
where Rn is a polynomial of degree n 1. The construction of Qn can be achieved
by the method of reduction of order. Note that |Qn (x)| as x 1. The
general solution of the Legendre equation is then
y(x) = APn (x) + Bn Qn (x)
and such a function is bounded on the interval (1, 1) if and only if B = 0.
3. Rodrigues formula
The Legendre polynomials can be expressed in a more compact form.
Theorem 1. (Rodrigues Formula) The n-th Legendre polynomial Pn is given by
the following

1 dn  2
(x 1)n
(4)
Pn (x) = n
2 n! dxn
(thus expression (4) gives a solution of (3) with = n(n + 1)).
Proof. Let y = (x2 1)n . We have following
Claim. The k-th derivative y (k) (x) of y satises the following:
(5)

(1 x2 )

d2 y (k)
dy (k)
+ (2n k)(k + 1)y (k) = 0.
+ 2(n k 1)x
2
dx
dx

Proof of the Claim. By induction. For k = 0, y = y (0) . We have


y  = 2nx(x2 1)n1 (1 x2 )y  + 2nxy = 0
and after dierentiation, we get
(1 x2 )y  + 2(n 1)xy  + 2ny = 0

LEGENDRE POLYNOMIALS AND APPLICATIONS

So formula (5) holds when k = 0. By induction suppose the (5) holds up to order
k 1. We can rewrite (5) for k 1 as
dy (k)
+ 2(n k)xy (k) + (2n k + 1)ky (k1) = 0.
dx
We dierentiate to obtain
(1 x2 )

d2 y (k)
dy (k)
+ [2(n k) + k(2n k + 1)]y (k) = 0.
+ [2(n k) 2]x
2
dx
dx
which is precisely (5).
(1 x2 )

Now if we let k = n in (5), we obtain


(1 x2 )

d2 y (n)
dy (n)
2x
+ n(n + 1)y (k) = 0.
2
dx
dx

Hence y (n) solves the Legendre equation with = n(n + 1). Since y (n) is a polynomial of degree 2n, then by Proposition 1, it is a multiple of Pn . There is a constant
K such that Pn (x) = Ky (n) (x). To complete the proof, we need to nd K. For
this notice that the coecient of xn in Pn is (2n)!/(2n (n!)2 ). The coecient of xn
in y (n) is that of
(2n)! n
dn (x2n )
= (2n)(2n 1) (2n n + 1)xn =
x
n
dx
n!
Hence
(2n)!
(2n)!
1
= n
K= n .
n!
2 (n!)2
2 n!
This completes the proof of the Rodrigues formula.
K

A consequence of this formula is the following property between three consecutive


Legendre polynomials.
Proposition. The Legendre polynomials satisfy the following


(x) Pn1
(x)
(2n + 1)Pn (x) = Pn+1

(6)

Proof. From Rodrigues formula we have




1 dk
d
2k dk
2
k
Pk (x) =
[(x

1)
]
= k
[x(x2 1)k1 ]
k
k
dx 2 k! dx
2 k! dxk

dk1 
1
((2k 1)x2 1)(x2 1)k2
= k1
k1
2
(k 1)! dx
For k = n + 1, we get

1 dn 
((2n + 1)x2 1)(x2 1)n1
n! dxn
From Rodrigues formula at n 1, we get


1
dn1
d
2n dn

2
n1
[(x 1)
] = n
[(x2 1)n1 ]
Pn1 (x) =
n1
n1
dx 2
(n 1)! dx
2 n! dxn

Pn+1
(x) =

2n

As a consequence, we have


(x) Pn1
(x) =
Pn+1

2n + 1 dn
[(x2 1)n ] = (2n + 1)Pn (x) .
2n n! dxn

LEGENDRE POLYNOMIALS AND APPLICATIONS

Generating function. It can be shown that the Legendre polynomials are generated by the function
1
g(x, t) =
.
1 2xt + t2
More precisely, if we extend g(x, t) as a Taylor series in t, then the coecient of tn
is the polynomial Pn (x):

(7)


1
=
Pn (x)tn .
1 2xt + t2
n=0

A consequence of (7) is the following relation between three consecutive Legendre


polynomials.
Proposition. The Legendre polynomials satisfy the following
(8)

(2n + 1)xPn (x) = (n + 1)Pn+1 (x) + nPn1 (x)

Proof. We dierentiate (7) with respect to t:

(x t)
1 2xt + t2

nPn (x)tn1 .

n=1

We multiply by 1 2xt + t2 and use (7)

(x t)Pn (x)tn =

n=0

(1 2xt + t2 )nPn (x)tn1 .

n=1

Equivalently,


n=0

xPn (x)tn

Pn (x)tn+1 =

n=0

nPn (x)tn1

n=1

2nxPn (x)tn +

n=1

nPn (x)tn+1

n=1

and after grouping the series


xP0 (x) P1 (x) +

[(2n + 1)xPn (x) (n + 1)Pn+1 (x) nPn1 (x)] tn

n=1

Property (8) is obtained by equating to 0 the coecient of tn .


4. Orthogonality of Legendre polynomials
When the Legendre equation is considered as a (singular) Sturm-Liouville problem on [1, 1], we get the following orthogonality theorem
Theorem 2. Consider the singular SL-problem
(1 x2 )y  2xy  + y = 0

1 < x < 1,

with y bounded on (1, 1). The eigenvalues are n = n(n + 1) with corresponding
eigenfunctions Pn (x). Furthermore, the eigenfunctions corresponding to distinct
eigenvalues are orthogonal. That is

1
(9)
< Pn (x), Pm (x) >=
Pn (x)Pm (x)dx = 0 ,
n = m .
1

LEGENDRE POLYNOMIALS AND APPLICATIONS

Proof. Recall that the self-adjoint form of the Legendre equation is


[(1 x2 )y  ] + y = 0 ,
(with p(x) = 1 x2 , r(x) = 1, and q(x) = 0. The corresponding weight function
is r = 1. We have already seen that the eigenvalues and eigenfunctions are given
by n = n(n + 1) and Pn (x). We are left to verify the orthogonality. We write the
Legendre equation for Pm and Pn :
n Pn (x) = [(x2 1)Pn (x)]

m Pm (x) = [(x2 1)Pm
(x)]
Multiply the rst equation by Pm , the second by Pn and subtract. We get,
(n m )Pn (x)Pm (x)


= [(x2 1)Pn (x)] Pm (x) [(x2 1)Pm
(x)] Pn (x)
 2


2

= (x 1)Pn (x)Pm (x) (x 1)Pm (x)Pn (x)
 2



= (x 1)(Pn (x)Pm (x) Pm
(x)Pn (x))

Integrate from 1 to 1

1

1

Pn (x)Pm (x)dx = (x2 1)(Pn (x)Pm (x) Pm
(x)Pn (x)) 1 = 0.
(n m )
1

The square norms of the Legendre polynomials are given below.


Theorem 3. We have the following

1
(10)
||Pn (x)||2 =
Pn (x)2 dx =
1

2
2n + 1

Proof. We use generating function (7) to get


2



1
=
Pn (x)tn
=
Pn (x)Pm (x)tn+m
2
1 2xt + t
n=0
n,m0

Now we integrate from 1 to 1:


1
 
1
dx
=
P
(x)P
(x)dx
tn+m
n
m
2
1 1 2xt + t
1
n,m0

By using the orthogonality of Pn and Pm (for n = m), we get


x=1
1 
||Pn (x)||2 t2n ,
ln |1 2xt + t2 | x=1 =
2t
n=0

and after simplifying the left side:



1 1 + t 
ln
||Pn (x)||2 t2n .
=

t
1t
n=0
Recall that for |s| < 1, the Taylor series of ln(1 + s) is
ln(1 + s) =


(1)j1
j=1

sj .

LEGENDRE POLYNOMIALS AND APPLICATIONS

Hence for |t| < 1, we have




1 1 + t
1
ln
= (ln(1 + t) ln(1 t))
t
1 t
t

1  (1)j1 j  (1)j1
j
=
t
(t)
t j=1
j
j
j=1

1  (1)j1 + 1 j
t
t j=1
j


2
=
t2n
2n
+
1
n=0
=

It follows that


2
t2n =
||Pn (x)||2 t2n .
2n
+
1
n=0
n=0

An identication of the coecient of t2n gives (10).


5. Legendre series
The collection of Legendre polynomials {Pn (x)}n0 forms a complete family in
the space Cp1 [1, 1] of piecewise smooth functions on the interval [1, 1]. Any
piecewise function f has then a generalized Fourier series representation in terms of
these polynomials. The associated series is called the Legendre series of f . Hence,


f (x)
cn Pn (x)
n=0

where
cn =

< f (x), Pn (x) >


2n + 1
=
||Pn (x)||2
2

1
1

f (x)Pn (x)dx

Theorem 4. Let f be a piecewise smooth function on [1, 1]. Then,


fav (x) =

f (x+ ) + f (x ) 
cn Pn (x) .
=
2
n=0

In particular at the points x, where f is continuous, we have


f (x) =
cn Pn (x) .
n=0

Remark 1. For each m, the Legendre polynomials P0 , P1 , , Pm forms a basis


in the space of polynomials of degree m. Thus, if R(x) is a polynomial of degree
m, then the Legendre series of R terminates at the order m (i.e. ck = 0 for k > m).
In particular,
c2
xm = c0 P0 (x) + c1 P1 (x) + + cm Pm (x) = c0 + c1 x + (3x2 1) +
2
For example,
2
2
x2 = P0 (x) + 0P1 (x) + P2 (x)
3
3
3
2
x3 = 0P0 (x) + P1 (x) + 0P2 (x) + P3 (x)
5
5

LEGENDRE POLYNOMIALS AND APPLICATIONS

Remark 2. Suppose that f is an odd function. Since Pn is odd when n is odd and
Pn is even when n is even, then the Legendre coecients of f with even indices are
all zero (c2j = 0). The Legendre series of f contains only odd indexed polynomials.
That is,


fav (x) =
c2j+1 P2j+1 (x)
j=0

where

c2j+1 = (2(2j + 1) + 1)

f (x)P2j+1 (x)dx = (4j + 3)

f (x)P2j+1 (x)dx.

Similarly, if f is an even function, then its Legendre series contains only even
indexed polynomials.


fav (x) =
c2j P2j (x)
j=0

where

c2j = (2(2j) + 1)

f (x)P2j (x)dx = (4j + 1)


0

f (x)P2j (x)dx.
0

If a function f is dened on the interval [0, 1], then we can extend it as an even
function feven to the interval [1, 1]. The Legendre series of feven contains only
even-indexed polynomials. Similarly, if we extend f as an odd function fodd to
[1, 1], then the Legendre series contains only odd-indexed polynomials. We have
the following theorem.
Theorem 5. Let f be a piecewise smooth function on [0, 1]. Then, f has an
expansion into even Legendre polynomials

fav (x) =

f (x+ ) + f (x ) 
c2j P2j (x) .
=
2
j=0

Similarly, f has an expansion into odd Legendre polynomials

fav (x) =

f (x+ ) + f (x ) 
=
c2j+1 P2j+1 (x) .
2
j=0

The coecients are given by

cn = (2n + 1)

f (x)Pn (x)dx .
0


Example 1. Consider the function f (x) =

1
0

0 < x < 1,
The n-th Legendre
1 < x < 0

coecient of f is
cn =

2n + 1
2

1
1

f (x)Pn (x)dx =

2n + 1
2

Pn (x)dx .
0

10

LEGENDRE POLYNOMIALS AND APPLICATIONS

The rst four coecients are

1 1
1
dx =
2
0
2
3 1
3
xdx =
c1 =
2
0
4
5 11
2
(3x 1)dx = 0
c2 =
2
0 2
1
1
7
7
(5x3 3x)dx =
c3 =
2 0 2
16
c0 =

Hence,
3
7
1
P0 (x) + P1 (x) P3 (x) +
0 < x < 1,
2
4
16
3
7
1
1 < x < 0
0 = P0 (x) + P1 (x) P3 (x) +
2
4
16

1
0 < x < 1,
Example 2. Let f (x) =
. Since f is odd, its Legendre series
1
1 < x < 0
contains only odd indexed polynomials. We have

1
c2n+1 = (4n + 3)
P2n+1 (x)dx .
1=

0


Pk1
) with k = 2n + 1,
By using the recurrence relation (6) ((2k + 1)Pk = Pk+1
we get

1


(P2n+2
(x) P2n
(x))dx = P2n+2 (1) P2n+2 (0) P2n (1) + P2n (0) .
c2n+1 =
0

Since P2j (1) = 1 that P2j (0) = (1)j (2j)!/22j (j!)2 (see exercise 1), then it follows
that


(1)n (4n + 3) (2n)!
c2n+1 = P2n (0) P2n+2 (0) =
.
2n+1 (n + 1)
(n!)2
We have then the expansion



(1)n (4n + 3) (2n)!
P2n+1 (x) , 0 < x < 1 .
1=
2n+1 (n + 1)
(n!)2
n=0
6. Separation of variables for u = 0 in spherical coordinates
Recall that if (x, y, z) and (, , ) denote, respectively, the cartesian and the
spherical coordinates in R3 :
x = cos sin ,

y = sin sin ,

z = cos ,

then the Laplace operator has expression


=

2
2
2
1 2
cot
1
+
+
+ 2
+
2
2 sin2 2
2 2

with > 0, R , and (0, ).


Consider the problem of nding bounded solutions u = u(, , ) of the Laplace
equation u = 0. That is, u(, , ) bounded inside the sphere < A and satises
(11)

1 2 u cot u
2u
2 u 2 u
1
+
+ 2 2+ 2
+ 2 2
=0
2
2

sin

You might also like