Tutorials › Real Analysis › Proof Strategy for Weierstrass Approximation

Approximation Theory · Tutorial 633 of 1000

Proof Strategy for Weierstrass Approximation

Learn how to organize the Weierstrass proof and turn regularity assumptions into explicit approximation rates.

Advanced 10 min read

What You'll Learn

  • Organize the approximation argument around its quantifiers and error budget
  • Choose the continuity scale before choosing the polynomial degree
  • Use the Bernstein weight moments to derive a Hölder error bound
  • Calculate explicit degree requirements for specific functions
  • Transfer an approximation from the unit interval to a general interval

A Proof Is a Plan for Choosing Parameters

The Weierstrass Approximation Theorem establishes that a continuous function on a closed interval can be approximated uniformly by polynomials. The Bernstein proof in the previous tutorial does more than establish existence: it provides a useful model for how to organize an approximation proof. The central task is to make the choices in the right order and ensure that each choice controls a specific part of the error.

For a prescribed tolerance \(\varepsilon>0\), the proof must produce one polynomial that works at every point of the interval. In the Bernstein construction, the polynomial depends on an integer \(n\), while the error estimate also involves a distance scale \(\delta\). Uniform continuity controls the function's variation on distances at most \(\delta\); the moment estimate controls the total weight on distances greater than \(\delta\). Thus \(\delta\) is chosen first, and \(n\) is chosen afterward.

Proof-planning principle: When an error estimate has separate terms controlled by different parameters, assign each term part of the total tolerance. Choose parameters in the order that makes each later choice possible, and verify at the end that the resulting bound holds uniformly.

This principle is especially important for quantifiers. The target is: for every \(\varepsilon>0\), there exists a degree \(n\) such that for every \(x\) in the interval, the error is less than \(\varepsilon\). The point \(x\) is not available for choosing \(n\). A choice of degree that depends on \(x\) would establish only pointwise approximation, not the uniform conclusion.

Turning the Bernstein Estimate into a Proof Plan

Recall the Bernstein Error Estimate from the previous tutorial. For \(f\in C[0,1]\), \(M=\|f\|_\infty\), \(n\geq1\), and \(\delta>0\), it gives

$$ \|B_nf-f\|_\infty \leq \omega_f(\delta)+\frac{M}{2n\delta^2}. $$

The two terms have different jobs. The first depends on \(\delta\) and tends to zero as \(\delta\) tends to zero, by uniform continuity. The second depends on both \(n\) and \(\delta\). Once \(\delta\) has been fixed, increasing \(n\) makes this second term as small as desired.

A reliable way to apply the estimate is to split the tolerance into two positive portions. For example, choose \(\delta\) so that \(\omega_f(\delta)<\varepsilon/2\). Then choose \(n\) so that \(M/(2n\delta^2)<\varepsilon/2\). The triangle of dependencies is now settled: \(\varepsilon\) determines \(\delta\), and \(\varepsilon\) together with \(\delta\) determines \(n\). The estimate then gives \(\|B_nf-f\|_\infty<\varepsilon\).

If \(M=0\), then \(f\) is identically zero and there is no tail term to control. This simple case should not be lost when solving inequalities by dividing by \(M\). If \(M>0\), any integer \(n>M/(\varepsilon\delta^2)\) makes the second term strictly less than \(\varepsilon/2\). The strict inequality matters because the desired conclusion is an error strictly below \(\varepsilon\).

1
Fix the requested accuracy.
Start with an arbitrary \(\varepsilon>0\); do not choose a degree that depends on the evaluation point.
2
Control local variation.
Use uniform continuity to choose \(\delta\) so that nearby function values contribute less than the allocated part of the error.
3
Control the remaining contribution.
With \(\delta\) fixed, choose \(n\) large enough to control the weight on distant sample points.
4
Close the uniform estimate.
Apply the bound for every \(x\), then take the supremum to obtain the required norm estimate.

A Moment Method for Quantitative Rates

Uniform continuity is enough for an existence proof, but it may not supply an explicit formula for the degree. If the function satisfies a stronger regularity condition, the Bernstein moments give a quantitative rate directly. The following result is a useful instance of a broader proof technique: average a pointwise regularity bound, then use a moment to estimate that average.

Theorem (Hölder Error Bound for Bernstein Polynomials): Suppose \(f\in C[0,1]\), \(0<\alpha\leq1\), and there is a constant \(L\geq0\) such that $$ |f(u)-f(v)|\leq L|u-v|^\alpha\qquad(u,v\in[0,1]). $$ Then, for every integer \(n\geq1\), $$ \|B_nf-f\|_\infty\leq L\left(\frac{1}{4n}\right)^{\alpha/2}. $$

Proof. Fix \(x\in[0,1]\). The Bernstein weights \(w_{n,k}(x)\) are nonnegative and sum to one. By the definition of \(B_nf\) and the triangle inequality,

$$ \begin{aligned} |B_nf(x)-f(x)| &\leq \sum_{k=0}^{n}w_{n,k}(x) \left|f\left(\frac{k}{n}\right)-f(x)\right|\\ &\leq L\sum_{k=0}^{n}w_{n,k}(x) \left|\frac{k}{n}-x\right|^\alpha. \end{aligned} $$

Put \(r=\alpha/2\), so \(0<r\leq1/2\), and set \(y_k=|k/n-x|^2\). The function \(t\mapsto t^r\) is concave on \([0,\infty)\). Jensen's inequality for the finite weights therefore gives

$$ \sum_{k=0}^{n}w_{n,k}(x)y_k^r \leq \left(\sum_{k=0}^{n}w_{n,k}(x)y_k\right)^r. $$

The First and Second Moments of the Bernstein Weights, established in the previous tutorial, identify the sum inside the right-hand side as \(x(1-x)/n\). Since \(x(1-x)\leq1/4\),

$$ \begin{aligned} |B_nf(x)-f(x)| &\leq L\left(\frac{x(1-x)}{n}\right)^{\alpha/2}\\ &\leq L\left(\frac{1}{4n}\right)^{\alpha/2}. \end{aligned} $$

This bound holds for every \(x\in[0,1]\). Taking the supremum proves the theorem. \(\square\)

The estimate illustrates a useful strategic distinction. The general proof needs only continuity, so it works even when no convenient rate is known. The quantitative proof uses the additional Hölder condition to replace a two-parameter choice of \(\delta\) and \(n\) with a direct bound in terms of \(n\). A larger Hölder exponent gives a faster power of \(n\), while the constant \(L\) records the size of the function's variation.

Worked Examples

Worked Example: Choosing a Degree for \(e^x\)

Let \(f(x)=e^x\) on \([0,1]\). The Mean Value Theorem and \(f'(x)=e^x\leq e\) show that \(|e^u-e^v|\leq e|u-v|\). Thus the Hölder Error Bound applies with \(\alpha=1\) and \(L=e\), giving

$$ \|B_nf-f\|_\infty\leq\frac{e}{2\sqrt n}. $$

Suppose the requested error is \(\varepsilon>0\). It is enough to choose an integer \(n\) satisfying \(n>e^2/(4\varepsilon^2)\), because then \[ \frac{e}{2\sqrt n}<\varepsilon. \] For example, any integer strictly greater than \(e^2/(4\varepsilon^2)\) is a valid degree bound. The choice is independent of \(x\), so the result is uniform across the entire interval.

Worked Example: A Hölder Rate for \(\sqrt{x}\)

For \(u,v\in[0,1]\), assume first that \(u\geq v\). Then \[ (\sqrt u-\sqrt v)^2 =u+v-2\sqrt{uv} \leq u-v, \] because the last inequality is equivalent to \(2v\leq2\sqrt{uv}\), which follows from \(v\leq u\). Taking square roots gives \(|\sqrt u-\sqrt v|\leq\sqrt{u-v}\). Interchanging \(u\) and \(v\) handles the other order. Thus \(f(x)=\sqrt{x}\) satisfies the Hölder condition with \(\alpha=1/2\) and \(L=1\).

The theorem yields

$$ \|B_nf-f\|_\infty\leq\left(\frac{1}{4n}\right)^{1/4}. $$

To guarantee error less than \(\varepsilon>0\), choose \(n>1/(4\varepsilon^4)\). Indeed, this inequality implies \(1/(4n)<\varepsilon^4\), and taking fourth roots gives the desired strict bound. This example shows why the method accommodates functions that are not Lipschitz at an endpoint: a weaker Hölder condition still produces uniform convergence with an explicit rate.

Worked Example: Organizing the Proof on \([2,5]\)

Consider \(f(x)=\ln x\) on \([2,5]\), and fix \(\varepsilon>0\). Map the interval to \([0,1]\) by defining \(g(t)=f(2+3t)=\ln(2+3t)\). This function is continuous on \([0,1]\), and its supremum norm is \(M=\ln 5\), since \(2\leq2+3t\leq5\).

By uniform continuity, choose \(\delta>0\) so that \(\omega_g(\delta)<\varepsilon/2\). If \(M>0\), choose an integer \(n\geq1\) with \(n>M/(\varepsilon\delta^2)\). The Bernstein Error Estimate then gives

$$ \|B_ng-g\|_\infty \leq\omega_g(\delta)+\frac{M}{2n\delta^2} <\frac{\varepsilon}{2}+\frac{\varepsilon}{2} =\varepsilon. $$

Write \(q=B_ng\), a polynomial in \(t\), and define \(p(x)=q((x-2)/3)\). Since \(q\) is a polynomial and \((x-2)/3\) is affine, \(p\) is a polynomial in \(x\). For \(x\in[2,5]\), the number \(t=(x-2)/3\) lies in \([0,1]\), and \(g(t)=f(x)\). Consequently, \[ |p(x)-f(x)|=|q(t)-g(t)|\leq\|q-g\|_{\infty,[0,1]}<\varepsilon. \] Taking the supremum over \([2,5]\) proves the required uniform estimate. The example displays both stages of the strategy: prove the estimate on the standard interval, then transport the polynomial back by an affine change of variables.

Common Proof-Planning Errors

Several tempting shortcuts fail because they lose control of a quantifier or a dependency. First, pointwise continuity at each \(x\) does not by itself provide one distance scale that works for every \(x\). The compactness of the interval, through the Heine–Cantor Theorem, supplies uniform continuity and hence a single \(\delta\) for the whole domain.

Second, choosing \(n\) before \(\delta\) can leave the tail term uncontrolled: the required degree depends on \(\delta\) through \(1/\delta^2\). Third, an estimate that is valid for each \(x\) with a degree \(n\) depending on \(x\) is not a uniform approximation argument. Finally, when transferring intervals, the polynomial must be composed with the inverse affine map. Composing in the other direction may give a function on the wrong interval or fail to express the approximation in the original variable.

Takeaway: A successful Weierstrass proof keeps the error bound, quantifiers, and parameter dependencies visible. Uniform continuity fixes the local scale; the Bernstein moment controls the distant contribution; and only then is the degree chosen. Additional Hölder regularity converts the same moment strategy into an explicit approximation rate.

Check Your Understanding

Use the proof strategy and estimates in this tutorial to answer the following questions.

  1. Why must the choice of \(\delta\) come before the choice of \(n\) in the Bernstein Error Estimate?
  2. Which quantifier would fail if the degree were allowed to depend on the evaluation point \(x\)?
  3. What inequality relates the weighted average of \(|k/n-x|^\alpha\) to the second moment of the Bernstein weights?
  4. For a function satisfying a Hölder condition with exponent \(\alpha\), what power of \(n\) appears in the error bound?
  5. When transporting an approximation from \([0,1]\) to \([2,5]\), what polynomial in the original variable is formed from \(q(t)\)?