Section 5.1 The Weierstrass Approximation Theorem
The following is one of the statements that we want to prove in this chapter.
Theorem 5.1. Weierstrass approximation theorem.
Let \(a, b \in \R\) with \(a \lt b\text{.}\) For every \(f \in C^0([a,b])\) and every \(\varepsilon \gt 0\) there exists a polynomial \(p\) with real coefficients such that \(\sup_{x \in [a,b]} |f(x) - p(x)| \lt
\varepsilon\text{.}\)
One consequence of the theorem is the following.
Corollary 5.2.
For \(a, b \in \R\) with \(a \lt b\text{,}\) the space \(C^0([a,b])\) is separable.
Proof.
See Exercise 5.1.1.
A related result makes a similar statement about the approximation of continuous \(2\pi\)-periodic functions with trigonometric polynomials.
Definition 5.3.
Let \(T \gt 0\text{.}\) A function \(f \maps \R \to \R\) is called \(T\)-periodic if \(f(x + T) = f(x)\) for all \(x \in \R\text{.}\)
Definition 5.4.
A trigonometric polynomial of degree \(n\) is an expression of the form
\begin{equation*}
a_0 + \sum_{k = 1}^n \big(a_k \cos(kx) + b_k \sin(kx)\big)
\end{equation*}
with \(a_0, \dotsc, a_n, b_1, \dotsc, b_n \in \R\) where \(a_n\) and \(b_n\) are not both zero.
Theorem 5.5. Approximation by trigonometric polynomials.
For every continuous \(2\pi\)-periodic function \(f \maps \R \to \R\) and every \(\varepsilon \gt 0\) there exists a trigonometric polynomial \(p\) such that \(\sup_{x \in \R} |f(x) - p(x)| \lt \varepsilon\text{.}\)
We will prove not only these results, but also an elegant and powerful generalisation due to M. H. Stone, which is given in the next section.
Exercises Exercises
1. (PS10) \(C^0([a,b])\) is separable.
Let \(P=P([a,b]) \subset C^0([a,b])\) be the subset of polynomials with real coefficients, and let \(Q \subset P\) be the analogous set of polynomials with rational coefficients.
(a)
Show that \(Q\) is a dense subset of \(P\) when the latter set is equipped with the \(\n\blank_{C^0([a,b])}\) norm.
Hint.
This is relatively big hint. Let \(p \in P\text{,}\) say
\begin{equation*}
p(x) = \alpha_0 + \alpha_1 x + \cdots + \alpha_M x^M
\end{equation*}
for some \(M \in \N\) and coefficients \(\alpha_0,\ldots,\alpha_M \in \R\text{.}\) Argue that we can find a sequence \(\seq qn\) in \(Q\) of polynomials of the form
\begin{gather*}
q_n(x) = \beta_0^{(n)} + \beta_1^{(n)} x + \cdots + \beta_M^{(n)} x^M
\end{gather*}
whose coefficients converge to the coefficients of \(p\text{,}\) i.e. \(\beta_m^{(n)} \to \alpha_m\) as \(n \to \infty\) for all \(m \in \{1,\ldots,M\}\text{.}\) Then show that this implies \(q_n \to p\) in \(C^0([a,b])\text{.}\)
(b)
Conclude that \(Q\) is dense in \(C^0([a,b])\text{.}\)
Hint.
This follows relatively easily from the previous part and the Weierstrass approximation theorem.
(c)
Show that \(Q\) is countable. Conclude that \(C^0([a,b])\) is separable.
Hint 1.
This is probably the most sophisticated cardinality argument in the entire unit, and so if you are pressed for time you may just want to skip it and wait for the solutions. On the other hand it is doable with only the tools in Section 1.8; see the next hint.
Hint 2.
Let \(Q_n\) denote the set of polynomials in \(Q\) of degree \(\le
n\text{.}\) First argue that \(Q_n\) is countable by appealing to Lemma 1.70. Then notice that \(Q = \bigcup_{n\in\N} Q_n\) and appeal to Lemma 1.72.
2. Trigonometric polynomials dense in \(L^2([a,b])\).
Let \(A \subset C^0([0, 2\pi])\) denote the subset of all continuous functions \(f \maps [0, 2\pi] \to \R\) with \(f(0) = f(2\pi)\text{.}\) Let \(T \subset A\) denote the further subset of all trigonometric polynomials (Definition 5.4).
(a)
Show that \(A\) is dense in \(\big(C^0([0,2\pi]),\scp\blank\blank_{L^2(0,
2\pi)}\big)\text{.}\) Conclude that \(A\) is dense in \(L^2(0,2\pi)\text{.}\)
Hint.
Fix \(f \in C^0([0,2\pi])\text{.}\) Now let \(f_n\) be a continuous function obtained by replacing the graph of \(f\) for \(x \in [0,1/n]\) with a straight line segment in such a way that \(f_n \in A\text{.}\) Estimate \(\n{f-f_n}_{L^2(0,2\pi)}^2\text{,}\) and show that it tends to \(0\) as \(n
\to \infty\text{.}\)
(b)
Show that \(T\) is dense in \(\big(A,\scp\blank\blank_{L^2(0,2\pi)}\big)\text{.}\) Conclude that \(T\) is dense in \(L^2(0,2\pi)\text{.}\)
Hint.
Given \(f \in A\text{,}\) extend it to \(2\pi\)-periodic continuous function \(\tilde f \maps \R \to \R\) and apply Theorem 5.5 to find a trigonometric polynomial \(p \in T\) which is close to \(f\) in terms of \(\n\blank_{\sup}\text{.}\) Now use this to estimate \(\n{f-p}_{L^2(0,2\pi)}\text{.}\) Finally, tie things together by applying the previous part.