Taylor’s Theorem with Remainder and Convergence

Learning Outcomes

  • Explain the meaning and significance of Taylor’s theorem with remainder
  • Estimate the remainder for a Taylor series approximation of a given function

Taylor’s Theorem with Remainder

Recall that the nnth Taylor polynomial for a function ff at aa is the nnth partial sum of the Taylor series for ff at aa. Therefore, to determine if the Taylor series converges, we need to determine whether the sequence of Taylor polynomials {pn}{pn} converges. However, not only do we want to know if the sequence of Taylor polynomials converges, we want to know if it converges to ff. To answer this question, we define the remainder Rn(x)Rn(x) as

Rn(x)=f(x)pn(x)Rn(x)=f(x)pn(x).

 

For the sequence of Taylor polynomials to converge to ff, we need the remainder RnRn to converge to zero. To determine if RnRn 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 nnth Taylor polynomial approximates the function.

Here we look for a bound on |Rn||Rn|. Consider the simplest case: n=0n=0. Let p0p0 be the 0th Taylor polynomial at aa for a function ff. The remainder R0R0 satisfies

R0(x)=f(x)p0(x)=f(x)f(a).R0(x)=f(x)p0(x)=f(x)f(a).

 

If ff is differentiable on an interval II containing aa and xx, then by the Mean Value Theorem there exists a real number cc between aa and xx such that f(x)f(a)=f(c)(xa)f(x)f(a)=f(c)(xa). Therefore,

R0(x)=f(c)(xa)R0(x)=f(c)(xa).

 

Using the Mean Value Theorem in a similar argument, we can show that if ff is nn times differentiable on an interval II containing aa and xx, then the nnth remainder RnRn satisfies

Rn(x)=f(n+1)(c)(n+1)!(xa)n+1Rn(x)=f(n+1)(c)(n+1)!(xa)n+1

for some real number cc between aa and xx. It is important to note that the value cc in the numerator above is not the center aa, but rather an unknown value cc between aa and xx. This formula allows us to get a bound on the remainder RnRn. If we happen to know that |f(n+1)(x)||f(n+1)(x)| is bounded by some real number MM on this interval II, then

|Rn(x)|M(n+1)!|xa|n+1|Rn(x)|M(n+1)!|xa|n+1

 

for all xx in the interval II.

We now state Taylor’s theorem, which provides the formal relationship between a function ff and its nnth degree Taylor polynomial pn(x)pn(x). 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 ff converges to ff.

theorem: Taylor’s Theorem with Remainder


Let ff be a function that can be differentiated n+1n+1 times on an interval II containing the real number aa. Let pnpn be the nnth Taylor polynomial of ff at aa and let

Rn(x)=f(x)pn(x)Rn(x)=f(x)pn(x)

 

be the nnth remainder. Then for each xx in the interval II, there exists a real number cc between aa and xx such that

Rn(x)=f(n+1)(c)(n+1)!(xa)n+1Rn(x)=f(n+1)(c)(n+1)!(xa)n+1.

 

If there exists a real number MM such that |f(n+1)(x)|M|f(n+1)(x)|M for all xIxI, then

|Rn(x)|M(n+1)!|xa|n+1|Rn(x)|M(n+1)!|xa|n+1

 

for all xx in II.

Proof

Fix a point xIxI and introduce the function g such that

g(t)=f(x)f(t)f(t)(xt)f(t)2!(xt)2f(n)(t)n!(xt)nRn(x)(xt)n+1(xa)n+1g(t)=f(x)f(t)f(t)(xt)f(t)2!(xt)2f(n)(t)n!(xt)nRn(x)(xt)n+1(xa)n+1.

 

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 t=at=a and t=xt=x because

g(a)=f(x)f(a)f(a)(xa)f(a)2!(xa)2++f(n)(a)n!(xa)nRn(x)=f(x)pn(x)Rn(x)=0,g(x)=f(x)f(x)00=0.g(a)=f(x)f(a)f(a)(xa)f(a)2!(xa)2++f(n)(a)n!(xa)nRn(x)=f(x)pn(x)Rn(x)=0,g(x)=f(x)f(x)00=0.

 

Therefore, g satisfies Rolle’s theorem, and consequently, there exists c between a and x such that g(c)=0g(c)=0. We now calculate gg. Using the product rule, we note that

ddt[f(n)(t)n!(xt)n]=f(n)(t)(n1)!(xt)n1+f(n+1)(t)n!(xt)nddt[f(n)(t)n!(xt)n]=f(n)(t)(n1)!(xt)n1+f(n+1)(t)n!(xt)n.

 

Consequently,

g(t)=f(t)+[f(t)f(t)(xt)]+[f(t)(xt)f(t)2!(xt)2]++[f(n)(t)(n1)!(xt)n1f(n+1)(t)n!(xt)n]+(n+1)Rn(x)(xt)n(xa)n+1.g(t)=f(t)+[f(t)f(t)(xt)]+[f(t)(xt)f(t)2!(xt)2]++[f(n)(t)(n1)!(xt)n1f(n+1)(t)n!(xt)n]+(n+1)Rn(x)(xt)n(xa)n+1.

 

Notice that there is a telescoping effect. Therefore,

g(t)=f(n+1)(t)n!(xt)n+(n+1)Rn(x)(xt)n(xa)n+1g(t)=f(n+1)(t)n!(xt)n+(n+1)Rn(x)(xt)n(xa)n+1.

 

By Rolle’s theorem, we conclude that there exists a number c between a and x such that g(c)=0g(c)=0. Since

g(c)=f(n+1)(c)n!(xc)n+(n+1)Rn(x)(xc)n(xa)n+1g(c)=f(n+1)(c)n!(xc)n+(n+1)Rn(x)(xc)n(xa)n+1

 

we conclude that

f(n+1)(c)n!(xc)n+(n+1)Rn(x)(xc)n(xa)n+1=0f(n+1)(c)n!(xc)n+(n+1)Rn(x)(xc)n(xa)n+1=0.

 

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

Rn(x)=f(n+1)(c)(n+1)!(xa)n+1Rn(x)=f(n+1)(c)(n+1)!(xa)n+1

 

as desired. From this fact, it follows that if there exists M such that |f(n+1)(x)|M|f(n+1)(x)|M for all x in I, then

|Rn(x)|M(n+1)!|xa|n+1|Rn(x)|M(n+1)!|xa|n+1.

 

◼

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 f(x)=3xf(x)=3x at x=8x=8 and determine how accurate these approximations are at estimating 311311.

Example: Using Linear and Quadratic Approximations to Estimate Function Values

Consider the function f(x)=3xf(x)=3x.

  1. Find the first and second Taylor polynomials for ff at x=8x=8. Use a graphing utility to compare these polynomials with ff near x=8x=8.
  2. Use these two polynomials to estimate 311311.
  3. Use Taylor’s theorem to bound the error.

Watch the following video to see the worked solution to Example: Using Linear and Quadratic Approximations to Estimate Function Values.

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).

try it

Find the first and second Taylor polynomials for f(x)=xf(x)=x at x=4x=4. Use these polynomials to estimate 66. Use Taylor’s theorem to bound the error.

Example: Approximating sinx using maclaurin polynomials

From the Example: Finding Maclaurin Polynomials, the Maclaurin polynomials for sinxsinx are given by

p2m+1(x)=p2m+2(x)=xx33!+x55!x77!++(1)mx2m+1(2m+1)!p2m+1(x)=p2m+2(x)=xx33!+x55!x77!++(1)mx2m+1(2m+1)!

 

for m=0,1,2,m=0,1,2,.

  1. Use the fifth Maclaurin polynomial for sinxsinx to approximate sin(π18)sin(π18) and bound the error.
  2. For what values of xx does the fifth Maclaurin polynomial approximate sinxsinx to within 0.0001?

Watch the following video to see the worked solution to Example: Approximating sin x Using Maclaurin Polynomials.

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).

try it

Use the fourth Maclaurin polynomial for cosx to approximate cos(π12).

Now that we are able to bound the remainder Rn(x), we can use this bound to prove that a Taylor series for f at a converges to f.

Try It

Representing Functions with Taylor and Maclaurin Series

We now discuss issues of convergence for Taylor series. We begin by showing how to find a Taylor series for a function, and how to find its interval of convergence.

Example: Finding a Taylor Series

Find the Taylor series for f(x)=1x at x=1. Determine the interval of convergence.

Watch the following video to see the worked solution to Example: Finding a Taylor Series.

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).

try it

Find the Taylor series for f(x)=12x at x=2 and determine its interval of convergence.

We know that the Taylor series found in this example converges on the interval (0,2), but how do we know it actually converges to f? We consider this question in more generality in a moment, but for this example, we can answer this question by writing

f(x)=1x=11(1x).

 

That is, f can be represented by the geometric series n=0(1x)n. Since this is a geometric series, it converges to 1x as long as |1x|<1. Therefore, the Taylor series found in the previous example does converge to f(x)=1x on (0,2).

We now consider the more general question: if a Taylor series for a function f converges on some interval, how can we determine if it actually converges to f? To answer this question, recall that a series converges to a particular value if and only if its sequence of partial sums converges to that value. Given a Taylor series for f at a, the nth partial sum is given by the nth Taylor polynomial pn. Therefore, to determine if the Taylor series converges to f, we need to determine whether

limnpn(x)=f(x).

 

Since the remainder Rn(x)=f(x)pn(x), the Taylor series converges to f if and only if

limnRn(x)=0.

 

We now state this theorem formally.

Theorem: Convergence of Taylor Series


Suppose that f has derivatives of all orders on an interval I containing a. Then the Taylor series

n=0f(n)(a)n!(xa)n

 

converges to f(x) for all x in I if and only if

limnRn(x)=0

 

for all x in I.

With this theorem, we can prove that a Taylor series for f at a converges to f if we can prove that the remainder Rn(x)0. To prove that Rn(x)0, we typically use the bound

|Rn(x)|M(n+1)!|xa|n+1

 

from Taylor’s theorem with remainder.

In the next example, we find the Maclaurin series for ex and sinx and show that these series converge to the corresponding functions for all real numbers by proving that the remainders Rn(x)0 for all real numbers x.

Example: Finding Maclaurin Series

For each of the following functions, find the Maclaurin series and its interval of convergence. Use Taylor’s Theorem with Remainder to prove that the Maclaurin series for f converges to f on that interval.

  1. ex
  2. sinx

Watch the following video to see the worked solution to Example: Finding Maclaurin Series.

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).

try it

Find the Maclaurin series for f(x)=cosx. Use the ratio test to show that the interval of convergence is (,). Show that the Maclaurin series converges to cosx for all real numbers x.

Activity: Proving that e is Irrational

In this project, we use the Maclaurin polynomials for ex to prove that e is irrational. The proof relies on supposing that e is rational and arriving at a contradiction. Therefore, in the following steps, we suppose e=rs for some integers r and s where s0.

  1. Write the Maclaurin polynomials p0(x),p1(x),p2(x),p3(x),p4(x) for ex. Evaluate p0(1),p1(1),p2(1),p3(1),p4(1) to estimate e.
  2. Let Rn(x) denote the remainder when using pn(x) to estimate ex. Therefore, Rn(x)=expn(x), and Rn(1)=epn(1). Assuming that e=rs for integers r and s, evaluate R0(1),R1(1),R2(1),R3(1),R4(1).
  3. Using the results from part 2, show that for each remainder R0(1),R1(1),R2(1),R3(1),R4(1), we can find an integer n such that kRn(1) is an integer for n=0,1,2,3,4.
  4. Write down the formula for the nth Maclaurin polynomial pn(x) for ex and the corresponding remainder Rn(x). Show that sn!Rn(1) is an integer.
  5. Use Taylor’s theorem to write down an explicit formula for Rn(1). Conclude that Rn(1)0, and therefore, sn!Rn(1)0.
  6. Use Taylor’s theorem to find an estimate on Rn(1). Use this estimate combined with the result from part 5 to show that |sn!Rn(1)|<sen+1. Conclude that if n is large enough, then |sn!Rn(1)|<1. Therefore, sn!Rn(1) is an integer with magnitude less than 1. Thus, sn!Rn(1)=0. But from part 5, we know that sn!Rn(1)0. We have arrived at a contradiction, and consequently, the original supposition that e is rational must be false.