# Legendre Polynomials. Basis for expansion of functions f(x) in the range -1<x<1.

The general prescription for expansion in a basis is illustrated by the Fourier series method. In the present case, our basis is the set of all Legendre polynomials, Pn(x). Then, if f(x) is an arbitrary function in -1<x<1, we write the Legendre series: . To find the coefficients, multiply both sides by Pn(x) and integrate over x. Due to the orthogonality and norms of the Legendre polynomials, we obtain  .

## Exercises:

1. Show that the coefficients for the step functionf(x) = {0 if -1<x<0 and 1 if 0<x<1}, namely , are given by s0 = 1, sk=0 for k>0 even, and for k odd.
2. Find the coefficients in the Legendre series for f(x) = |x|.
Hints: Note that f(x) is even. Integrate by parts and use the recurrence relation. Solution: The coefficients are given by . To evaluate this integral, first note that the integrand has even parity if n is even and odd parity if n is odd. Therefore, the odd-n coefficients vanish and the even-n coefficients are given by . Second, substitute the forms of P0 and P1 into the expression for an to find a0=1/2, and a1=5/8. Lastly, .

## Problems:

1. Show that .
2. Create a plot showing the step function, together with the first 6 terms of the Legendre series found in the exercise.

## References

• O. D. Kellogg, Foundations of Potential Theory [Dover, 1953]

Home

Created or up-dated 08/03/99   by R.D. Poshusta