Weierstrass Approximation Theorem

Can polynomials alone imitate every continuous function on an interval?

A Bernstein polynomial averages the function's values near each point. As the degree grows, the average concentrates near that point. So the polynomial follows even the bumpy corners. The proof's fine estimates are only sketched.

For example, think of replacing a slope with a πŸͺœ staircase. The finer the steps, the smaller the gap anywhere you measure. Raising the degree presses the polynomial onto the whole function at once.

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 for nβ‰₯1n \ge 1.

βˆ‘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. Setup: fix an integer nβ‰₯1n \ge 1 (for n=0n = 0 the values f(k/n)f(k/n) involve division by zero). The target function is f(t)=tf(t) = t, so f(k/n)=k/nf(k/n) = k/n.

    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 nβ‰₯1n \ge 1.

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. Let x0∈[a,b]x_0 \in [a,b] be arbitrary and let Ξ΅>0\varepsilon > 0 be given. 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. Since x0∈[a,b]x_0 \in [a,b] was arbitrary, ff is continuous on all of [a,b][a,b].

    (This is also why the uniform norm βˆ₯β‹…βˆ₯∞\lVert\cdot\rVert_\infty makes C[0,1]C[0,1] a closed space.)

6. Approximation