Skip to main content

Section 15.2 Legendre polynomials

The idea of orthogonality can be taken from linear algebra and applied to functions. Two functions \(f\) and \(g\) are orthogonal on an interval \([a,b]\) if their inner product \(\int_a^b f(x)g(x)\,dx\) is zero: \(\int_a^b f(x)g(x)\,dx =0\text{.}\) For example, \(1\) and \(x\) are orthogonal on \([-1,1]\text{.}\) And \(x^2\) is orthogonal to \(x\) on this interval, but it is not orthogonal to \(1\text{.}\) Is there a second-degree polynomial that is orthogonal to both \(1\) and \(x\text{?}\) Yes, there is: \(p(x) = x^2-1/3\) (check this).

This process continues indefinitely: for every positive integer \(n\) we can find a polynomial of degree \(n\text{,}\) say \(P_n\text{,}\) which is orthogonal to all polynomials of degrees up to \(n-1\text{,}\) by the Gram-Schmidt algorithm. The roots of this polynomial \(P_n\) turn out to be contained in the interval \([a, b]\text{.}\) These roots will shown to be useful as the evaluation/sample points.

In the above process, the polynomials \(P_n\) are determined up to a multiplicative constant. It is convenient to normalize them by requiring \(P_n(1)=1\text{.}\) This makes \(P_n\) the unique \(n\)-th degree polynomial such that \(\int_{-1}^1 x^kP_n(x)\,dx = 0\) for \(k =0, 1, \dots, n-1\text{,}\) and \(P_n(1)=1\text{.}\) Note that \(\int_{-1}^1 Q(x)P_n(x)\,dx = 0\) for every polynomial \(Q\) with degree \(\deg Q< n\text{.}\)

The polynomials \(P_n\) are called Legendre polynomials, and they come up in a number of contexts. They originated in physics: in a 1782 paper by Legendre, he used them to expand the electrostatic potential into a power series. A practical way to compute Legendre polynomials is the recursive formula

\begin{equation} P_{n+1}(x) = \frac{(2n+1) xP_n(x) - nP_{n-1}(x)}{n+1}\label{eq-legendre-recursion}\tag{15.2.1} \end{equation}

which can be used to compute all these polynomials starting with \(P_0(x)=1\) and \(P_1(x)=x\text{.}\)

Using the formula (15.2.1), find the polynomials \(P_n\) for \(n=2, 3, 4\text{.}\) What are their roots?

What patterns in the polynomials \(P_n\) do you observe on the basis of the examples computed above?