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 [latex]n[/latex]th Taylor polynomial for a function [latex]f[/latex] at [latex]a[/latex] is the [latex]n[/latex]th partial sum of the Taylor series for [latex]f[/latex] at [latex]a[/latex]. Therefore, to determine if the Taylor series converges, we need to determine whether the sequence of Taylor polynomials [latex]\left\{{p}_{n}\right\}[/latex] converges. However, not only do we want to know if the sequence of Taylor polynomials converges, we want to know if it converges to [latex]f[/latex]. To answer this question, we define the remainder [latex]{R}_{n}\left(x\right)[/latex] as
For the sequence of Taylor polynomials to converge to [latex]f[/latex], we need the remainder [latex]R_{n}[/latex] to converge to zero. 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.
Here we look for a bound on [latex]|{R}_{n}|[/latex]. Consider the simplest case: [latex]n=0[/latex]. Let [latex]p_{0}[/latex] be the 0th Taylor polynomial at [latex]a[/latex] for a function [latex]f[/latex]. The remainder [latex]R_{0}[/latex] satisfies
If [latex]f[/latex] is differentiable on an interval [latex]I[/latex] containing [latex]a[/latex] and [latex]x[/latex], then by the Mean Value Theorem there exists a real number [latex]c[/latex] between [latex]a[/latex] and [latex]x[/latex] such that [latex]f\left(x\right)-f\left(a\right)={f}^{\prime }\left(c\right)\left(x-a\right)[/latex]. Therefore,
Using the Mean Value Theorem in a similar argument, we can show that if [latex]f[/latex] is [latex]n[/latex] times differentiable on an interval [latex]I[/latex] containing [latex]a[/latex] and [latex]x[/latex], then the [latex]n[/latex]th remainder [latex]{R}_{n}[/latex] satisfies
for some real number [latex]c[/latex] between [latex]a[/latex] and [latex]x[/latex]. It is important to note that the value [latex]c[/latex] in the numerator above is not the center [latex]a[/latex], but rather an unknown value [latex]c[/latex] between [latex]a[/latex] and [latex]x[/latex]. This formula allows us to get a bound on the remainder [latex]{R}_{n}[/latex]. If we happen to know that [latex]|{f}^{\left(n+1\right)}\left(x\right)|[/latex] is bounded by some real number [latex]M[/latex] on this interval [latex]I[/latex], then
for all [latex]x[/latex] in the interval [latex]I[/latex].
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
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
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
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
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
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
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
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].
Example: Using Linear and Quadratic Approximations to Estimate Function Values
Consider the function [latex]f\left(x\right)=\sqrt[3]{x}[/latex].
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].
Use these two polynomials to estimate [latex]\sqrt[3]{11}[/latex].
Use Taylor’s theorem to bound the error.
Show Solution
For [latex]f\left(x\right)=\sqrt[3]{x}[/latex], the values of the function and its first two derivatives at [latex]x=8[/latex] are as follows:
By the Uniqueness of Taylor Series, there exists a c in the interval [latex]\left(8,11\right)[/latex] such that the remainder when approximating [latex]\sqrt[3]{11}[/latex] by the first Taylor polynomial satisfies
We do not know the exact value of c, so we find an upper bound on [latex]{R}_{1}\left(11\right)[/latex] by determining the maximum value of [latex]f^{\prime\prime}[/latex] on the interval [latex]\left(8,11\right)[/latex]. Since [latex]f^{\prime\prime}\left(x\right)=-\frac{2}{9{x}^{\frac{5}{3}}}[/latex], the largest value for [latex]|f^{\prime\prime}\left(x\right)|[/latex] on that interval occurs at [latex]x=8[/latex]. Using the fact that [latex]f^{\prime\prime}\left(8\right)=-\frac{1}{144}[/latex], we obtain
Since [latex]f^{\prime\prime\prime}\left(x\right)=\frac{10}{27{x}^{\frac{8}{3}}}[/latex], the maximum value of [latex]f^{\prime\prime\prime}[/latex] on the interval [latex]\left(8,11\right)[/latex] is [latex]f^{\prime\prime\prime}\left(8\right)\approx 0.0014468[/latex]. Therefore, we have
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.
Find the first and second Taylor polynomials for [latex]f\left(x\right)=\sqrt{x}[/latex] at [latex]x=4[/latex]. Use these polynomials to estimate [latex]\sqrt{6}[/latex]. Use Taylor’s theorem to bound the error.
Hint
Evaluate [latex]f\left(4\right),{f}^{\prime }\left(4\right)[/latex], and [latex]f^{\prime\prime} \left(4\right)[/latex].
To estimate the error, use the fact that the sixth Maclaurin polynomial is [latex]{p}_{6}\left(x\right)={p}_{5}\left(x\right)[/latex] and calculate a bound on [latex]{R}_{6}\left(\frac{\pi }{18}\right)[/latex]. By the Uniqueness of Taylor Series, the remainder is
for some c between 0 and [latex]\frac{\pi }{18}[/latex]. Using the fact that [latex]|{f}^{\left(7\right)}\left(x\right)|\le 1[/latex] for all x, we find that the magnitude of the error is at most
Solving this inequality for [latex]x[/latex], we have that the fifth Maclaurin polynomial gives an estimate to within 0.0001 as long as [latex]|x|<0.907[/latex].
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.
Use the fourth Maclaurin polynomial for [latex]\cos{x}[/latex] to approximate [latex]\cos\left(\frac{\pi }{12}\right)[/latex].
Hint
The fourth Maclaurin polynomial is [latex]{p}_{4}\left(x\right)=1-\frac{{x}^{2}}{2\text{!}}+\frac{{x}^{4}}{4\text{!}}[/latex].
Show Solution
0.96593
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].
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 [latex]f\left(x\right)=\frac{1}{x}[/latex] at [latex]x=1[/latex]. Determine the interval of convergence.
Show Solution
For [latex]f\left(x\right)=\frac{1}{x}[/latex], the values of the function and its first four derivatives at [latex]x=1[/latex] are
That is, we have [latex]{f}^{\left(n\right)}\left(1\right)={\left(-1\right)}^{n}n\text{!}[/latex] for all [latex]n\ge 0[/latex]. Therefore, the Taylor series for [latex]f[/latex] at [latex]x=1[/latex] is given by
diverges. Therefore, the interval of convergence is [latex]\left(0,2\right)[/latex].
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.
[latex]\displaystyle\sum _{n=0}^{\infty }{\left(\frac{2-x}{{2}^{n+2}}\right)}^{n}[/latex]. The interval of convergence is [latex]\left(0,4\right)[/latex].
We know that the Taylor series found in this example converges on the interval [latex]\left(0,2\right)[/latex], but how do we know it actually converges to [latex]f?[/latex] We consider this question in more generality in a moment, but for this example, we can answer this question by writing
That is, [latex]f[/latex] can be represented by the geometric series [latex]\displaystyle\sum _{n=0}^{\infty }{\left(1-x\right)}^{n}[/latex]. Since this is a geometric series, it converges to [latex]\frac{1}{x}[/latex] as long as [latex]|1-x|<1[/latex]. Therefore, the Taylor series found in the previous example does converge to [latex]f\left(x\right)=\frac{1}{x}[/latex] on [latex]\left(0,2\right)[/latex].
We now consider the more general question: if a Taylor series for a function [latex]f[/latex] converges on some interval, how can we determine if it actually converges to [latex]f?[/latex] 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 [latex]f[/latex] at a, the nth partial sum is given by the nth Taylor polynomial pn. Therefore, to determine if the Taylor series converges to [latex]f[/latex], we need to determine whether
Since the remainder [latex]{R}_{n}\left(x\right)=f\left(x\right)-{p}_{n}\left(x\right)[/latex], the Taylor series converges to [latex]f[/latex] if and only if
With this theorem, we can prove that a Taylor series for [latex]f[/latex] at a converges to [latex]f[/latex] if we can prove that the remainder [latex]{R}_{n}\left(x\right)\to 0[/latex]. To prove that [latex]{R}_{n}\left(x\right)\to 0[/latex], we typically use the bound
In the next example, we find the Maclaurin series for ex and [latex]\sin{x}[/latex] and show that these series converge to the corresponding functions for all real numbers by proving that the remainders [latex]{R}_{n}\left(x\right)\to 0[/latex] 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 [latex]f[/latex] converges to [latex]f[/latex] on that interval.
[latex]e^{x}[/latex]
[latex]\sin{x}[/latex]
Show Solution
Using the nth Maclaurin polynomial for [latex]e^{x}[/latex] found in the example: Finding Maclaurin Polynomials (a), we find that the Maclaurin series for [latex]e^{x}[/latex] is given by
for all x. Therefore, the series converges absolutely for all x, and thus, the interval of convergence is [latex]\left(-\infty ,\infty \right)[/latex]. To show that the series converges to [latex]e^{x}[/latex] for all [latex]x[/latex], we use the fact that [latex]{f}^{\left(n\right)}\left(x\right)={e}^{x}[/latex] for all [latex]n\ge 0[/latex] and [latex]e^{x}[/latex] is an increasing function on [latex]\left(-\infty ,\infty \right)[/latex]. Therefore, for any real number [latex]b[/latex], the maximum value of [latex]e^{x}[/latex] for all [latex]|x|\le b[/latex] is [latex]e^{b}[/latex]. Thus,
for any real number [latex]x[/latex]. By combining this fact with the squeeze theorem, the result is [latex]\underset{n\to \infty }{\text{lim}}{R}_{n}\left(x\right)=0[/latex].
Using the nth Maclaurin polynomial for [latex]\sin{x}[/latex] found in the example: Finding Maclaurin Polynomials (b), we find that the Maclaurin series for [latex]\sin{x}[/latex] is given by
for all [latex]x[/latex], we obtain the interval of convergence as [latex]\left(-\infty ,\infty \right)[/latex]. To show that the Maclaurin series converges to [latex]\sin{x}[/latex], look at [latex]{R}_{n}\left(x\right)[/latex]. For each [latex]x[/latex] there exists a real number [latex]c[/latex] between 0 and [latex]x[/latex] such that
for all real numbers [latex]x[/latex]. Using the same idea as in part a., the result is [latex]\underset{n\to \infty }{\text{lim}}{R}_{n}\left(x\right)=0[/latex] for all [latex]x[/latex], and therefore, the Maclaurin series for [latex]\sin{x}[/latex] converges to [latex]\sin{x}[/latex] for all real [latex]x[/latex].
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.
Find the Maclaurin series for [latex]f\left(x\right)=\cos{x}[/latex]. Use the ratio test to show that the interval of convergence is [latex]\left(-\infty ,\infty \right)[/latex]. Show that the Maclaurin series converges to [latex]\cos{x}[/latex] for all real numbers [latex]x[/latex].
Hint
Use the Maclaurin polynomials for [latex]\cos{x}[/latex].
By the ratio test, the interval of convergence is [latex]\left(-\infty ,\infty \right)[/latex]. Since [latex]|{R}_{n}\left(x\right)|\le \frac{{|x|}^{n+1}}{\left(n+1\right)\text{!}}[/latex], the series converges to [latex]\cos{x}[/latex] for all real x.
Activity: Proving that [latex]e[/latex] is Irrational
In this project, we use the Maclaurin polynomials for [latex]e^{x}[/latex] 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 [latex]e=\frac{r}{s}[/latex] for some integers [latex]r[/latex] and [latex]s[/latex] where [latex]s\ne 0[/latex].
Write the Maclaurin polynomials [latex]{p}_{0}\left(x\right),{p}_{1}\left(x\right),{p}_{2}\left(x\right),{p}_{3}\left(x\right),{p}_{4}\left(x\right)[/latex] for ex. Evaluate [latex]{p}_{0}\left(1\right),{p}_{1}\left(1\right),{p}_{2}\left(1\right),{p}_{3}\left(1\right),{p}_{4}\left(1\right)[/latex] to estimate e.
Let [latex]{R}_{n}\left(x\right)[/latex] denote the remainder when using [latex]{p}_{n}\left(x\right)[/latex] to estimate [latex]e^{x}[/latex]. Therefore, [latex]{R}_{n}\left(x\right)={e}^{x}-{p}_{n}\left(x\right)[/latex], and [latex]{R}_{n}\left(1\right)=e-{p}_{n}\left(1\right)[/latex]. Assuming that [latex]e=\frac{r}{s}[/latex] for integers r and s, evaluate [latex]{R}_{0}\left(1\right),{R}_{1}\left(1\right),{R}_{2}\left(1\right),{R}_{3}\left(1\right),{R}_{4}\left(1\right)[/latex].
Using the results from part 2, show that for each remainder [latex]{R}_{0}\left(1\right),{R}_{1}\left(1\right),{R}_{2}\left(1\right),{R}_{3}\left(1\right),{R}_{4}\left(1\right)[/latex], we can find an integer [latex]n[/latex] such that [latex]k{R}_{n}\left(1\right)[/latex] is an integer for [latex]n=0,1,2,3,4[/latex].
Write down the formula for the nth Maclaurin polynomial [latex]{p}_{n}\left(x\right)[/latex] for [latex]e^{x}[/latex] and the corresponding remainder [latex]{R}_{n}\left(x\right)[/latex]. Show that [latex]sn\text{!}{R}_{n}\left(1\right)[/latex] is an integer.
Use Taylor’s theorem to write down an explicit formula for [latex]{R}_{n}\left(1\right)[/latex]. Conclude that [latex]{R}_{n}\left(1\right)\ne 0[/latex], and therefore, [latex]sn\text{!}{R}_{n}\left(1\right)\ne 0[/latex].
Use Taylor’s theorem to find an estimate on [latex]{R}_{n}\left(1\right)[/latex]. Use this estimate combined with the result from part 5 to show that [latex]|sn\text{!}{R}_{n}\left(1\right)|<\frac{se}{n+1}[/latex]. Conclude that if [latex]n[/latex] is large enough, then [latex]|sn\text{!}{R}_{n}\left(1\right)|<1[/latex]. Therefore, [latex]sn\text{!}{R}_{n}\left(1\right)[/latex] is an integer with magnitude less than 1. Thus, [latex]sn\text{!}{R}_{n}\left(1\right)=0[/latex]. But from part 5, we know that [latex]sn\text{!}{R}_{n}\left(1\right)\ne 0[/latex]. We have arrived at a contradiction, and consequently, the original supposition that e is rational must be false.
Candela Citations
CC licensed content, Original
6.3 Taylor and Maclaurin Series. Authored by: Ryan Melton. License: CC BY: Attribution