Weierstrass Approximation Theorem

Theorem
Let $f$ be a real function which is continuous on the closed interval $\Bbb I = \closedint a b$.

Then $f$ can be uniformly approximated on $\Bbb I$ by a polynomial function to any given degree of accuracy.

Proof
Let $\map f t: \Bbb I = \closedint a b \to \R$ be a continuous function.

Introduce $\map x t$ with a rescaled domain:


 * $\map f t \mapsto \map x {a + t \paren {b - a} } : \closedint a b \to \closedint 0 1$

From now on we will work with $x: \closedint 0 1 \to \R$, which is also continuous.

Let $n \in \N$.

For $t \in \closedint 0 1$ consider the Bernstein polynomial:


 * $\ds \map {B_n x} t = \sum_{k \mathop = 0}^n \map x {\frac k n} \binom n k t^k \paren {1 - t}^{n - k}$

For $t \in \closedint 0 1$, $0 \le k \le n$, let:


 * $\map {p_{n, k} } t := \dbinom n k t^k \paren {1 - t}^{n - k}$

By the binomial theorem:


 * $\ds \sum_{k \mathop = 0}^n \map {p_{n, k} } t = 1$

Lemma 2
Now we construct the estimates.

Here $\ds \sum_{k \mathop : \size {\frac k n \mathop - t} \ge \delta}^n$ denotes the summation over those values of $k \in \N$, $k \le n$, which satisfy the inequality $\size {\dfrac k n - t} \ge \delta$.

For some $\delta > 0$ denote:


 * $\ds \map {\omega_\delta} x := \sup_{\size {t - s} < \delta} \size {\map x s - \map x t}$

Then:

where $\norm {\,\cdot \,}_\infty$ denotes the supremum norm.

Let $\epsilon > 0$.

By Continuous Function on Closed Real Interval is Uniformly Continuous, $\map x t$ is uniformly continuous.

We choose $\delta > 0$ such that $\map {\omega_\delta} x < \dfrac \epsilon 2$.

Choose $n > \dfrac {\norm x_\infty} {\epsilon \delta^2}$

Then:


 * $\norm {\map {B_n x} t - \map x t}_\infty < \epsilon$.

Proof 2
, assume $\Bbb I = \closedint 0 1$

For each $n \in \N$, let:
 * $\ds \map {P_n} x := \sum_{k \mathop = 0}^n \map f {\dfrac k n } \dbinom n k x^k \paren {1 - x}^{n - k}$

We shall show that $\lim_{n \to \infty} \norm { P_n - f}_\infty = 0$.

Let $\epsilon \in \R_{>0}$.

There is a $\delta \in \R_{>0}$ such that:
 * $\forall x,y \in \Bbb I : \size {x - y} \le \delta \implies \size {\map f x - \map f y} \le \epsilon $

Let $p \in \Bbb I$.

Let $\sequence {X_k} _{k \in \N}$ be independent random variables such that:
 * $\forall k \in \N : X_k \sim \Binomial 1 p$

where $\Binomial n p$ denotes the binomial distribution with parameters $n$ and $p$.

Let:
 * $\ds Z_n := \dfrac 1 n \sum_{k \mathop = 0}^{n-1} X_k$

Observe that:

By Sum of Independent Binomial Random Variables:
 * $n Z_n \sim \Binomial n p$

Thus:

On the other hand:

Therefore:

Thus for all $n \in \N_{> 2 \delta^2 / \norm f_\infty}$ we have:
 * $\size {\map {P_n} p - \map f p} \le 2 \epsilon$

As the above is true for all $p \in \Bbb I$, we have:
 * $\forall n \in \N_{> 2 \delta^2 / \norm f_\infty} : \norm { P_n - f}_\infty \le 2 \epsilon$

Also known as
This result is also seen referred to as Weierstrass's theorem, but as there are a number of results bearing 's name, it makes sense to be more specific.