Back to the on-screen lesson ·

Orthogonal polynomial families

What an interval and a weight buy: a diagonal Gram matrix, a three-term recurrence, and $n$ real roots strictly inside the interval — the last proved without computing anything.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to say what defines an orthogonal family, compute a coefficient in an orthogonal expansion without solving a system, name the weight and interval of the standard families, prove the three-term recurrence, and prove that the roots lie strictly inside the interval.

2. What you already know

You know that a least-squares fit is a projection, that the coefficients solve a Gram system, and that in the monomial basis that system is the Hilbert matrix and hopeless. This lesson builds the basis that makes the Gram matrix diagonal, and finds that several other good things come with it.

3. The words this lesson uses

A weight $w$ is a positive function on an interval, and it defines the inner product $\langle f, g\rangle = \int w f g$. A family $p_0, p_1, \ldots$ with $\deg p_n = n$ is orthogonal for that weight when $\langle p_i, p_j\rangle = 0$ for $i \ne j$. A moment is $\int w x^{k}$. A three-term recurrence expresses $p_{n+1}$ from $p_n$ and $p_{n-1}$ alone.

4. Two choices, and everything else follows

Fix an interval and a positive weight. Running Gram-Schmidt on $1, x, x^{2}, \ldots$ in the resulting inner product gives an orthogonal family, one polynomial of each degree, unique up to scaling. The interval and the weight are the only inputs: $[-1, 1]$ with $w = 1$ gives Legendre, the same interval with $w = (1 - x^{2})^{-1/2}$ gives Chebyshev, $[0, \infty)$ with $w = e^{-x}$ gives Laguerre, the whole line with $w = e^{-x^{2}}$ gives Hermite. Three consequences then hold for every such family. (i) The Gram matrix is diagonal, so a least-squares coefficient is $c_k = \dfrac{\langle f, p_k\rangle}{\langle p_k, p_k\rangle}$ — one quotient, no system, and raising the degree does not disturb the coefficients already found. (ii) A three-term recurrence holds, because $xp_n$ expanded in the family has all but three coefficients killed by orthogonality; so a family is evaluated in $O(n)$ work without ever writing down a coefficient in powers of $x$. (iii) $p_n$ has $n$ real simple roots, strictly inside the interval — proved by contradiction from orthogonality alone, computing nothing. The third is the one the quadrature unit will need.

Another way: steps

  1. Choose the interval and the weight; that is the family chosen.
  2. Get the moments $\int w x^{k}$, or the recurrence, from a table or from Gram-Schmidt.
  3. Compute coefficients as separate quotients of inner products.
  4. Evaluate the family by its recurrence, never by its expanded coefficients.

Another way: example

Legendre: $p_0 = 1$; $p_1 = x$, already orthogonal to $p_0$ because $\int_{-1}^{1}x\,dx = 0$; $p_2 = x^{2} - \tfrac13$, because $\int_{-1}^{1}x^{2}\,dx = \tfrac23$ and $\int_{-1}^{1}1\,dx = 2$. Every step is one moment away from the last.

5. The mistake to watch for

Orthogonality is treated as a property of the polynomials rather than of the pair polynomials and weight. It is not: the Legendre and Chebyshev families live on the same interval and are different families, and a Chebyshev polynomial is not orthogonal to its neighbours with weight $1$. The second half of the mistake is expanding a member of a family into powers of $x$ to evaluate it. The coefficients grow and alternate, the evaluation cancels catastrophically by degree twenty, and the recurrence — which exists precisely so this is unnecessary — is both faster and stable.

6. A coefficient, in one line

  1. Approximate $f$ by a Legendre series: $c_1 = \dfrac{\int_{-1}^{1} f x\,dx}{\int_{-1}^{1} x^{2}\,dx}$.

    One quotient.

  2. The denominator is $\tfrac23$, so $c_1 = \tfrac32\int fx\,dx$, whatever $f$ is and whatever other terms are kept.

    Independent of the rest.

7. Roots strictly inside

  1. $p_2 = x^{2} - \tfrac13$ has roots at $\pm\tfrac{1}{\sqrt3} \approx \pm 0.577$.

    Both inside $[-1, 1]$.

  2. $p_3 = x^{3} - \tfrac35 x$ has roots at $0$ and $\pm\sqrt{3/5} \approx \pm 0.775$.

    Three, real, simple, interior.

  3. These are the nodes of the two- and three-point Gauss rules.

    Where the unit is heading.

8. Your turn: build $p_2$ for weight $1$ on $[-1, 1]$

  1. Start from $x^{2}$ and subtract its components along $p_0 = 1$ and $p_1 = x$.

  2. $\langle x^{2}, x\rangle = 0$ by symmetry, and $\dfrac{\langle x^{2}, 1\rangle}{\langle 1, 1\rangle} = \dfrac{2/3}{2} = \dfrac13$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    So $p_2 = x^{2} - \tfrac13$, which is the Legendre polynomial up to the usual scaling by $\tfrac32$.

9. Guided practice

Is this right: every family of orthogonal polynomials satisfies a three-term recurrence?

10. Guided practice

With weight $1$ on $[-1, 1]$, give $\displaystyle\int_{-1}^{1} x^{k}\,dx$ for $k = 6$, $7$ and $8$. Give fractions where the values are not whole.

PowerIntegral
Power $6$6
Power $7$7
Power $8$8

11. Practice

A function is expanded in an orthogonal family. For one basis function, $\langle f, p_k\rangle = 6$ and $\langle p_k, p_k\rangle = 8$. What is the coefficient of $p_k$ in the least-squares approximation? Give a fraction.

Answer:

12. Practice

Match each family of orthogonal polynomials to the interval and weight that define it.

$[-1, 1]$ with weight $1$$[-1, 1]$ with weight $1/\sqrt{1 - x^{2}}$$[0, \infty)$ with weight $e^{-x}$the whole line with weight $e^{-x^{2}}$
Legendre
Chebyshev of the first kind
Laguerre
Hermite

13. Somewhere new

Suppose $p_{7}$, of degree $7$ in an orthogonal family, changed sign at fewer than $7$ points inside the interval. Say how many sign changes the argument shows it must have, and the largest degree the auxiliary polynomial $q$ built from those points could have.

At least w sign changes inside the interval, and $q$ would have degree at most z.

14. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

15. Test question

Put the five steps that prove every orthogonal family satisfies a three-term recurrence into order.

Number the steps in order (write the number in the box):

16. What you can do now

You can define an orthogonal family and derive the three properties that follow from orthogonality. Say in your own words why the roots of an orthogonal polynomial cannot lie outside the interval.

Working for the steps left to you

8. Your turn: build $p_2$ for weight $1$ on $[-1, 1]$, step 3