Skip to content

Weierstrass Approximation Theorem

Theorem

For a continuous function f ⁣:[a,b]→Rf\colon [a, b] \to \mathbb{R} and any ε>0,\varepsilon > 0\text{,} there exists a polynomial P ⁣:[a,b]→RP\colon [a, b]\to\mathbb{R} such that ∥P−f∥∞<ε.\|P-f\|_\infty < \varepsilon\text{.}


Interpretation

Any continuous function on a closed bounded interval can be approximated as closely as desired by a polynomial, uniformly on the whole interval: for each tolerance ε\varepsilon there is a polynomial whose graph stays within ε\varepsilon of the graph of ff at every point of [a,b][a,b].

The absolute value function on the interval from minus 1 to 1 with even polynomials of degree 2, 4 and 8 approaching it, with maximal errors of about 0.19, 0.12 and 0.07.

The figure approximates f(x)=∣x∣f(x)=|x| on [−1,1][-1,1], which has a corner at 00 and is not differentiable there, by even polynomials p2p_2, p4p_4 and p8p_8. Their largest errors ∥f−pn∥∞\|f-p_n\|_\infty in the uniform norm are about 0.190.19, 0.120.12 and 0.070.07, and in each case the largest error sits at the corner. The errors shrink as the degree grows, which is what the theorem promises.

Raise the degree nn of the Bernstein polynomial until it lies within ε\varepsilon of ff on all of [0,1][0,1], even at the kink of ∣x−12∣|x-\tfrac12|.

Both hypotheses are needed. A polynomial is continuous, and a uniform limit of continuous functions is continuous, so a function with a jump cannot be approximated uniformly by polynomials. The interval must be closed and bounded as well: every polynomial is bounded on (0,1](0,1], so none stays within ε\varepsilon of the unbounded function 1/x1/x there, and on R\mathbb{R} even ex\mathrm{e}^x cannot be approximated, as in the Examples.

The approximating polynomials are not partial sums of one power series. The sum of a power series is differentiable inside its interval of convergence, so ∣x∣|x| is not such a sum around 00, yet it is a uniform limit of polynomials; in the figure even the constant term changes from one pnp_n to the next. The theorem guarantees existence only; Bernstein polynomials, used in the interactive scene, are one explicit construction. It differs from the Taylor polynomials met later, which are built from derivatives at a single point.


Key Results

  • Equivalently, every continuous function ff on [a,b][a,b] is a uniform limit of polynomials: there are polynomials PnP_n with ∥Pn−f∥∞→0\|P_n-f\|_\infty\to0 in the uniform norm.

Examples

  • On [0,1][0,1], the polynomials Pn(x)=∑k=0nxk/k!\displaystyle P_n(x)=\sum_{k=0}^{n}x^k/k! approximate f(x)=exf(x)=\mathrm{e}^x uniformly: ex−Pn(x)=∑k>nxk/k!\displaystyle \mathrm{e}^x-P_n(x)=\sum_{k>n}x^k/k! is largest at x=1x=1, so ∥f−Pn∥∞=∑k>n1/k!→0\displaystyle \|f-P_n\|_\infty=\sum_{k>n}1/k!\to0. For n=3n=3 the error is e−83≈0.052\mathrm{e}-\tfrac{8}{3}\approx0.052.
  • Continuous functions, e.g., f(x)=exf(x)=\mathrm{e}^x, over the entirety of R\mathbb{R} aren't always uniformly approximable by polynomials.

Prerequisites

Sources

Symbols: epsilon, infinity, real numbers, sum

Last updated: 20 October 2026 03:02