Uniform Approximation Across an Interval
A polynomial can be close to a function at selected points and still be far away elsewhere. Uniform polynomial approximation rules out that possibility by measuring the largest error over the entire interval. This is the setting of the Weierstrass Approximation Theorem from earlier in the course: every continuous function on a closed interval can be approximated uniformly by polynomials. Here we develop consequences of that statement and a useful refinement: the approximating polynomial can be required to match the function at specified points.
Because \(f-p\) is continuous on a compact interval, the supremum in this definition is finite and is attained. The key point is that one bound controls the error at every \(x\in[a,b]\): if \(\|f-p\|_{\infty,[a,b]}<\varepsilon\), then \(|f(x)-p(x)|<\varepsilon\) for all \(x\) in the interval.
Recall from Polynomial Approximation that \(E_n(f;[a,b])\) is the least uniform error among polynomials of degree at most \(n\). The Weierstrass Approximation Theorem implies that these best errors tend to zero. Indeed, given \(\varepsilon>0\), choose a polynomial \(q\) with \(\|f-q\|_{\infty,[a,b]}<\varepsilon\), and let \(m\) be its degree. For every \(n\geq m\), \(q\in\mathcal P_n\), so
Thus \(E_n(f;[a,b])\to0\). This conclusion concerns the best possible errors; it does not say that every particular choice of degree-\(n\) polynomials converges to \(f\). A sequence must be constructed or estimated.
Exact Interpolation at Prescribed Points
An approximation may need to satisfy exact conditions as well as a small error bound. For example, a polynomial used in a model may be required to take specified values at the endpoints or at measured data locations. We can impose any finite collection of such value conditions while retaining uniform approximation.
Proof. For each \(i\), define the Lagrange polynomial
When \(r=1\), the empty product is \(1\). The distinctness of the nodes ensures that every denominator is nonzero. Substituting \(x=x_i\) gives \(\ell_i(x_i)=1\); substituting \(x=x_k\) for \(k\neq i\) gives \(\ell_i(x_k)=0\), because the product then contains the factor \(x_k-x_k\). Each \(\ell_i\) is continuous, so its supremum norm on \([a,b]\) is finite. Put
Then \(C\geq1\). By the Weierstrass Approximation Theorem, choose a polynomial \(q\) such that \(\|f-q\|_{\infty,[a,b]}<\varepsilon/C\). Correct its values at the nodes by defining
At a node \(x_k\), all terms in the sum vanish except the term with \(i=k\). Therefore
For every \(x\in[a,b]\), the triangle inequality and the definition of the supremum norm give
Taking the supremum over \(x\) proves \(\|f-P\|_{\infty,[a,b]}<\varepsilon\), while the node calculation proves exact interpolation. \(\square\)
The correction is finite-dimensional: it adds a linear combination of fixed polynomials \(\ell_i\). The approximation error in the initial polynomial controls each correction coefficient, and hence controls the total change uniformly.
Worked Examples
Worked Example: Matching Both Endpoint Values
Let \(f\in C[a,b]\), and suppose a polynomial \(q\) satisfies \(\|f-q\|_{\infty,[a,b]}<\delta\). Define the affine polynomials
At \(a\), these have values \(L_a(a)=1\) and \(L_b(a)=0\); at \(b\), they have values \(L_a(b)=0\) and \(L_b(b)=1\). Also \(L_a(x)+L_b(x)=1\) on the interval, and both are nonnegative there. Correct \(q\) by setting
The endpoint substitutions give \(P(a)=f(a)\) and \(P(b)=f(b)\). Since \(|f(a)-q(a)|<\delta\) and \(|f(b)-q(b)|<\delta\), for every \(x\in[a,b]\),
Thus an initial approximation within \(\varepsilon/2\) produces an endpoint-matching polynomial within \(\varepsilon\). The construction works even when \(q\) has degree greater than one; adding affine corrections does not increase its degree beyond the larger of its degree and one.
Worked Example: Uniform Approximation of the Exponential on a Closed Interval
Consider \(f(x)=e^x\) on \([0,1]\). Its degree-\(n\) Taylor polynomial centered at zero is
For \(x\in[0,1]\), the \((n+1)\)-st derivative of \(e^x\) is \(e^x\), which is at most \(e\). Taylor’s theorem with the remainder bound established in Approximation by Polynomials therefore gives
The right-hand side tends to zero: the ratio of its value at \(n+1\) to its value at \(n\) is \(1/(n+2)\), which tends to zero. Hence \(p_n\) converges uniformly to \(e^x\) on the whole interval. The estimate is not just a pointwise statement about the Taylor expansion; it supplies one error bound valid for every \(x\in[0,1]\).
Worked Example: Approximating Absolute Value While Matching Three Values
We construct polynomials approximating \(f(x)=|x|\) on \([-1,1]\) and matching \(f\) at \(-1,0,1\). On \([0,1]\), define \(g(t)=|2t-1|\). This function is Lipschitz with constant \(2\), since
The Hölder Error Bound for Bernstein Polynomials from earlier in the course gives \(\|B_ng-g\|_{\infty,[0,1]}\leq1/\sqrt n\). Set \(r_n(x)=B_ng((x+1)/2)\). This is a polynomial in \(x\), and the change of variable \(t=(x+1)/2\) yields
The Lagrange polynomials for the nodes \(-1,0,1\) are
Direct substitution gives \(\ell_-(-1)=1\), \(\ell_-(0)=\ell_-(1)=0\); \(\ell_0(0)=1\), \(\ell_0(-1)=\ell_0(1)=0\); and \(\ell_+(1)=1\), \(\ell_+(-1)=\ell_+(0)=0\). Each has supremum norm \(1\) on \([-1,1]\): for \(\ell_0\) this follows from \(0\leq1-x^2\leq1\), while \(|x(x-1)|/2\leq1\) and \(|x(x+1)|/2\leq1\) there, with equality at an endpoint. Define
Substituting each node shows \(P_n(-1)=1\), \(P_n(0)=0\), and \(P_n(1)=1\), the exact values of \(|x|\). Each correction coefficient has absolute value at most \(1/\sqrt n\), by the uniform bound on \(r_n-|x|\). Since each Lagrange polynomial has norm \(1\), the triangle inequality gives
Therefore these interpolating polynomials converge uniformly to \(|x|\), while matching all three prescribed values for every \(n\).
What Uniform Error Controls
Uniform approximation also gives direct bounds on quantities computed from the function. For example, it controls the error in an integral independently of where the pointwise error is largest.
Proof. Linearity of the integral and the triangle inequality for integrals give
This proves the estimate. In particular, if polynomials \(p_n\) converge uniformly to \(f\), their integrals converge to the integral of \(f\), since the integral error is at most \((b-a)\|f-p_n\|_{\infty,[a,b]}\), which tends to zero. \(\square\)
A common pitfall is to treat uniform approximation as if it required differentiability. It does not: the Weierstrass Approximation Theorem applies to every continuous function on a closed interval. Taylor polynomials provide a useful construction when derivatives are available, but Bernstein polynomials and other methods can approximate functions with corners, such as \(|x|\). Conversely, an approximation that is accurate at a finite set of points is not automatically accurate between them; the supremum norm is what makes the guarantee genuinely uniform.
Check Your Understanding
Use the definitions and arguments in this tutorial to answer the following questions.
- What does \(\|f-p\|_{\infty,[a,b]}<\varepsilon\) guarantee about the error at each point of the interval?
- Why does the Weierstrass Approximation Theorem imply that \(E_n(f;[a,b])\to0\)?
- How do the Lagrange polynomials ensure that the corrected polynomial takes the prescribed values at the nodes?
- In the three-node approximation to \(|x|\), what bounds the total size of the correction to the Bernstein polynomial?
- If a polynomial approximates \(f\) uniformly within \(\delta\), what bound follows for the difference between their integrals on \([a,b]\)?