Weierstrass Approximation Theorem — Definition, Formula & Example
The Weierstrass Approximation Theorem is the result that any continuous function on a closed, bounded interval can be matched as closely as you like by a polynomial, with the same error bound holding at every point of the interval at once.
Let be continuous. For every there exists a polynomial with real coefficients such that for all . Equivalently, the polynomials are dense in under the sup norm .
Key Formula
Where:
- = A continuous function on
- = Degree of the Bernstein polynomial, a positive integer
- = Summation index; is sampled at the points
- = Bernstein basis polynomial, the binomial probability of exactly successes
How It Works
The substitution reduces the problem to the interval . Bernstein's proof (1912) builds explicit polynomials by sampling at and weighting the samples with binomial probabilities. Uniform continuity of handles the sample points near . A variance bound shows that points far from carry little weight. Weierstrass's original 1885 proof instead smoothed by convolving it with a narrow Gaussian kernel and then truncated that function's Taylor series.
Worked Example
Problem: Use Bernstein polynomials to approximate on . Find the smallest degree for which the Bernstein bound guarantees an error of at most at every point.
Step 1: Compute . Treat as a binomial count with mean and variance . Then . Divide by .
Step 2: Bound the error uniformly. The product is largest at , where it equals .
Step 3: Require the worst-case error to be at most and solve for .
Answer: The smallest such degree is . The polynomial is within of on all of . The largest error is exactly , at . Because the bound goes to , the convergence is uniform, as the theorem promises.
Why It Matters
In numerical analysis, this theorem is the reason you can replace any continuous function with a polynomial and then evaluate, integrate, or interpolate it cheaply. Its generalization, the Stone–Weierstrass Theorem, shows that trigonometric polynomials are dense, which underpins Fourier analysis. The Bernstein basis from the proof is the same basis that defines Bézier curves in computer graphics and CAD software.
Common Mistakes
Mistake: Assuming the approximating polynomials are Taylor polynomials, or that must be differentiable.
Correction: The theorem needs only continuity. It even applies to nowhere-differentiable functions, which have no Taylor series at all. The interval must also be closed and bounded. On , the function is unbounded, so no polynomial can stay within any fixed of it.
