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
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
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)(x−a). Therefore,
Using the Mean Value Theorem in a similar argument, we can show that if f is n times differentiable on an interval I containing a and x, then the nth remainder Rn satisfies
for some real number c between a and x. It is important to note that the value c in the numerator above is not the center a, but rather an unknown value c between a and x. This formula allows us to get a bound on the remainder Rn. If we happen to know that |f(n+1)(x)| is bounded by some real number M on this interval I, then
for all x in the interval I.
We now state Taylor’s theorem, which provides the formal relationship between a function f and its nth degree Taylor polynomial 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 f converges to f.
theorem: Taylor’s Theorem with Remainder
Let f be a function that can be differentiated n+1 times on an interval I containing the real number a. Let pn be the nth Taylor polynomial of f at a and let
be the nth remainder. Then for each x in the interval I, there exists a real number c between a and x such that
If there exists a real number M such that |f(n+1)(x)|≤M for all x∈I, then
for all x in I.
Proof
Fix a point x∈I and introduce the function g such that
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=a and t=x because
Therefore, g satisfies Rolle’s theorem, and consequently, there exists c between a and x such that g′(c)=0. We now calculate g′. Using the product rule, we note that
Consequently,
Notice that there is a telescoping effect. Therefore,
By Rolle’s theorem, we conclude that there exists a number c between a and x such that g′(c)=0. Since
we conclude that
Adding the first term on the left-hand side to both sides of the equation and dividing both sides of the equation by n+1, we conclude that
as desired. From this fact, it follows that if there exists M such that |f(n+1)(x)|≤M for all x in I, then
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)=3√x at x=8 and determine how accurate these approximations are at estimating 3√11.
Example: Using Linear and Quadratic Approximations to Estimate Function Values
Consider the function f(x)=3√x.
- Find the first and second Taylor polynomials for f at x=8. Use a graphing utility to compare these polynomials with f near x=8.
- Use these two polynomials to estimate 3√11.
- 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)=√x at x=4. Use these polynomials to estimate √6. Use Taylor’s theorem to bound the error.
Example: Approximating sinx using maclaurin polynomials
From the Example: Finding Maclaurin Polynomials, the Maclaurin polynomials for sinx are given by
for m=0,1,2,….
- Use the fifth Maclaurin polynomial for sinx to approximate sin(π18) and bound the error.
- For what values of x does the fifth Maclaurin polynomial approximate sinx 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
That is, f can be represented by the geometric series ∞∑n=0(1−x)n. Since this is a geometric series, it converges to 1x as long as |1−x|<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
Since the remainder Rn(x)=f(x)−pn(x), the Taylor series converges to f if and only if
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
converges to f(x) for all x in I if and only if
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
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.
- ex
- 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 s≠0.
- 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.
- Let Rn(x) denote the remainder when using pn(x) to estimate ex. Therefore, Rn(x)=ex−pn(x), and Rn(1)=e−pn(1). Assuming that e=rs for integers r and s, evaluate R0(1),R1(1),R2(1),R3(1),R4(1).
- 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.
- 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.
- Use Taylor’s theorem to write down an explicit formula for Rn(1). Conclude that Rn(1)≠0, and therefore, sn!Rn(1)≠0.
- 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.
Candela Citations
- 6.3 Taylor and Maclaurin Series. Authored by: Ryan Melton. License: CC BY: Attribution
- Calculus Volume 2. Authored by: Gilbert Strang, Edwin (Jed) Herman. Provided by: OpenStax. Located at: https://openstax.org/books/calculus-volume-2/pages/1-introduction. License: CC BY-NC-SA: Attribution-NonCommercial-ShareAlike. License Terms: Access for free at https://openstax.org/books/calculus-volume-2/pages/1-introduction