Taylor Polynomials as Approximants
The Weierstrass Approximation Theorem guarantees that every continuous function on a closed interval can be approximated uniformly by polynomials. The Bernstein construction used earlier in this course is one way to produce such approximants. When a function has derivatives, there is another natural construction: use its values and derivatives at a chosen point to build a Taylor polynomial. Taylor’s theorem then measures the error in terms of a higher derivative.
This method has a different scope from the general Weierstrass theorem. A Taylor polynomial of a given degree uses information about the function near one center, while a uniform approximation concerns the error at every point of the interval. A derivative bound can connect the two: if it holds throughout the interval, the Taylor error estimate is uniform.
The center \(c\) and degree \(n\) are choices. The Taylor polynomial agrees with \(f\) and its first \(n\) derivatives at \(c\), but those matching conditions alone do not tell us how close the polynomial is elsewhere. For that, we need a remainder formula and a bound on the next derivative.
The Integral Remainder and an Error Bound
Proof. For each integer \(m\geq0\), write
For \(m=0\), the Fundamental Theorem of Calculus gives \(I_0(x)=f(x)-f(c)\). For \(m\geq1\), integrate by parts with \(u=(x-t)^m/m!\) and \(dv=f^{(m+1)}(t)\,dt\). Then \(du=-(x-t)^{m-1}/(m-1)!\,dt\) and \(v=f^{(m)}(t)\). Thus
The endpoint term at \(t=x\) is zero because \(m\geq1\). The calculation uses only the assumed derivatives through order \(m+1\). Iterating the recurrence from \(m=n\) down to \(m=1\), and using the formula for \(I_0\), yields
This is \(f(x)-T_{n,c}f(x)\), proving the remainder formula. The integrations by parts are valid as oriented integrals whether \(x\geq c\) or \(x<c\). For the bound, take absolute values and use \(|f^{(n+1)}(t)|\leq M\). Integrating over the interval between \(c\) and \(x\) gives
This proves the estimate for either order of the endpoints and completes the proof. \(\square\)
The bound depends on two quantities: the distance from the center and the size of the \((n+1)\)-st derivative. To obtain one error bound across \([a,b]\), set \(R=\max(c-a,b-c)\). If the derivative is bounded by \(M\) there, then \(|x-c|\leq R\) for every \(x\) in the interval, so
This is a uniform estimate because its right-hand side does not depend on \(x\). Recall from Polynomial Approximation that \(E_n(f;[a,b])\) is the least possible uniform error among polynomials of degree at most \(n\). Since \(T_{n,c}f\) is one such polynomial, its error also bounds the best possible error from above.
Proof. By the definition of \(E_n(f;[a,b])\), it is the infimum of \(\|f-p\|_{\infty,[a,b]}\) over \(p\in\mathcal P_n\). The Taylor polynomial \(T_{n,c}f\) belongs to \(\mathcal P_n\), so the infimum is no greater than its error. Apply the uniform Taylor error bound. \(\square\)
Worked Examples
Worked Example: Approximating Cosine on a Symmetric Interval
Let \(f(x)=\cos x\) on \([-1,1]\), take \(c=0\), and use degree \(3\). The derivatives at \(0\) are \(f(0)=1\), \(f'(0)=0\), \(f''(0)=-1\), and \(f'''(0)=0\). Therefore
The fourth derivative is \(f^{(4)}(x)=\cos x\), so \(|f^{(4)}(x)|\leq1\) throughout the interval. Here \(M=1\), \(R=1\), and \(n=3\). Taylor’s error bound gives
Thus one polynomial approximates cosine to within \(1/24\) at every point of \([-1,1]\). In particular, \(E_3(\cos;[-1,1])\leq1/24\). The bound is a guarantee, not necessarily the exact best error.
Worked Example: Approximating a Logarithm Near the Origin
Consider \(f(x)=\ln(1+x)\) on \([-1/2,1/2]\), again with center \(c=0\). For each integer \(k\geq1\),
At zero, these derivatives give the degree-three Taylor polynomial \(T_{3,0}f(x)=x-x^2/2+x^3/3\). The fourth derivative is \(-6/(1+x)^4\). On the interval, \(1+x\geq1/2\), so \(|f^{(4)}(x)|\leq6/(1/2)^4=96\). Since \(R=1/2\), the error estimate is
The derivative bound is deliberately taken on the whole interval, not only at the center. That is what makes the resulting estimate valid uniformly for every \(x\) in the interval.
Worked Example: An Exact Error for a Geometric Polynomial
For \(f(x)=1/(1+x)\) on \([-1/2,1/2]\), the degree-\(n\) Taylor polynomial at zero is \(S_n(x)=\sum_{k=0}^{n}(-x)^k\). The finite geometric identity \((1+x)S_n(x)=1-(-x)^{n+1}\) holds: multiplying the sum by \(1+x\) cancels the intermediate powers and leaves precisely those two terms. Consequently,
On this interval, \(|x|\leq1/2\) and \(1+x\geq1/2\), hence
This exact identity proves uniform convergence of these Taylor polynomials to \(f\) on the interval: given \(\varepsilon>0\), choose \(n\) so that \(2^{-n}<\varepsilon\). The calculation also shows that an exact algebraic remainder can sometimes give a sharper estimate than a general derivative bound.
When Do Taylor Polynomials Converge Uniformly?
Proof. Taylor’s Theorem with Integral Remainder gives, for every \(x\in[a,b]\),
Taking the supremum over \(x\) gives the same upper bound for \(\|f-T_{n,c}f\|_{\infty,[a,b]}\). By hypothesis this bound tends to zero as \(n\) tends to infinity. This is exactly uniform convergence of the Taylor polynomials to \(f\). \(\square\)
The criterion is sufficient, not necessary: failure of this particular bound to tend to zero does not prove that the Taylor polynomials fail to converge. The exact geometric remainder in the preceding example illustrates why another method of estimating the error can be useful.
A Necessary Distinction
Taylor’s theorem gives a finite-degree approximation whenever the required derivatives exist. It does not say that the Taylor polynomials converge to the function as the degree increases. Even having continuous derivatives of every order is not enough by itself. For example, define \(g(0)=0\) and \(g(x)=e^{-1/x^2}\) for \(x\neq0\). This function is infinitely differentiable, and all its derivatives at zero vanish; its Taylor polynomials centered at zero are therefore all the zero polynomial. But \(g(x)>0\) for every \(x\neq0\), so those polynomials do not converge to \(g\) at any such point.
The smoothness assertion follows from the fact that, away from zero, each derivative is a polynomial in \(1/x\) multiplied by \(e^{-1/x^2}\). As \(x\) tends to zero, this product tends to zero for every fixed polynomial: the exponential decays faster than any fixed power of \(1/|x|\). Repeatedly applying the definition of the derivative at zero then shows that each derivative extends there with value zero. This example warns against replacing the finite-order remainder estimate with an unjustified claim about an infinite Taylor series.
Check Your Understanding
Use the definitions and estimates in this tutorial to answer the following questions.
- What data at the center \(c\) determine the Taylor polynomial of degree \(n\)?
- In the integration-by-parts step for \(I_m(x)\), what choices of \(u\) and \(dv\) produce the recurrence using only the stated derivatives?
- If \(|f^{(n+1)}|\leq M\) on an interval and \(|x-c|\leq R\), what uniform error bound follows?
- Why does the Taylor error bound also give an upper bound for \(E_n(f;[a,b])\)?
- Does infinite differentiability alone guarantee that the Taylor polynomials converge to the function? Explain using the example discussed above.