LEGENDRE SERIES

9. LEGENDRE SERIES

Since the Legendre polynomials form a complete orthogonal set on (−1, 1), we can expand functions in Legendre series just as we expanded functions in Fourier series.

Example 1. Expand in a Legendre series the function f (x) given by

(see Figure 9.1). We put

f (x) =

c (x).

Figure 9.1

l=0

Our problem is to find the coefficients c l . We do this by a method parallel to the one we used in finding the formulas for the coefficients in a Fourier series. We multiply both sides of (9.2) by P m (x) and integrate from −1 to 1. Because the Legendre polynomials are orthogonal, all the integrals on the right are zero except the one containing c m , and we can evaluate it by (8.1). Thus we get

f (x)P m (x) dx =

P l (x)P m (x) dx = c m · .

l=0

2m + 1

Section 9 Legendre Series 581

Using this result in our example (9.1), we find

f (x)P 0 (x) dx = c 0 [P 0 (x)] 2 dx

f (x)P

1 (x) dx = c 1 [P 1 (x)] dx

f (x)P 2 (x) dx = c 2 [P 2 (x)] 2 dx

Continuing in this way we find for the function given in (9.1) (9.4)

f (x) = 1 P 0 (x) + 3 2 11 4 P 1 (x) − 7 16 P 3 (x) + 32 P 5 (x) + · · · . It is unnecessary for f (x) to be continuous as it must be for expansion in a

Maclaurin series. Just as for Fourier series, the Dirichlet conditions (see Chapter 7, Section 6) are a convenient set of sufficient conditions for a function f (x) to be expandable in a Legendre series. If f (x) satisfies the Dirichlet conditions on (−1, 1), then at points inside (−1, 1) (not necessarily at the endpoints), the Legendre series converges to f (x) anywhere f (x) is continuous and converges to the midpoint of the jump at discontinuities.

Example 2. Here is an interesting fact about Legendre series. Sometimes we want to fit

a given curve as closely as possible by a polynomial of a given degree, say a cubic. The criterion of “Least Squares” is often used to determine the best fit. This means that if, say, we want to fit a given f (x) on (−1, 1) by a cubic, we find the coefficients

a, b, c, d so that

(9.5) [f (x) − (ax 3 + bx 2 + cx + d)] 2 dx

is as small as possible. Then (9.6)

f (x) ∼ 3 = ax + bx 2 + cx + d

is called the best approximation (by a cubic) in the least squares sense. It can

be proved that an expansion (as far as the desired degree of the polynomial ap- proximation) in Legendre polynomials gives this best least squares approximation (Problem 16).

PROBLEMS, SECTION 9

Expand the following functions in Legendre series. (

0<x<1 3. f (x) = P 3 ′ (x)

0<x<1

x,

4. f (x) = arc sin x 5.

582 Series Solutions of Differential Equations Chapter 12 ( 0

6. f (x) = on (−1, 0)

1 ´ 2 `ln Hint: See Chapter 11, Section 3, Problem 13.

on (0, 1) (

7. f (x) = on (−1, 0)

√ Hint: See Chapter 11, Sections 6 and 7. 1 − x on (0, 1)

8. Hint: Solve the recursion relation (5.8e) for P l (x) and show that

P l (x) dx =

1 [P

l−1 (a) − P l+1 (a)].

a 2l + 1

R (x). 1 Hint: For l ≥ n, −1 P n ′ (x)P l (x) dx = 0 (Why?); for l < n, integrate by parts.

9. f (x) = P n ′

Expand each of the following polynomials in a Legendre series. You should get the same results that you got by a different method in the corresponding problems in Section 5.

10. 3x 2 +x−1 11. 7x 4 − 3x + 1 3 12. x−x Find the best (in the least squares sense) second-degree polynomial approximation to each

of the given functions over the interval −1 < x < 1. (See Problem 16.)

13. x 4 14. |x|

15. cos πx

16. Prove the least squares approximation property of Legendre polynomials [see (9.5) and (9.6)] as follows. Let f (x) be the given function to be approximated. Let the functions p l (x) be the normalized Legendre polynomials, that is,

so that

[p l (x)] 2 dx = 1.

Show that the Legendre series for f (x) as far as the p 2 (x) term is Z 1

f (x) = c 0 p 0 (x) + c 1 p 1 (x) + c 2 p 2 (x)

with c l =

f (x)p l (x) dx.

Write the quadratic polynomial satisfying the least squares condition as b 0 p 0 (x) + b 1 p 1 (x) + b 2 p 2 (x) (by Problem 5.14 any quadratic polynomial can be written in this

form). The problem is to find b 0 ,b 1 ,b 2 so that

I=

[f (x) − (b 0 p

2 0 (x) + b 1 p 1 (x) + b 2 p 2 (x))] dx

is a minimum. Square the bracket and write I as a sum of integrals of the individual terms. Show that some of the integrals are zero by orthogonality, some are 1 because the p l ’s are normalized, and others are equal to the coefficients c l . Add and subtract

c 2 0 +c 2 1 +c 2 2 and show that Z 1

I= [f 2 (x) + (b 0 −c 0 ) 2 + (b 1 1 ) 2 + (b 2 2 ) 2 2 2 −c 2 −c −c 0 −c 1 −c 2 ] dx.

Now determine the values of the b’s to make I as small as possible. (Hint: The smallest value the square of a real number can have is zero.) Generalize the proof to polynomials of degree n.

Section 10 The Associated Legendre Functions 583