Tutorials › Real Analysis › Uniform Polynomial Approximation

Approximation Theory · Tutorial 635 of 1000

Uniform Polynomial Approximation

Uniform approximation is more than pointwise closeness: it controls error across an entire interval and can be preserved while matching prescribed function values.

Advanced 11 min read

What You'll Learn

  • Distinguish a single polynomial approximation from a sequence converging uniformly to a function
  • Relate the best degree-n approximation errors to the Weierstrass Approximation Theorem
  • Construct uniform polynomial approximants that match prescribed values at finitely many nodes
  • Use endpoint corrections and Lagrange polynomials to enforce interpolation conditions
  • Estimate how uniform approximation controls errors in integrals
  • Apply Bernstein and Taylor estimates to concrete uniform approximation problems

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.

Definition: Let \(a<b\), let \(f\in C[a,b]\), and let \(p\) be a polynomial. The uniform error of \(p\) as an approximation to \(f\) on \([a,b]\) is $$ \|f-p\|_{\infty,[a,b]}=\sup_{x\in[a,b]}|f(x)-p(x)|. $$ A sequence of polynomials \((p_n)\) approximates \(f\) uniformly on \([a,b]\) if \(\|f-p_n\|_{\infty,[a,b]}\to0\) as \(n\to\infty\).

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

$$ 0\leq E_n(f;[a,b])\leq \|f-q\|_{\infty,[a,b]}<\varepsilon. $$

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.

Theorem (Uniform Polynomial Approximation with Finite Interpolation): Let \(a<b\), let \(f\in C[a,b]\), and choose distinct points \(x_1,\ldots,x_r\in[a,b]\), where \(r\geq1\). For every \(\varepsilon>0\), there is a polynomial \(P\) such that $$ P(x_i)=f(x_i)\quad (1\leq i\leq r), \qquad \|f-P\|_{\infty,[a,b]}<\varepsilon. $$

Proof. For each \(i\), define the Lagrange polynomial

$$ \ell_i(x)=\prod_{\substack{1\leq j\leq r\\j\neq i}}\frac{x-x_j}{x_i-x_j}. $$

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

$$ C=1+\sum_{i=1}^r\|\ell_i\|_{\infty,[a,b]}. $$

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

$$ P(x)=q(x)+\sum_{i=1}^r\bigl(f(x_i)-q(x_i)\bigr)\ell_i(x). $$

At a node \(x_k\), all terms in the sum vanish except the term with \(i=k\). Therefore

$$ P(x_k)=q(x_k)+f(x_k)-q(x_k)=f(x_k). $$

For every \(x\in[a,b]\), the triangle inequality and the definition of the supremum norm give

$$ \begin{aligned} |f(x)-P(x)| &\leq |f(x)-q(x)| +\sum_{i=1}^r|f(x_i)-q(x_i)|\,|\ell_i(x)|\\ &\leq \|f-q\|_{\infty,[a,b]} \left(1+\sum_{i=1}^r\|\ell_i\|_{\infty,[a,b]}\right)\\ &=C\|f-q\|_{\infty,[a,b]}<\varepsilon. \end{aligned} $$

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

$$ L_a(x)=\frac{b-x}{b-a}, \qquad L_b(x)=\frac{x-a}{b-a}. $$

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

$$ P(x)=q(x)+\bigl(f(a)-q(a)\bigr)L_a(x)+\bigl(f(b)-q(b)\bigr)L_b(x). $$

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]\),

$$ \begin{aligned} |f(x)-P(x)| &\leq |f(x)-q(x)| +|f(a)-q(a)|L_a(x)+|f(b)-q(b)|L_b(x)\\ &\leq |f(x)-q(x)|+\delta\bigl(L_a(x)+L_b(x)\bigr) <2\delta. \end{aligned} $$

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

$$ p_n(x)=\sum_{k=0}^n\frac{x^k}{k!}. $$

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

$$ \|e^x-p_n(x)\|_{\infty,[0,1]} \leq \frac{e}{(n+1)!}. $$

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

$$ |g(u)-g(v)| =\bigl||2u-1|-|2v-1|\bigr| \leq 2|u-v|. $$

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

$$ \|r_n-|x|\|_{\infty,[-1,1]}\leq\frac{1}{\sqrt n}. $$

The Lagrange polynomials for the nodes \(-1,0,1\) are

$$ \ell_-(x)=\frac{x(x-1)}{2}, \qquad \ell_0(x)=1-x^2, \qquad \ell_+(x)=\frac{x(x+1)}{2}. $$

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

$$ P_n(x)=r_n(x) +\bigl(1-r_n(-1)\bigr)\ell_-(x) -r_n(0)\ell_0(x) +\bigl(1-r_n(1)\bigr)\ell_+(x). $$

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

$$ \|P_n-|x|\|_{\infty,[-1,1]} \leq \|r_n-|x|\|_{\infty,[-1,1]}+\frac{3}{\sqrt n} \leq \frac{4}{\sqrt n}. $$

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.

Theorem (Integral Error from Uniform Approximation): Let \(a<b\), let \(f,p\in C[a,b]\), and suppose \(\|f-p\|_{\infty,[a,b]}\leq\delta\). Then $$ \left|\int_a^b f(x)\,dx-\int_a^b p(x)\,dx\right| \leq (b-a)\delta. $$

Proof. Linearity of the integral and the triangle inequality for integrals give

$$ \begin{aligned} \left|\int_a^b f(x)\,dx-\int_a^b p(x)\,dx\right| &=\left|\int_a^b(f(x)-p(x))\,dx\right|\\ &\leq\int_a^b|f(x)-p(x)|\,dx\\ &\leq\int_a^b\delta\,dx =(b-a)\delta. \end{aligned} $$

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.

Takeaway: Uniform polynomial approximation gives control over the entire interval, and the best degree-\(n\) errors for a continuous function tend to zero. Finite interpolation conditions can be imposed by correcting an initial approximant with Lagrange polynomials, while uniform error bounds also control integral errors.

Check Your Understanding

Use the definitions and arguments in this tutorial to answer the following questions.

  1. What does \(\|f-p\|_{\infty,[a,b]}<\varepsilon\) guarantee about the error at each point of the interval?
  2. Why does the Weierstrass Approximation Theorem imply that \(E_n(f;[a,b])\to0\)?
  3. How do the Lagrange polynomials ensure that the corrected polynomial takes the prescribed values at the nodes?
  4. In the three-node approximation to \(|x|\), what bounds the total size of the correction to the Bernstein polynomial?
  5. If a polynomial approximates \(f\) uniformly within \(\delta\), what bound follows for the difference between their integrals on \([a,b]\)?