Weierstrass Approximation Theorem

Every continuous function on [0,1][0,1] is uniformly approximable by polynomials — watch the Bernstein polynomials Bn(f)B_n(f) close in on ff as nn grows. The fine estimates of the convergence proof are sketched at the idea level.

Bn(f)(x)=∑k=0nf ⁣(kn)(nk)xk(1−x)n−kB_n(f)(x) = \sum_{k=0}^{n} f\!\left(\frac{k}{n}\right) \binom{n}{k} x^k (1-x)^{n-k}
f∈C[0,1]  ⟹  ∥Bn(f)−f∥∞→0f \in C[0,1] \implies \|B_n(f) - f\|_\infty \to 0

Part of these learning paths

Examples & Exercises

Prove that Bn(1)=1B_n(1) = 1 — the constant function is reproduced exactly.

Bn(1)(x)=∑k=0n(nk)xk(1−x)n−k=(x+(1−x))n=1B_n(1)(x) = \sum_{k=0}^{n}\binom{n}{k}x^k(1-x)^{n-k} = (x+(1-x))^n = 1
The constant 1 — the approximant coincides exactly.
Show proof
  1. Since f≡1f \equiv 1, we have f(k/n)=1f(k/n) = 1. Hence Bn(1)(x)=∑k=0n(nk)xk(1−x)n−kB_n(1)(x) = \sum_{k=0}^{n}\binom{n}{k}x^k(1-x)^{n-k} — just the sum of the basis functions.
  2. By the binomial theorem, ∑k=0n(nk)xk(1−x)n−k=(x+(1−x))n=1n=1\sum_{k=0}^{n}\binom{n}{k}x^k(1-x)^{n-k} = (x + (1-x))^n = 1^n = 1.
  3. So Bn(1)(x)=1B_n(1)(x) = 1 for every xx and every nn — zero error. The constant is not approximated; it is reproduced.

Prove that Bn(x)=xB_n(x) = x.

∑k=0nkn(nk)xk(1−x)n−k=x\sum_{k=0}^{n}\frac{k}{n}\binom{n}{k}x^k(1-x)^{n-k} = x
The identity — reproduced exactly too.
Show proof
  1. For k≥1k \geq 1, k(nk)=n(n−1k−1)k\binom{n}{k} = n\binom{n-1}{k-1} (the k=0k = 0 term vanishes since kn=0\frac{k}{n} = 0).
  2. Substituting gives Bn(x)(x)=∑k=1nkn(nk)xk(1−x)n−k=x∑j=0n−1(n−1j)xj(1−x)n−1−jB_n(x)(x) = \sum_{k=1}^{n}\frac{k}{n}\binom{n}{k}x^k(1-x)^{n-k} = x\sum_{j=0}^{n-1}\binom{n-1}{j}x^j(1-x)^{n-1-j} (setting j=k−1j = k-1).
  3. By the binomial theorem the inner sum is (x+(1−x))n−1=1(x+(1-x))^{n-1} = 1, so Bn(x)(x)=xB_n(x)(x) = x — the identity is also reproduced exactly for every nn.

Prove that the uniform limit of continuous functions is continuous (the ε/3\varepsilon/3 argument).

∣f(x)−f(x0)∣≤∣f−fN∣+∣fN(x)−fN(x0)∣+∣fN−f∣<ε|f(x)-f(x_0)| \le |f-f_N| + |f_N(x)-f_N(x_0)| + |f_N-f| < \varepsilon
n=40n = 40 — even the kink is nearly matched.
Show proof
  1. Since fN→ff_N \to f uniformly, pick NN with ∥fN−f∥∞<ε3\lVert f_N - f\rVert_\infty < \frac{\varepsilon}{3}.
  2. Since fNf_N is continuous at x0x_0, pick δ>0\delta > 0 such that ∣x−x0∣<δ\lvert x - x_0\rvert < \delta implies ∣fN(x)−fN(x0)∣<ε3\lvert f_N(x) - f_N(x_0)\rvert < \frac{\varepsilon}{3}.
  3. By the triangle inequality, ∣f(x)−f(x0)∣≤∣f−fN∣+∣fN(x)−fN(x0)∣+∣fN−f∣<ε3+ε3+ε3=ε\lvert f(x) - f(x_0)\rvert \leq \lvert f - f_N\rvert + \lvert f_N(x) - f_N(x_0)\rvert + \lvert f_N - f\rvert < \frac{\varepsilon}{3} + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} = \varepsilon — so ff is continuous at x0x_0. (This is also why the uniform norm ∥⋅∥∞\lVert\cdot\rVert_\infty makes C[0,1]C[0,1] a closed space.)

5. Approximation