Taylor and Maclaurin Series: Learn It 3

Taylor’s Theorem with Remainder

When we use a Taylor polynomial [latex]p_n(x)[/latex] to approximate a function [latex]f(x)[/latex], we need to know how good our approximation is. The remainder [latex]R_n(x)[/latex] tells us exactly that—it’s the difference between the actual function value and our polynomial approximation:

[latex]{R}_{n}(x)=f(x)-{p}_{n}(x)[/latex].

Think of it this way: if you’re using a Taylor polynomial to estimate [latex]f(x)[/latex], the remainder is your error. The smaller the remainder, the better your approximation.

For a Taylor series to converge to [latex]f[/latex], we need two things:

  • the sequence of Taylor polynomials [latex]{p_n}[/latex] must converge
  • the remainder [latex]R_n[/latex] must approach zero as [latex]n[/latex] increases.

If [latex]R_n[/latex] doesn’t go to zero, your Taylor series might converge—but not to the function you want! To determine if [latex]R_{n}[/latex] converges to zero, we introduce Taylor’s theorem with remainder. Not only is this theorem useful in proving that a Taylor series converges to its related function, but it will also allow us to quantify how well the [latex]n[/latex]th Taylor polynomial approximates the function.

Let’s start with the simplest case: the [latex]0[/latex]th-degree Taylor polynomial. Here, [latex]p_0(x) = f(a)[/latex], so:

[latex]R_0(x) = f(x) - f(a)[/latex]

If [latex]f[/latex] is differentiable on an interval containing both [latex]a[/latex] and [latex]x[/latex], the Mean Value Theorem tells us there’s some value [latex]c[/latex] between [latex]a[/latex] and [latex]x[/latex] where:

[latex]R_0(x) = f'(c)(x - a)[/latex]

Using similar reasoning with higher derivatives, we can show that for an [latex]n[/latex]-times differentiable function:

[latex]R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x - a)^{n+1}[/latex]

where [latex]c[/latex] is some unknown value between [latex]a[/latex] and [latex]x[/latex].

The [latex]c[/latex] in the remainder formula is NOT the center [latex]a[/latex]—it’s an unknown value somewhere between [latex]a[/latex] and [latex]x[/latex]. We usually can’t find its exact value, but we can still use this formula to bound our error.

Since we don’t know the exact value of [latex]c[/latex], we can’t calculate [latex]R_n(x)[/latex] exactly. However, if we know that [latex]|f^{(n+1)}(x)| \leq M[/latex] for all [latex]x[/latex] in our interval, then:

[latex]|R_n(x)| \leq \frac{M}{(n+1)!}|x - a|^{n+1}[/latex]

This bound is incredibly useful—it tells us the maximum possible error when using a Taylor polynomial.

We now state Taylor’s theorem, which provides the formal relationship between a function [latex]f[/latex] and its [latex]n[/latex]th degree Taylor polynomial [latex]{p}_{n}\left(x\right)[/latex]. This theorem allows us to bound the error when using a Taylor polynomial to approximate a function value, and will be important in proving that a Taylor series for [latex]f[/latex] converges to [latex]f[/latex].

theorem: Taylor’s theorem with remainder

Let [latex]f[/latex] be a function that can be differentiated [latex]n+1[/latex] times on an interval [latex]I[/latex] containing the real number [latex]a[/latex]. Let [latex]p_{n}[/latex] be the [latex]n[/latex]th Taylor polynomial of [latex]f[/latex] at [latex]a[/latex] and let

[latex]{R}_{n}\left(x\right)=f\left(x\right)-{p}_{n}\left(x\right)[/latex]

 

be the [latex]n[/latex]th remainder. Then for each [latex]x[/latex] in the interval [latex]I[/latex], there exists a real number [latex]c[/latex] between [latex]a[/latex] and [latex]x[/latex] such that

[latex]{R}_{n}\left(x\right)=\frac{{f}^{\left(n+1\right)}\left(c\right)}{\left(n+1\right)\text{!}}{\left(x-a\right)}^{n+1}[/latex].

 

If there exists a real number [latex]M[/latex] such that [latex]|{f}^{\left(n+1\right)}\left(x\right)|\le M[/latex] for all [latex]x\in I[/latex], then

[latex]|{R}_{n}\left(x\right)|\le \frac{M}{\left(n+1\right)\text{!}}{|x-a|}^{n+1}[/latex]

 

for all [latex]x[/latex] in [latex]I[/latex].

Proof


Fix a point [latex]x\in I[/latex] and introduce the function g such that

[latex]g\left(t\right)=f\left(x\right)-f\left(t\right)-{f}^{\prime }\left(t\right)\left(x-t\right)-\frac{f^{\prime\prime}\left(t\right)}{2\text{!}}{\left(x-t\right)}^{2}-\cdots -\frac{{f}^{\left(n\right)}\left(t\right)}{n\text{!}}{\left(x-t\right)}^{n}-{R}_{n}\left(x\right)\frac{{\left(x-t\right)}^{n+1}}{{\left(x-a\right)}^{n+1}}[/latex].

 

We claim that g satisfies the criteria of Rolle’s theorem. Since g is a polynomial function (in t), it is a differentiable function. Also, g is zero at [latex]t=a[/latex] and [latex]t=x[/latex] because

[latex]\begin{array}{ccc}\hfill g\left(a\right)& =\hfill & f\left(x\right)-f\left(a\right)-{f}^{\prime }\left(a\right)\left(x-a\right)-\frac{f^{\prime\prime}\left(a\right)}{2\text{!}}{\left(x-a\right)}^{2}+\cdots +\frac{{f}^{\left(n\right)}\left(a\right)}{n\text{!}}{\left(x-a\right)}^{n}-{R}_{n}\left(x\right)\hfill \\ & =\hfill & f\left(x\right)-{p}_{n}\left(x\right)-{R}_{n}\left(x\right)\hfill \\ & =\hfill & 0,\hfill \\ g\left(x\right)\hfill & =\hfill & f\left(x\right)-f\left(x\right)-0-\cdots -0\hfill \\ & =\hfill & 0.\hfill \end{array}[/latex]

 

Therefore, g satisfies Rolle’s theorem, and consequently, there exists c between a and x such that [latex]{g}^{\prime }\left(c\right)=0[/latex]. We now calculate [latex]{g}^{\prime }[/latex]. Using the product rule, we note that

[latex]\frac{d}{dt}\left[\frac{{f}^{\left(n\right)}\left(t\right)}{n\text{!}}{\left(x-t\right)}^{n}\right]=\frac{-{f}^{\left(n\right)}\left(t\right)}{\left(n - 1\right)\text{!}}{\left(x-t\right)}^{n - 1}+\frac{{f}^{\left(n+1\right)}\left(t\right)}{n\text{!}}{\left(x-t\right)}^{n}[/latex].

 

Consequently,

[latex]\begin{array}{cc}{g}^{\prime }\left(t\right)\hfill & = -{f}^{\prime }\left(t\right)+\left[{f}^{\prime }\left(t\right)-f^{\prime\prime}\left(t\right)\left(x-t\right)\right]+\left[f^{\prime\prime}\left(t\right)\left(x-t\right)-\frac{f^{\prime\prime\prime}\left(t\right)}{2\text{!}}{\left(x-t\right)}^{2}\right]+\cdots \hfill \\ & +\left[\frac{{f}^{\left(n\right)}\left(t\right)}{\left(n - 1\right)\text{!}}{\left(x-t\right)}^{n - 1}-\frac{{f}^{\left(n+1\right)}\left(t\right)}{n\text{!}}{\left(x-t\right)}^{n}\right]+\left(n+1\right){R}_{n}\left(x\right)\frac{{\left(x-t\right)}^{n}}{{\left(x-a\right)}^{n+1}}.\hfill \end{array}[/latex]

 

Notice that there is a telescoping effect. Therefore,

[latex]{g}^{\prime }\left(t\right)=-\frac{{f}^{\left(n+1\right)}\left(t\right)}{n\text{!}}{\left(x-t\right)}^{n}+\left(n+1\right){R}_{n}\left(x\right)\frac{{\left(x-t\right)}^{n}}{{\left(x-a\right)}^{n+1}}[/latex].

 

By Rolle’s theorem, we conclude that there exists a number c between a and x such that [latex]{g}^{\prime }\left(c\right)=0[/latex]. Since

[latex]{g}^{\prime }\left(c\right)=-\frac{{f}^{\left(n+1\right)}\left(c\right)}{n\text{!}}{\left(x-c\right)}^{n}+\left(n+1\right){R}_{n}\left(x\right)\frac{{\left(x-c\right)}^{n}}{{\left(x-a\right)}^{n+1}}[/latex]

 

we conclude that

[latex]-\frac{{f}^{\left(n+1\right)}\left(c\right)}{n\text{!}}{\left(x-c\right)}^{n}+\left(n+1\right){R}_{n}\left(x\right)\frac{{\left(x-c\right)}^{n}}{{\left(x-a\right)}^{n+1}}=0[/latex].

 

Adding the first term on the left-hand side to both sides of the equation and dividing both sides of the equation by [latex]n+1[/latex], we conclude that

[latex]{R}_{n}\left(x\right)=\frac{{f}^{\left(n+1\right)}\left(c\right)}{\left(n+1\right)\text{!}}{\left(x-a\right)}^{n+1}[/latex]

 

as desired. From this fact, it follows that if there exists M such that [latex]|{f}^{\left(n+1\right)}\left(x\right)|\le M[/latex] for all x in I, then

[latex]|{R}_{n}\left(x\right)|\le \frac{M}{\left(n+1\right)\text{!}}{|x-a|}^{n+1}[/latex].

 

[latex]_\blacksquare[/latex]

This theorem gives us two powerful tools:

  • A way to prove that a Taylor series converges to [latex]f[/latex]
  • A method to bound the error when approximating [latex]f[/latex] with a Taylor polynomial

Notice how the factorial in the denominator grows very quickly as [latex]n[/latex] increases. This rapid growth often causes the remainder to approach zero, which is exactly what we need for convergence. Not only does Taylor’s theorem allow us to prove that a Taylor series converges to a function, but it also allows us to estimate the accuracy of Taylor polynomials in approximating function values. We begin by looking at linear and quadratic approximations of [latex]f\left(x\right)=\sqrt[3]{x}[/latex] at [latex]x=8[/latex] and determine how accurate these approximations are at estimating [latex]\sqrt[3]{11}[/latex].

Consider the function [latex]f\left(x\right)=\sqrt[3]{x}[/latex].

  1. Find the first and second Taylor polynomials for [latex]f[/latex] at [latex]x=8[/latex]. Use a graphing utility to compare these polynomials with [latex]f[/latex] near [latex]x=8[/latex].
  2. Use these two polynomials to estimate [latex]\sqrt[3]{11}[/latex].
  3. Use Taylor’s theorem to bound the error.

Watch the following video to see the worked solution to the example above.

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “6.3 Taylor and Maclaurin Series” here (opens in new window).

As seen previously, the Maclaurin polynomials for [latex]\sin{x}[/latex] are given by

[latex]\begin{array}{cc}\hfill {p}_{2m+1}\left(x\right)& ={p}_{2m+2}\left(x\right)\hfill \\ & =x-\frac{{x}^{3}}{3\text{!}}+\frac{{x}^{5}}{5\text{!}}-\frac{{x}^{7}}{7\text{!}}+\cdots +{\left(-1\right)}^{m}\frac{{x}^{2m+1}}{\left(2m+1\right)\text{!}}\hfill \end{array}[/latex]

for [latex]m=0,1,2,\dots[/latex].

  1. Use the fifth Maclaurin polynomial for [latex]\sin{x}[/latex] to approximate [latex]\sin\left(\frac{\pi }{18}\right)[/latex] and bound the error.
  2. For what values of [latex]x[/latex] does the fifth Maclaurin polynomial approximate [latex]\sin{x}[/latex] to within 0.0001?

Watch the following video to see the worked solution to the example above.

For closed captioning, open the video on its original page by clicking the Youtube logo in the lower right-hand corner of the video display. In YouTube, the video will begin at the same starting point as this clip, but will continue playing until the very end.

You can view the transcript for this segmented clip of “6.3 Taylor and Maclaurin Series” here (opens in new window).

Now that we are able to bound the remainder [latex]{R}_{n}\left(x\right)[/latex], we can use this bound to prove that a Taylor series for [latex]f[/latex] at [latex]a[/latex] converges to [latex]f[/latex].