Jim Lambers
MAT 460/560
Fall Semeseter 2009-10
Lecture 37 Notes
These notes correspond to Section 8.2 in the text.
Orthogonal Polynomials and Least Squares Approximations, contβd
Previously, we learned that the problem of ο¬nding the polynomial ππ (π₯), of degree π, that best
approximates a function π (π₯) on an interval [π, π] in the least squares sense, i.e., that minimizes
(β«
β₯ππ β π β₯ =
)1/2
π
2
[ππ (π₯) β π (π₯)] ππ₯
,
π
is easy to solve if we represent ππ (π₯) as a linear combination of orthogonal polynomials,
ππ (π₯) =
π
β
ππ ππ (π₯).
π=0
Each polynomial ππ (π₯) is of degree π, and the set of polynomials π0 (π₯), π1 (π₯), . . . , ππ (π₯) are orthogonal with respect to the inner product
β« π
β¨π, πβ© =
π (π₯)π(π₯) ππ₯.
π
That is,
β«
β¨ππ , ππ β© =
π
ππ (π₯)ππ (π₯) ππ₯ = 0,
π β= π.
π
Given this sequence of orthogonal polynomials, the coeο¬cients ππ in the linear combination used
to compute ππ (π₯) are given by
ππ =
β¨ππ , π β©
,
β¨ππ , ππ β©
ππ = 0, 1, . . . , π.
Now, we focus on the task of ο¬nding such a sequence of orthogonal polynomials.
Recall the process known as Gram-Schmidt orthogonalization for obtaining a set of orthogonal
vectors p1 , p2 , . . . , pπ from a set of linearly independent vectors a1 , a2 , . . . , aπ :
p1 = a 1
p2 = a 2 β
p1 β
a2
p1
p1 β
p1
1
..
.
pπ = a π β
πβ1
β
π=0
pπ β
a π
pπ .
pπ β
pπ
By normalizing each vector pπ , we obtain a unit vector
qπ =
1
pπ ,
β£pπ β£
and a set of orthonormal vectors {qπ }ππ=1 , in that they are orthogonal (qπ β
qπ = 0 for π β= π), and
unit vectors (qπ β
qπ = 1).
We can use a similar process to compute a set of orthogonal polynomials. For simplicitly, we will
require that all polynomials in the set be monic; that is, their leading (highest-degree) coeο¬cient
must be equal 1. We then deο¬ne π0 (π₯) = 1. Then, because π1 (π₯) is supposed to be of degree 1, it
must have the form π1 (π₯) = π₯ β πΌ1 for some constant πΌ1 . To ensure that π1 (π₯) is orthogonal to
π0 (π₯), we compute their inner product, and obtain
0 = β¨π0 , π1 β© = β¨1, π₯ β πΌ1 β©,
so we must have
πΌ1 =
β¨1, π₯β©
.
β¨1, 1β©
For π > 1, we start by setting ππ (π₯) = π₯ππβ1 (π₯), since ππ should be of degree one greater
than that of ππβ1 , and this satisο¬es the requirement that ππ be monic. Then, we need to subtract
polynomials of lower degree to ensure that ππ is orthogonal to ππ , for π < π. To that end, we apply
Gram-Schmidt orthogonalization and obtain
ππ (π₯) = π₯ππβ1 (π₯) β
πβ1
β
β¨ππ , π₯ππβ1 β©
π=0
β¨ππ , ππ β©
ππ (π₯).
However, by the deο¬nition of the inner product, β¨ππ , π₯ππβ1 β© = β¨π₯ππ , ππβ1 β©. Furthermore, because
π₯ππ is of degree π + 1, and ππβ1 is orthogonal to all polynomials of degree less than π, it follows that
β¨ππ , π₯ππβ1 β© = 0 whenever π < π β 1.
We have shown that sequences of orthogonal polynomials satisfy a three-term recurrence relation
2
ππ (π₯) = (π₯ β πΌπ )ππβ1 (π₯) β π½πβ1
ππβ2 (π₯),
2
where the recursion coeο¬cients πΌπ and π½πβ1
are deο¬ned to be
πΌπ =
β¨ππβ1 , π₯ππβ1 β©
,
β¨ππβ1 , ππβ1 β©
2
π > 1,
π > 1,
π½π2 =
β¨ππβ1 , π₯ππ β©
β¨π₯ππβ1 , ππ β©
β¨ππ , ππ β©
β₯ππ β₯2
,
=
=
=
β¨ππβ1 , ππβ1 β©
β¨ππβ1 , ππβ1 β©
β¨ππβ1 , ππβ1 β©
β₯ππβ1 β₯2
π β₯ 1.
Note that β¨π₯ππβ1 , ππ β© = β¨ππ , ππ β© because π₯ππβ1 diο¬ers from ππ by a polynomial of degree at most
π β 1, which is orthogonal to ππ . The recurrence relation is also valid for π = 1, provided that we
deο¬ne ππβ1 (π₯) β‘ 0, and πΌ1 is deο¬ned as above. That is,
π1 (π₯) = (π₯ β πΌ1 )π0 (π₯),
πΌ1 =
β¨π0 , π₯π0 β©
.
β¨π0 , π0 β©
If we also deο¬ne the recursion coeο¬cient π½0 by
π½02 = β¨π0 , π0 β©,
and then deο¬ne
ππ (π₯) =
ππ (π₯)
,
π½0 π½1 β
β
β
π½π
then the polynomials π0 , π1 , . . . , ππ are also orthogonal, and
β¨ππ , ππ β© =
β¨ππ , ππ β©
2
π½0 π½12 β
β
β
π½π2
= β¨ππ , ππ β©
β¨ππβ1 , ππβ1 β©
β¨π0 , π0 β©
1
β
β
β
= 1.
β¨ππ , ππ β©
β¨π1 , π1 β© β¨π0 , π0 β©
That is, these polynomials are orthonormal.
If we consider the inner product
β«
1
β¨π, πβ© =
π (π₯)π(π₯) ππ₯,
β1
then a sequence of orthogonal polynomials, with respect to this inner product, can be deο¬ned as
follows:
πΏ0 (π₯) = 1,
πΏ1 (π₯) = π₯,
2π + 1
π
πΏπ+1 (π₯) =
π₯πΏπ (π₯) β
πΏπβ1 (π₯),
π+1
π+1
π = 1, 2, . . .
These are known as the Legendre polynomials. One of their most important applications is in the
construction of Gaussian quadrature rules. Speciο¬cally, the roots of πΏπ (π₯), for π β₯ 1, are the nodes
of a Gaussian quadrature rule for the interval [β1, 1]. However, they can also be used to easily
compute continuous least-squares polynomial approximations, as the following example shows.
Example We will use Legendre polynomials to approximate π (π₯) = cos π₯ on [βπ/2, π/2] by a
quadratic polynomial. First, we note that the ο¬rst three Legendre polynomials, which are the ones
of degree 0, 1 and 2, are
πΏ0 (π₯) = 1,
πΏ1 (π₯) = π₯,
3
1
πΏ2 (π₯) = (3π₯2 β 1).
2
However, it is not practical to use these polynomials directly to approximate π (π₯), because they
are orthogonal with respect to the inner product deο¬ned on the interval [β1, 1], and we wish to
approximate π (π₯) on [βπ/2, π/2].
To obtain orthogonal polynomials on [βπ/2, π/2], we replace π₯ by 2π‘/π, where π‘ belongs to
[βπ/2, π/2], in the Legendre polynomials, which yields
(
)
2π‘
1 12 2
Λ
Λ
Λ
πΏ0 (π‘) = 1, πΏ1 (π‘) = , πΏ2 (π‘) =
π‘ β1 .
π
2 π2
Then, we can express our quadratic approximation π2 (π₯) of π (π₯) by the linear combination
Λ 0 (π₯) + π1 πΏ
Λ 1 (π₯) + π2 πΏ
Λ 2 (π₯),
π2 (π₯) = π0 πΏ
where
ππ =
Λπ β©
β¨π, πΏ
,
Λπ , πΏ
Λπ β©
β¨πΏ
π = 0, 1, 2.
Computing these inner products yields
Λ 0β© =
β¨π, πΏ
β«
π/2
cos π‘ ππ‘
βπ/2
= 2,
β« π/2
2π‘
Λ
β¨π, πΏ1 β© =
cos π‘ ππ‘
βπ/2 π
= 0,
)
β« π/2 (
1 12 2
Λ
β¨π, πΏ2 β© =
π‘ β 1 cos π‘ ππ‘
π2
βπ/2 2
2 2
=
(π β 12),
π2
β« π/2
Λ 0, πΏ
Λ 0β© =
β¨πΏ
1 ππ‘
βπ/2
= π,
β« π/2 ( )2
2π‘
Λ
Λ
β¨πΏ1 , πΏ1 β© =
ππ‘
π
βπ/2
8π
=
,
3
)]2
β« π/2 [ (
1 12 2
Λ
Λ
β¨πΏ2 , πΏ2 β© =
π‘ β1
ππ‘
π2
βπ/2 2
π
=
.
5
4
It follows that
and therefore
2
,
π
2 5 2
10
(π β 12) = 3 (π 2 β 12),
2
π π
π
(
)
2
12 2
5 2
π2 (π₯) = + 3 (π β 12)
π₯ β 1 β 0.98016 β 0.4177π₯2 .
π π
π2
π0 =
π1 = 0,
π2 =
This approximation is shown in Figure 1. β‘
Figure 1: Graph of cos π₯ (solid blue curve) and its continuous least-squares quadratic approximation
(red dashed curve) on [βπ/2, π/2]
It is possible to compute sequences of orthogonal polynomials with respect to other inner products. A generalization of the inner product that we have been using is deο¬ned by
β« π
β¨π, πβ© =
π (π₯)π(π₯)π€(π₯) ππ₯,
π
where π€(π₯) is a weight function. To be a weight function, it is required that π€(π₯) β₯ 0 on (π, π), and
that π€(π₯) β= 0 on any subinterval of (π, π). So far, we have only considered the case of π€(π₯) β‘ 1.
5
Another weight function of interest is
π€(π₯) = β
1
,
1 β π₯2
β1 < π₯ < 1.
A sequence of polynomials that is orthogonal with respect to this weight function, and the associated
inner product
β« 1
1
ππ₯
β¨π, πβ© =
π (π₯)π(π₯) β
1 β π₯2
β1
is the sequence of Chebyshev polynomials
πΆ0 (π₯) = 1,
πΆ1 (π₯) = π₯,
πΆπ+1 (π₯) = 2π₯πΆπ (π₯) β πΆπβ1 (π₯),
π = 1, 2, . . .
which can also be deο¬ned by
πΆπ (π₯) = cos(π cosβ1 π₯),
β1 β€ π₯ β€ 1.
It is interesting to note that if we let π₯ = cos π, then
β« 1
1
ππ₯
β¨π, πΆπ β© =
π (π₯) cos(π cosβ1 π₯) β
1 β π₯2
β1
β« π
π (cos π) cos ππ ππ.
=
0
In later lectures, we will investigate continuous and discrete least-squares approximation of functions
by linear combinations of trigonometric polynomials such as cos ππ or sin ππ, which will reveal one
of the most useful applications of Chebyshev polynomials.
6
© Copyright 2026 Paperzz