5.6: Appendix- The Least Squares Approximation
( \newcommand{\kernel}{\mathrm{null}\,}\)
In the first section of this chapter we showed that we can expand functions over an infinite set of basis functions as
f(x)=∞∑n=1cnϕn(x)
and that the generalized Fourier coefficients are given by
cn=⟨ϕn,f⟩⟨ϕn,ϕn⟩.
In this section we turn to a discussion of approximating f(x) by the partial sums ∑Nn=1cnϕn(x) and showing that the Fourier coefficients are the best coefficients minimizing the deviation of the partial sum from f(x). This will lead us to a discussion of the convergence of Fourier series.
More specifically, we set the following goal:
To find the best approximation of f(x) on [a,b] by SN(x)=∑Nn=1cnϕn(x) for a set of fixed functions ϕn(x); i.e., to find the expansion coefficients, cn, such that SN(x) approximates f(x) in the least squares sense.
We want to measure the deviation of the finite sum from the given function. Essentially, we want to look at the error made in the approximation. This is done by introducing the mean square deviation:
EN=∫ba[f(x)−SN(x)]2ρ(x)dx,
where we have introduced the weight function ρ(x)>0. It gives us a sense as to how close the N th partial sum is to f(x).
We want to minimize this deviation by choosing the right cn ’s. We begin by inserting the partial sums and expand the square in the integrand:
EN=∫ba[f(x)−SN(x)]2ρ(x)dx=∫ba[f(x)−N∑n=1cnϕn(x)]2ρ(x)dx=∫baf2(x)ρ(x)dx−2∫baf(x)N∑n=1cnϕn(x)ρ(x)dx+∫baN∑n=1cnϕn(x)N∑m=1cmϕm(x)ρ(x)dx
Looking at the three resulting integrals, we see that the first term is just the inner product of f with itself. The other integrations can be rewritten after interchanging the order of integration and summation. The double sum can be reduced to a single sum using the orthogonality of the ϕn ’s. Thus, we have
EN=⟨f,f⟩−2N∑n=1cn⟨f,ϕn⟩+N∑n=1N∑m=1cncm⟨ϕn,ϕm⟩=⟨f,f⟩−2N∑n=1cn⟨f,ϕn⟩+N∑n=1c2n⟨ϕn,ϕn⟩.
We are interested in finding the coefficients, so we will complete the square in cn. Focusing on the last two terms, we have
−2N∑n=1cn<f,ϕn>+N∑n=1c2n<ϕn,ϕn>=N∑n=1<ϕn,ϕn>c2n−2<f,ϕn>cn=N∑n=1<ϕn,ϕn>[c2n−2<f,ϕn>cn⟨ϕn,ϕn⟩]=N∑n=1<ϕn,ϕn>[(cn−⟨f,ϕn⟩⟨ϕn,ϕn⟩)2−(⟨f,ϕn⟩<ϕn,ϕn>)2].
To this point we have shown that the mean square deviation is given as
EN=⟨f,f⟩+N∑n=1⟨ϕn,ϕn⟩[(cn−⟨f,ϕn⟩⟨ϕn,ϕn⟩)2−(⟨f,ϕn⟩⟨ϕn,ϕn⟩)2].
So, EN is minimized by choosing
cn=⟨f,ϕn⟩⟨ϕn,ϕn⟩.
However, these are the Fourier Coefficients. This minimization is often referred to as Minimization in Least Squares Sense.
Inserting the Fourier coefficients into the mean square deviation yields
0≤EN=⟨f,f⟩−N∑n=1c2n⟨ϕn,ϕn⟩.
Thus, we obtain Bessel’s Inequality:
<f,f>≥N∑n=1c2n<ϕn,ϕn>.
For convergence, we next let N get large and see if the partial sums converge to the function. In particular, we say that the infinite series converges in the mean if
∫ba[f(x)−SN(x)]2ρ(x)dx→0 as N→∞.
Letting N get large in Bessel's inequality shows that the sum ∑Nn=1c2n<ϕn,ϕn> converges if
<f,f>=∫baf2(x)ρ(x)dx<∞.
The space of all such f is denoted L2ρ(a,b), the space of square integrable functions on (a,b) with weight ρ(x).
From the nth term divergence test from calculus we know that ∑an converges implies that an→0 as n→∞. Therefore, in this problem the terms c2n<ϕn,ϕn> approach zero as n gets large. This is only possible if the cn ’s go to zero as n gets large. Thus, if ∑Nn=1cnϕn converges in the mean to f, then ∫ba[f(x)−∑Nn=1cnϕn]2ρ(x)dx approaches zero as N→∞. This implies from the above derivation of Bessel’s inequality that
<f,f>−N∑n=1c2n(ϕn,ϕn)→0.
This leads to Parseval’s equality:
⟨f,f⟩=∞∑n=1c2n⟨ϕn,ϕn⟩.
Parseval’s equality holds if and only if
limN→∞∫ba(f(x)−N∑n=1cnϕn(x))2ρ(x)dx=0.
If this is true for every square integrable function in L2ρ(a,b), then the set of functions {ϕn(x)}∞n=1 is said to be complete. One can view these functions as an infinite dimensional basis for the space of square integrable functions on (a,b) with weight ρ(x)>0.
One can extend the above limit cn→0 as n→∞, by assuming that ϕn(x)‖ is uniformly bounded and that \int_{a}^{b}|f(x)| \rho(x) d x<\infty. This is the RiemannLebesgue Lemma, but will not be proven here.