# 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, *P*_{n}(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 *P*_{n}(x) and integrate
over* x*. Due to the orthogonality and
norms of the Legendre
polynomials, we obtain .

## Exercises:

- Show that the coefficients for the
**step function**, *f(x) = {0
if -1<x<0 and 1 if 0<x<1}*, namely , are given by *s*_{0} = 1, *s*_{k}=0
for k>0 even, and for k odd.
- 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 *P*_{0} and *P*_{1} into the expression for *a*_{n}
to find *a*_{0}=1/2, and *a*_{1}=5/8. Lastly, .

## Problems:

- Show that .
- 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]
- Additional references.

Home

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