The Stone Weierstrass Theorem — MTH 429H

One of the most important consequences of the Weierstrass theorem (Thm 7.26 of Rudin) is the following (obvious) corollary:

Corollary 1 Let ${M>0}$ be a positive real number. Then there is a sequence of polynomials ${p_{n}(x)}$ which converges uniformly to ${|x|}$ on the interval ${[-M,M]}$, i.e.,

$\displaystyle \sup_{x\in[-M,M]}\left||x|-\lim_{n\rightarrow\infty}p_{n}(x)\right|=0.$

Exercise 23 in Rudin shows how you can prove this result directly without using the Weierstrass theorem. The reason that this particular corrollary is so important is that it provides a key step in the proof of the Stone-Weierstrass theorem:

Theorem 2 Let ${K}$ be a compact metric space and let ${C(K)}$ denote the set of real valued continuous functions on ${K}$. Let ${\mathcal{A}\subset C(K)}$ be an algebra of functions with the following properties:

1. ${\mathcal{A}}$ separates points of ${K}$: given ${x,y\in K}$ with ${x\neq y}$ there is a function ${f\in\mathcal{A}}$ such that ${f(x)\neq f(y).}$
2. ${\mathcal{A}}$ vanishes at no point of ${K}$: for every ${x\in K}$ there is a function ${f\in\mathcal{A}}$ such that ${f(x)\neq0}$.

Then given any ${f\in C(K)}$ there exists a sequence ${g_{n}\in\mathcal{A}}$ such that ${g_{n}}$ converges to ${f}$ uniformly on ${K}$.

Remark 3 By saying that ${\mathcal{A}}$ is an algebra we mean that

1. ${\mathcal{A}}$ is a vector sub-space of ${C(K)}$, i.e., if ${f,g\in\mathcal{A}}$ and ${t\in\mathbb{R}}$ then the function ${f+tg\in\mathcal{A}}$.
2. If ${f,g\in\mathcal{A}}$ then the function ${fg\in\mathcal{A}}$.

Here, ${f+tg}$ and ${fg}$ in 1 and 2 are the following:

$\displaystyle \left[f+tg\right](x)=f(x)+tg(x)\ ,\quad\text{and }\quad\left[fg\right](x)=f(x)g(x).$

Thus the Stone-Weierstrass theorem says that an algebra of continuous functions on a compact set ${K}$ that is nowhere vanishing and separates points is dense in ${C(K)}$ (in the uniform topology).

You can find the full proof of the Stone-Weierstrass theorem in Rudin (Theorem 7.32). The main steps of the proof are:

1. Let ${\mathcal{B}}$ be the closure of ${\mathcal{A}}$ in the uniform metric (${d(f,g)=\sup_{x}\left|f(x)-g(x)\right|}$). We must show that ${\mathcal{B}=C(K).}$
2. Using Corollary 1 we prove that if ${f\in\mathcal{B}}$ then ${\left|f\right|\in\mathcal{B}}$. To see this let ${M=\sup_{x}\left|f(x)\right|}$ and let ${f_{n}\in\mathcal{A}}$ be a sequence that converges to ${f}$ uniformly. We may assume that ${\left|f_{n}(x)\right|\le2M}$ for all ${n}$ and ${x}$. (Why?) Now let ${p_{n}}$ be a sequence of polynomials that converge uniformly to ${|x|}$ on the interval ${[-2M,2M]}$. Then ${p_{n}\circ f}$ is a sequence in ${\mathcal{A}}$ that converges uniformly to ${|f|}$. (Why are ${p_{n}\circ f\in\mathcal{A}}$? Notice how we need the fact that ${\mathcal{A}}$ is an algebra!)
3. From 2, we conclude that

$\displaystyle \max(f,g)=\frac{f+g}{2}+\frac{\left|f+g\right|}{2}\quad\text{and}\quad\min(f,g)=\frac{f+g}{2}-\frac{\left|f+g\right|}{2}$

are in ${\mathcal{B}}$ whenever ${f}$ and ${g}$ are. Repeatedly applying these identities, we can prove that ${\max(f_{1},\ldots,f_{n})}$ and ${\min\left(f_{1},\ldots,f_{n}\right)}$ are in ${\mathcal{B}}$ whenever ${f_{1},\ldots,f_{n}}$ are.

4. Now let ${f\in C(K)}$ and let ${\epsilon>0}$. For each ${x,y\in K}$ we can find ${h_{x,y}\in\mathcal{B}}$ such that ${h_{x,y}(x)=f(x)}$ and ${h_{x,y}(y)=f(y)}$ (Why? This uses the fact that ${\mathcal{B}}$ separates points and is no-where vanishing.) By continuity and compactness for each ${x\in K}$ we can find points ${y_{1},\ldots,y_{n}}$ and an open cover ${U_{1},\ldots,U_{n}}$ such that

$\displaystyle h_{x,y_{j}}(y)>f(y)-\epsilon,\quad y\in U_{j}.$

Thus

$\displaystyle g_{x}(y)=\max\left(h_{x,y_{1}}(y),\ldots,h_{x,y_{n}}(y)\right)$

satisfies

$\displaystyle g_{x}\in\mathcal{B},\quad g_{x}(x)=f(x)\quad\text{and}\quad g_{x}(y)>f(y)-\epsilon,\quad y\in K.$

Now we find points ${x_{1},\ldots,x_{m}}$ and an open cover ${V_{1},\ldots,V_{m}}$ such that

$\displaystyle g_{x_{j}}(x)

so

$\displaystyle g(x)=\min\left(g_{x_{1}}(x),\ldots,g_{x_{m}}(x)\right)$

satsifies

$\displaystyle g\in\mathcal{B}\quad\text{and }\quad f(x)-\epsilon

Note how every hypothesis of the theorem was used in an essential way.

As an example of an important corrollary we have the following result regarding trigonometric polynomials. A trigonometric polynomial is a linear combination of the form

$\displaystyle \sum_{j=1}^{N}a_{j}\cos\left(\alpha_{j}x\right)+b_{j}\sin\left(\alpha_{j}x\right).$

The numbers ${a_{j},b_{j}}$ are called the coefficients and ${\alpha_{j},\beta_{j}}$ are called the frequencies of the polynomial. (Note that using trig identities we can reduce ${\cos(\alpha x)^{n}}$ and ${\sin\left(\alpha x\right)^{n}}$ to expressions of this form. Thus the name trigonometric polynomial makes sense.)

Theorem 4 Let ${f\in C[a,b]}$. Then there exists a sequence of trigonometric polynomials that converge uniformly to ${f}$ on ${[a,b]}$. Indeed there exist a sequence of trigonometric polynomials with frequencies restricted to the set ${\left\{ \frac{2\pi n}{b-a}\::\ n\in\mathbb{N}\right\} }$ that converge uniformly to ${f}$ on ${[a,b]}$.

Proof: Let ${\mathcal{A}}$ be the set of all trigonometric polynomials restricted to ${[a,b]}$. Since

$\displaystyle \cos\left(\alpha x\right)\cos\left(\beta x\right)=\frac{1}{2}\left[\cos\left((\alpha+\beta)x\right)+\cos\left((\alpha-\beta)x\right)\right],$

$\displaystyle \sin\left(\alpha x\right)\cos\left(\beta x\right)=\frac{1}{2}\left[\sin\left((\alpha+\beta)x\right)+\sin\left(\left(\alpha-\beta\right)x\right)\right],$

and

$\displaystyle \sin\left(\alpha x\right)\sin\left(\beta x\right)=\frac{1}{2}\left[\cos\left(\left(\alpha-\beta\right)x\right)-\cos\left((\alpha+\beta)x\right)\right],$

it is easy to see that ${\mathcal{A}}$ is an algebra. It is not identically zero since for every ${x}$ either ${\cos x\neq0}$ or ${\sin x\neq0}$. Likewise if ${\cos x=\cos y}$ and ${\sin x=\sin y}$ then ${x=y+2\pi n}$ for some ${n}$ and ${\cos\frac{x}{2n}=-\cos\frac{y}{2n}}$ and ${\sin\frac{x}{2n}=-\sin\frac{y}{2n}}$. It follows that ${\mathcal{A}}$ separates points. Thus the first claim follows from Stone-Weierstrass.

To see that we may restrict the frequencies as in the second claim is left as an exercise. You must show that the result set is an algebra and separtes points. That it is an algebra follows from the angle sum identities and the facts that ${\cos\left(-x\right)=\cos x}$ and ${\sin\left(-x\right)=-\sin x}$. To see that it separates points note that the functions ${\cos\left(\frac{2\pi}{b-a}x\right)}$ and ${\sin\left(\frac{2\pi}{b-a}x\right)}$ already do the job.$\Box$