Let f(x) = 1 for 0 < x < 1. Expand f(x) using the eigenfunctions (13),
\phi_{n}(x)=\sqrt{2}\sin(n\pi x),n=1,2,\,\dots (13)
and discuss the pointwise and mean square convergence of the resulting series.
The series has the form (15),
f(x)=\sum_{m=1}^{\infty}b_{m}\phi_{m}(x)=\sqrt{2}\sum_{m=1}^{\infty}b_{m}\sin(m\pi x), (15)
and its coefficients b_{m} are given by equation (16).
b_{m}=\int_{0}^{1}f(x)\,\phi_{m}(x)d x={\sqrt{2}}\int_{0}^{1}f(x)\sin(m\pi x)d x, (16)
Thus
b_{m}=\int_{0}^{1}f(x)\phi_{m}(x)d x=\sqrt{2}\int_{0}^{1}\sin(m\pi x)d x=\frac{\sqrt{2}}{m\pi}(1-\cos(m\pi)),\\={\frac{\sqrt{2}}{m\pi}}(1-(-1)^{m})={\left\{\begin{array}{c c}{\frac{2{\sqrt{2}}}{m\pi}}&{m{\mathrm{~odd}}}\\ 0 &{m{\mathrm{~even}}.}\end{array}\right.} (18)
and the n^{th} partial sum of the series is
S_{n}(x)={\sqrt{2}}\sum_{m=1}^{n}b_{m}\sin(m\pi x)=2\sum_{m=1}^{n}{\frac{1-\cos(m\pi)}{m\pi}}\sin(m\pi x)={\frac{4}{\pi}}\sum_{m=1,3,\dots,n}{\frac{1}{m}}\sin(m\pi x). (19)
The mean square error associated with the nth partial sum of the series is then
R_{n}=\int_{0}^{1}(f(x)-S_{n}(x))^{2}d x. (20)
By calculating R_{n} for several values of n and plotting the results, we obtain Figure 11.6.2. This figure indicates that R_{n} steadily decreases as n increases. Of course, Theorem 11.6.1 asserts that R_{n} → 0 as n → ∞. Pointwise, we know that S_{n}(x) → f(x) = 1 as n → ∞ for 0 < x < 1; further, S_{n}(x) has the value zero for x = 0 or x = 1 for every n. Although the series converges pointwise for each value of x, the least upper bound of the error does not diminish as n grows larger. For each n, there are points close to x = 0 and x = 1 where the error is arbitrarily close to 1. The situation is similar to the Gibbs phenomenon observed in Example 1 in Section 10.3; see Figures 10.3.3 and 10.3.4.