You are on page 1of 58

Some Special Functions of

Mathematical Physics –
Legendre Polynomials
(Continued)

12-Nov-10 1
In this lecture, we find the recurrence
relation satisfied by the Legendre
Polynomials, show that the nth degree
Legendre Polynomial has n distinct real
roots all of which lie between -1 and 1. We
also state the generating function for these
Polynomials and define the Fourier-
Legendre Series expansion of functions.

12-Nov-10 2
Orthogonality of the Legendre Polynomials:
We show 1 0 mn
1 Pn ( x)Pm ( x)dx  2 /(2n  1) m  n
Proof: For any function f(x), consider
1 n
d
I   f ( x) n ( x  1) dx
2 n

1
dx
On integrating by parts, we get
n 1 1 1 n 1
d d
I  f ( x) n1 ( x  1) ]   f ( x) n1 ( x  1) dx
2 n
 2 n

dx 1 1 dx
12-Nov-10 3
Now by the remark made earlier
d n 1 2 at x = 1
n 1
( x  1) n
0
dx
d n1 2 n
1
Hence I    f ( x) n1 ( x  1) dx
1
dx
1 n2
d
 (1)  f ( x) n2 ( x  1) dx
2

 2 n

1
dx
1
 (1) n  f ( n ) ( x)( x 2  1) n dx
1
12-Nov-10 4
We note that if f(x) is a polynomial of degree
< n, f(n)(x) = 0
Hence if m < n,
1 1 n
1 d
1 Pm ( x)Pn ( x)dx  2n n! 1 Pm ( x) dx n ( x 1) dx
2 n

1
1
 n (1)  Pm ( x)( x 2  1) n dx
n (n)

2 n! 1

= 0, as m < n and so Pm(n)(x)=0

12-Nov-10 5
1 1

P ( x)dx   Pn ( x)Pn ( x)dx


2
n
1 1

1
1
 (1) n  Pn ( x)( x  1) dx
n (n) 2 n

2 n! 1

Since Pn(x) is a polynomial of degree n,


Pn(n) (x) = n![leading coefficient of Pn(x) ]
2n! (2n)!
 n! n 2
 n
2 (n!) 2 n!

12-Nov-10 6
Thus 1
(2n)!
1

1 Pn ( x)dx  (2n n!)2 1(1  x ) dx


2 2 n

(as (-1)n(x2-1)n = (1-x2)n)


1
2(2n)!
 n 2  (1  x 2 ) n dx
(2 n!) 0
1
Now look at
 (1  x ) dx
2 n
Put x  sin 
0

1  2
We get
  ) dx   cos 2 n 1  d
2 n
(1 x
0 0
12-Nov-10 7
2n 2n  2 2
   .... 
2n  1 2n  1 3
2n  (2n)  (2n  2)  (2n  2)  ...  2  2

(2n  1)(2n!)
2n 2
2 (n!)

(2n  1)(2n!)

Thus 1
2
1 Pn ( x)dx  2n  1
2

12-Nov-10 8
Theorem:
{P0(x), P1(x), …, Pn(x)} forms a basis for n,
the (n+1) dimensional space of all polynomials
pk(x) of degree k  n
Proof: We show {P0(x), P1(x), …, Pn(x)} is
linearly independent.
Let  0 P0 ( x)  1P1 ( x)  ...   n Pn ( x)  0
Multiplying both sides by pk(x) and integrating
from x = -1 to x = +1, we get (using the
orthogonality of Pns) that
12-Nov-10 9
2
0  0  ...   k  ...  0  0
2k  1
or k  0

This is true for all k = 0,1,…,n


Hence {P0(x), P1(x), …, Pn(x)}is a linearly
independent set of (n+1) vectors in the
(n+1) dimensional space n and hence is a
basis for it.
12-Nov-10 10
Fact: Pn(x) is orthogonal to all polynomials
q(x) of degree < n. That is whenever q(x) is a
polynomial of degree < n,
1

 P ( x)q( x)dx  0
1
n

Proof: Since q(x) is a polynomial of degree < n


we can write it as a unique l.c. of P0(x), P1(x),
…, Pn-1(x). That is
q( x)   0 P0 ( x)  1P1 ( x)  ...   n1Pn1 ( x)
12-Nov-10 11
Multiplying both sides by Pn(x) and
integrating from x = -1 to x = 1, we get

 P ( x)q( x)dx  0
1
n

as 1

 P ( x)P ( x)dx  0
1
n m if m  n

12-Nov-10 12
Recurrence Relation for Pn(x):
xPn(x) is a polynomial of degree (n+1) and
so can be written as a unique l.c. of P0(x),
P1(x), …, Pn(x), Pn+1(x) :
xPn ( x)   0 P0 ( x)  1P1 ( x)  ...   n1Pn1 ( x)   n Pn ( x) n1Pn1 ( x)
Let k < n-1
Multiplying both sides by Pk(x) and
integrating from x = -1 to x = +1 we get,
1 1
2
1 xPk ( x)Pn ( x)dx   k 1 Pk ( x)dx   k 2k  1
2

12-Nov-10 13
Now as k < n-1, xPk(x) is a polynomial of
degree < n and hence LHS = 0.
Thus we get  k  0 for all k < n-1

Hence xPn ( x)   k 1Pk 1 ( x)   n Pn ( x)   n1Pn1 ( x)

Multiplying both sides by Pn(x) and


integrating from x = -1 to x = +1, we get
1 1
2
1 xPn ( x)dx   n 1 Pn ( x)dx   n 2n  1
2 2

12-Nov-10 14
Now Pn(-x) = (-1)n Pn(x)

Hence Pn2(-x) = Pn2(x) i.e; Pn2(x) is an even


function. Hence xPn2(x) is an odd function
and thus LHS integral = 0
Therefore n  0
Hence xPn ( x)   n1Pn1 ( x)   n1Pn1 ( x)
Equating the coefficients of xn+1 on both
sides, we get (2n!) (2n  2)!
 n 1 n 1
n
2 (n!) 2
2 (n  1)!
2

12-Nov-10 15
or 2(n  1)(n  1) n 1
 n1  
(2n  1)(2n  2) 2n  1

Equating the coefficients of xn-1 on both


sides, we get
1 (2n  2)! 1 (2n  2)! 1 (2n)!
 n n   n1 n1   n1 n1 (n  1)
2 n! (n  2)! 2 [(n  1)!]2
2 (n  1)! (n  1)!
1  n 1 (n  1)(2n  1)
i.e.   
2 n  1 2(n  1)(2n  1)
(n  1)(2n  1) n  1 n
Therefore  n1   
2(2n  1) 2 2n  1
12-Nov-10 16
Thus xPn ( x) 
( n  1) n
Pn1 ( x)  Pn1 ( x)
(2n  1) (2n  1)

(2n  1) n
or Pn1 ( x)  xPn ( x)  Pn1 ( x) (n ≥1)
(n  1) (n  1)
Noting that P0(x) =1, P1(x) = x,
3 2 1
n = 1 gives P2 ( x)  x 
2 2

n = 2 gives 5 3 3 1 2 5 3 3
P3 ( x)  ( x  x)  x  x  x
3 2 2 3 2 2

12-Nov-10
and so on 17
Zeros of the Legendre polynomials:
Theorem: For all n ≥ 1, Pn(x) has n distinct
real zeros all of which lie between –1 and 1.
1 1
Proof: Now  P ( x)dx   P ( x)P ( x)dx  0
1
n
1
n 0

as n  0
Hence Pn(x) changes sign at least once between
–1 and 1. That is there is at least one real zero
of Pn(x) between x = -1 and x = +1.
12-Nov-10 18
Let Pn(x) have k distinct real zeros between –1
and +1. (Note that Pn(x) being the nontrivial
solution of a second order homogeneous l.d.e.
does not have any repeated zero.)
We show k = n (and we would have proved the
theorem).
Call them as x1 < x2 <…< xk.
Look at q(x) = (x- x1)(x- x2)…(x- xk)
Now Pn(x) = r(x)q(x) where r(x) is not zero for
any x between –1 and 1 and so is of the same
sign in the interval [-1, 1].
12-Nov-10 19
Now Pn(x) = r(x)q(x) where r(x) is not zero
for any x between –1 and 1 and so is of the
same sign in the interval [-1, 1].
1 1

 P( x)q( x)dx   r ( x)q ( x)dx  0


2
Thus
1 1

as the integrand r(x)q2(x) is of same sign.


Hence degree of q(x) ≥ n
i.e. k ≥ n
But k  n. Hence k = n.
12-Nov-10 20
Generating Function for Pn(x)

It can be shown that


1
 P0 ( x)  P1 ( x)t  P2 ( x)t  ....
2

1  2 xt  t 2

 Pn ( x)t  ...
n

1
is known as the generating
1  2xt  t 2

function for Pn(x).


12-Nov-10 21
1
Now 1 
 [1  (2 xt  t )]
2 2

1  2 xt  t 2

1 1 
    1
1 2 2 
 1  (2 xt  t ) 
2
(2 xt  t )  ....
2 2

2 2

Hence P0 ( x)  1 (Coefficient of t ) 0

P1 ( x)  x (Coefficient of t )
12-Nov-10 22
1 1
 (  1)
1
P2 ( x)    2 2  4x2
2 2
(Coefficient of t 2 )

3 2 1
 x 
2 2
And so on.

12-Nov-10 23
Thus taking x = 0, we get
1
 P0 (0)  P1 (0)t  P2 (0)t 2  ....
1 t 2

 Pn (0)t  ...
n

1
1 

But  (1  t )
2 2

1 t 2

4 6
1 2 1 3 t 1 3 5 t
 1  t         ...
2 2 2 2! 2 2 2 3!
12-Nov-10 24
Hence
P2 n1 (0)  coefficient of t 2n1  0 for all n  1, 2,...

P0 (0)  1
1 1 3 1 3
P2 (0)   P4 (0)    
2 2 2 2 8
1 3 (2n  1) 1 (2n)!
P2 n (0)  (1)   ... 
n
 (1) 2 n
n
2
2 2 2 n! 2 (n !)

12-Nov-10 25
Thus taking x = 1, we get
1
 P0 (1)  P1 (1)t  P2 (1)t  ....
2

1 t
 Pn (1)t  ...
n

1
But  1  t  t  ...
2

1 t
Hence Pn (1)  1 for all n  0,1, 2,...

12-Nov-10 26
Thus taking x = -1, we get
1
 P0 (1)  P1 (1)t  P2 (1)t  ....
2

1 t
 Pn (1)t  ...
n

1
But  1  t  t  ...  (1) t  ...
2 n n

1 t

Hence Pn (1)  (1) n


for all n  0,1, 2,...

12-Nov-10 27
Recurrence Relation satisfied by Pn(x) - an
alternative derivation
Look at the generating function for Pn(x):

1
  Pn ( x)t n

1  2 xt  t 2
n 0

Differentiating both sides with respect to t,


we get

12-Nov-10 28

1 1
  (2 x  2t )   nPn ( x)t n 1

 
3/ 2
2 1  2 xt  t 2 n 1

Multiplying both sides by 1  2xt  t 


2
we get


1
( x  t )  (1  2 xt  t 2 ) nPn ( x)t n 1
1  2 xt  t 2 n 1

12-Nov-10 29
 
( x  t ) Pn ( x)t  (1  2 xt  t ) nPn ( x)t
n 2 n 1

n 0 n 1

Equating the coefficients of t n


(n  1)
on both sides, we get
xPn ( x)  Pn1 ( x)
 (n  1) Pn1 ( x)  2 xnPn ( x)  (n  1) Pn1 ( x)

(2n  1) n
Or Pn 1 ( x)  x Pn ( x)  Pn 1 ( x)
n 1 n 1
12-Nov-10 30
Legendre Series Expansion of a function f(x)
We know that {P0(x), P1(x), …, Pn(x)) is a
basis for the space n of polynomials of
degree  n.
This means given any polynomial q(x) of
degree  n, we can write it as a unique (finite)
linear combination of P0(x), P1(x), …, Pn(x):

q( x)  0 P0 ( x)  1P1 ( x)  ...  n1Pn1 ( x)   n Pn ( x)


12-Nov-10 31
Now if f(x) is not a polynomial, it cannot be
expressed as a finite linear combination of
the Legendre Polynomials. But we ask: Can
we express it as an “infinite” l.c. of the
Legendre Polynomials? i.e. Is there a
“Legendre Series expansion” of f(x) of the
form:
f ( x)  a0 P0 ( x)  a1P1 ( x)  a2 P2 ( x)  ...

12-Nov-10 32
Assuming such a Legendre Series expansion
exists, we ask what are the values of the
coefficients an ?

Multiplying both sides by Pn(x) and integrating


from x = -1 to x = +1, (using the orthogonality
of the Legendre Polynomials), we get
1 1
2
 f ( x) Pn ( x)dx   an P ( x)dx  an
2

2n  1
n
1 1

12-Nov-10 33
Thus we get the Legendre series expansion of
f(x) as

f ( x)  a0 P0 ( x)  a1P1 ( x)  a2 P2 ( x)  ...

2n  1
1
where
an 
2 1  f ( x) Pn ( x)dx

n = 0, 1, 2, ..,
provided these integrals exist as finite numbers.
12-Nov-10 34
Find the first three terms in the Legendre
Series expansion of the function
f ( x)  e x

1
1 1 1
Solution a0   e dx  (e  )
x

2 1 2 e
1
3 3 3
a1   xe dx   xe  e  
x x x 1

2 1 2 1 e
12-Nov-10 35
1
5 3 2 1 x
a2   ( x  )e dx
2 1 2 2

1
5 3 2 1 x x
 ( x  )e  (3x)e  3e 
x

2 2 2  1

5 7
 e  
2 e And so on.

12-Nov-10 36
Least Squares Approximation

Given a function f(x), we ask: Find the


polynomial p(x)of degree  n that is “closest
to” f(x), in the “sense of Least Squares” . That
is find a polynomial of p(x)of degree  n that
minimizes the integral
1

  f ( x)  p ( x) 
2
dx
1

12-Nov-10 37
The integral
1

  f ( x)  p ( x) 
2
dx
1

Represents the (infinite) sum of squares of


vertical deviations of the polynomial p(x)
from f(x) (See the figure ).

12-Nov-10 38
| f(x) - p(x)| f(x)

p(x)

12-Nov-10 39
The answer: The sum of the first (n+1) terms
of the Fourier-Legendre Series of f(x).
Proof: We know that {P0(x), P1(x), …, Pn(x)}
form a basis for the space of all polynomials
of degree  n. Hence a polynomial p(x) of
degree  n can be written as
p( x)  b0 P0 ( x)  b1P1 ( x)  ...  bn Pn ( x)

for suitable constants b0 , b1 ,..., bn


12-Nov-10 40
1

  f ( x)  p ( x) 
2
Thus dx
1
2
 
1 n
   f ( x)  { bi Pi ( x)} dx
1  i 0 
1 n
2
  [ f ( x)] dx   2 2
bk
1 k  0 2k  1

n 1 1

2 bk  f ( x) Pk ( x)dx (as  Pi ( x) Pj ( x)dx  0


k 0 1
1
for i  j
12-Nov-10 41
1 n
2
  [ f ( x)] dx  
2 2
bk
1 k  0 2k  1

n
2ak
2 bk
k 0 2k  1

ak is the coefficient of Pk(x) in the Fourier-


Legendre Series expansion of f(x)

12-Nov-10 42
1 n
2
  [ f ( x)] dx 
2
(bk  ak ) 2

1 k  0 2k  1

n
2
 2
ak
k  0 2k  1

which is clearly least when bk = ak for all k.

Q.E.D.

12-Nov-10 43
In the following slides, we do some
problems involving legendre Polynomials,
based on the definition, properties and the
recurrence relation satisfied by them.

12-Nov-10 44
We know
n 1
1 d n 1
Pn 1 ( x)  n 1 n 1
( x 2
 1)
2 (n  1)! dx
n 1
1 d
 n 1 n 1
[( x 2
 1) n
( x 2
 1)]
2 (n  1)! dx

12-Nov-10 45
Hence Pn1 ( x)
n2
1 d
 n 1 n2
[( x 2
 1) n
( x 2
 1)]
2 (n  1)! dx
Differentiating the RHS using Leibniz rule,
we get

12-Nov-10 46
Pn1 ( x)
n 2
1 d
 n 1 n 2
[( x 2
 1) n
]  ( x 2
 1)
2 (n  1)! dx
n 1
1 d
 n 1 (n  2) n 1 [( x  1) ]  2 x
2 n

2 (n  1)! dx
1  n  2  d n
 n 1   n [( x  1) ]  2
2 n

2 (n  1)!  2  dx
12-Nov-10 47
 1
P
Or n 1 ( x )  Pn( x)  ( x  1)
2

2(n  1)
(n  2) (n  2)
 x Pn( x)  Pn ( x)
(n  1) 2
We used the fact
n
1 d
Pn ( x)  n n
( x  1)
2 n

2 n ! dx
12-Nov-10 48
(1  x ) Pn( x)  2 x Pn( x)  n(n  1) Pn ( x)  0
But
2

Thus Pn1 ( x)

1
 [2 x Pn( x)  n(n  1) Pn ( x)]
2(n  1)
(n  2) (n  2)
 x Pn( x)  Pn ( x)
(n  1) 2

12-Nov-10 49
Or Pn1 ( x)  xPn( x)  (n  1) Pn ( x)

12-Nov-10 50
The recurrence relation for Pn(x) is
(2n  1) n
Pn 1 ( x)  x Pn ( x)  Pn 1 ( x)
n 1 n 1
Differentiating both sides with respect to x,
we get (2n  1) (2n  1)

Pn 1 ( x)   x Pn ( x)  Pn ( x)
n 1 n 1
n
 Pn1 ( x)
n 1
But Pn1 ( x)  xPn( x)  (n  1) Pn ( x)
12-Nov-10 51
Thus
(2n  1) (2n  1) n
x Pn( x)  Pn ( x)  Pn1 ( x)
n 1 n 1 n 1

 xPn( x)  (n  1) Pn ( x)

or n x Pn( x)  nPn1 ( x)  n Pn ( x)
2

i.e. x Pn( x)  Pn1 ( x)  nPn ( x)

12-Nov-10 52
We have

Pn1 ( x)  xPn( x)  (n  1) Pn ( x) (1)


and
x Pn( x)  Pn1 ( x)  nPn ( x) (2)
Adding, we get
Pn1 ( x)  Pn1 ( x)  (2n  1) Pn ( x)

12-Nov-10 53
In (1), replacing n by n-1 we get

Pn( x)  xPn1 ( x)  nPn1 ( x) ...(3)


Multiplying (2) by – x, we get
 x Pn( x)  xPn1 ( x)  nxPn ( x) ...(4)
2

Adding, we get

(1  x ) Pn( x)  nPn1 ( x)  n x Pn ( x)
2

12-Nov-10 54
Multiplying the recurrence relation
(2n  1) n
Pn 1 ( x)  x Pn ( x)  Pn 1 ( x)
n 1 n 1

by Pn-1(x) and integrating both sides from x =


-1 to x = 1, we get
(2n  1)
1 1
n
0  x Pn ( x) Pn 1 ( x)  
2
Pn 1 ( x)dx
n  1 1 n  1 1

12-Nov-10 55
Or
(2n  1)
1 1
n
0  x Pn ( x) Pn 1 ( x)  
2
Pn 1 ( x)dx
n  1 1 n  1 1
i.e.
1
n 2 2n
1 x Pn ( x) Pn1 ( x) dx  2n  1 2n  1  4n2  1

12-Nov-10 56
We know Pn1 ( x)  Pn1 ( x)  (2n  1) Pn ( x)

Multiplying both sides by Pn(x) and integrating


both sides from x = - 1 to x = 1, we get
1

 P ( x ) P
1
n n 1 ( x)dx  2

12-Nov-10 57
We have shown that

x Pn( x)  Pn1 ( x)  nPn ( x)


Multiplying both sides by Pn(x) and integrating
both sides from x = - 1 to x = 1, we get
1
2n
1 xPn( x) Pn ( x)dx  2n  1

12-Nov-10 58

You might also like