
- Calculus, Volume 2: Multi-Variable Calculus and Linear Algebra with Applications to Differential Equations and Probability
- Tom M. Apostol
- Second Edition
- 1991
- 978-1-119-49676-2
1.17 Exercises
- In the real linear space $C(0, 2)$ with inner product $(f, g) = \int_0^2 f(x) g(x) \, dx,$ let $f(x) = e^x$ and show that the constant polynomial $g$ nearest to $f$ is $g = \frac{1}{2} (e^2 - 1).$ Compute $\|g - f\|^2$ for this $g.$
- Recall from Theorem 1.16 that in a finite-dimensional subspace $S$ of a Euclidean space $V,$ for any element $x$ in $V,$ the projection of $x$ on $S$ is nearer to $x$ than any other element of $S.$
$\quad$ Let $S$ be the subspace of $V$ spanned by $\{1\}.$ In other words, let $S$ be the subspace of constant polynomials. If we define the inner product $(f, g) = \int_0^2 f(x)g(x)\,dx,$ then the orthonormal basis of $S$ is given by: \begin{align*} e_1 &= \frac{1}{\left[\int_0^2 1\,dx\right]^{1/2}} \\ &= \frac{1}{\sqrt{2}} \end{align*} Then, if we denote $g$ as the projection of $f(x) = e^x$ onto $S,$ we have: \begin{align*} g &= (f, e_1)e_1 \\ &= \left(\frac{1}{\sqrt{2}}\int_0^2e^x\,dx\right)\frac{1}{\sqrt{2}} \\ &= \frac{1}{2}(e^2 - 1)\quad \blacksquare \end{align*}
To compute $\|g - f\|^2,$ we simply compute the inner product $(g - f, g - f):$ \begin{align*} \|g - f\|^2 &= (g - f, g - f) \\ &= \int_0^2[g(x) - f(x)]^2\,dx \\ &= \int_0^2\left[\frac{e^2 - 1}{2} - e^x\right]^2\,dx \\ &= \int_0^2\left[\frac{(e^2 - 1)^2}{4} - e^x(e^2 - 1) + e^{2x}\right]\,dx \\ &= \frac{1}{2}(e^2 - 1)^2 - (e^2 - 1)^2 + \frac{1}{2}(e^4 - 1) \\ &= \frac{1}{2}(e^2 - 1)\left[(e^2 + 1) - (e^2 - 1)\right] \\ &= e^2 - 1 \quad \blacksquare \end{align*}