= Weierstrass approximation theorem
{c}
{wiki}
Every <continuous> <real-valued function> on a <compact interval> can be approximated by <polynomials> with arbitrarily small error everywhere on the interval. More precisely, if $a<b$ and $f:[a,b]\to\mathbb R$ is <continuous>, then for every $\varepsilon>0$ there is a <polynomial> $p$ with
$$
\|f-p\|_\infty=\sup_{x\in[a,b]}|f(x)-p(x)|<\varepsilon.
$$
The error is measured in the <supremum norm>, so one approximation works at every point. The degenerate interval $a=b$ needs only a <constant function>. A change of variable $t=(x-a)/(b-a)$ reduces the nondegenerate case to $[0,1]$.<The Weierstrass approximation theorem (Georgia Tech handout)>[The Weierstrass approximation theorem, Theorem 0.3, printed p. 2: uniform polynomial approximation on the unit interval]{ref}
This is useful because a <polynomial> is described by finitely many <coefficients> and can be evaluated with <addition> and <multiplication>. Its surprise is that the target need not be <differentiable>: the sharp corner of an <absolute value> function can be approximated by smooth <polynomials>. The <Bernstein approximation of a corner> below makes this visible. Approximating values, however, does not by itself approximate <derivatives>; <Weierstrass approximation does not preserve derivatives> gives a counterexample.
Back to article page