Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

11.12: Taylor's Theorem

( \newcommand{\kernel}{\mathrm{null}\,}\)

One of the most important uses of infinite series is the potential for using an initial portion of the series for f to approximate f. We have seen, for example, that when we add up the first n terms of an alternating series with decreasing terms that the difference between this and the true value is at most the size of the next term. A similar result is true of many Taylor series.

Theorem 11.11.1: Taylor's Theorem

Suppose that f is defined on some open interval I around a and suppose f(N+1)(x) exists on this interval. Then for each xa in I there is a value z between x and a so that f(x)=Nn=0f(n)(a)n!(xa)n+f(N+1)(z)(N+1)!(xa)N+1.

Proof

The proof requires some cleverness to set up, but then the details are quite elementary. We want to define a function F(t). Start with the equation F(t)=Nn=0f(n)(t)n!(xt)n+B(xt)N+1. Here we have replaced a by t in the first N+1 terms of the Taylor series, and added a carefully chosen term on the end, with B to be determined. Note that we are temporarily keeping x fixed, so the only variable in this equation is t, and we will be interested only in t between a and x. Now substitute t=a: F(a)=Nn=0f(n)(a)n!(xa)n+B(xa)N+1. Set this equal to f(x): f(x)=Nn=0f(n)(a)n!(xa)n+B(xa)N+1. Since xa, we can solve this for B, which is a "constant''---it depends on x and a but those are temporarily fixed.

Now we have defined a function F(t) with the property that F(a)=f(x). Consider also F(x): all terms with a positive power of (xt) become zero when we substitute x for t, so we are left with F(x)=f(0)(x)/0!=f(x). So F(t) is a function with the same value on the endpoints of the interval [a,x]. By Rolle's theorem (6.5.1), we know that there is a value z(a,x) such that F(z)=0. Let's look at F(t). Each term in F(t), except the first term and the extra term involving B, is a product, so to take the derivative we use the product rule on each of these terms.

It will help to write out the first few terms of the definition: F(t)=f(t)+f(1)(t)1!(xt)1+f(2)(t)2!(xt)2+f(3)(t)3!(xt)3++f(N)(t)N!(xt)N+B(xt)N+1. Now take the derivative: F(t)=f(t)+(f(1)(t)1!(xt)0(1)+f(2)(t)1!(xt)1)+(f(2)(t)1!(xt)1(1)+f(3)(t)2!(xt)2)+(f(3)(t)2!(xt)2(1)+f(4)(t)3!(xt)3)+++(f(N)(t)(N1)!(xt)N1(1)+f(N+1)(t)N!(xt)N)+B(N+1)(xt)N(1). Now most of the terms in this expression cancel out, leaving just F(t)=f(N+1)(t)N!(xt)N+B(N+1)(xt)N(1). At some z, F(z)=0 so 0=f(N+1)(z)N!(xz)N+B(N+1)(xz)N(1)B(N+1)(xz)N=f(N+1)(z)N!(xz)NB=f(N+1)(z)(N+1)!. Now we can write F(t)=Nn=0f(n)(t)n!(xt)n+f(N+1)(z)(N+1)!(xt)N+1. Recalling that F(a)=f(x) we get f(x)=Nn=0f(n)(a)n!(xa)n+f(N+1)(z)(N+1)!(xa)N+1, which is what we wanted to show.

It may not be immediately obvious that this is particularly useful; let's look at some examples.

Example 11.11.1

Find a polynomial approximation for sinx accurate to ±0.005.

Solution

From Taylor's theorem: sinx=Nn=0f(n)(a)n!(xa)n+f(N+1)(z)(N+1)!(xa)N+1. What can we say about the size of the term f(N+1)(z)(N+1)!(xa)N+1? Every derivative of sinx is ±sinx or ±cosx, so |f(N+1)(z)|1. The factor (xa)N+1 is a bit more difficult, since xa could be quite large. Let's pick a=0 and |x|π/2; if we can compute sinx for x[π/2,π/2], we can of course compute sinx for all x.

We need to pick N so that |xN+1(N+1)!|<0.005. Since we have limited x to [π/2,π/2], |xN+1(N+1)!|<2N+1(N+1)!. The quantity on the right decreases with increasing N, so all we need to do is find an N so that 2N+1(N+1)!<0.005. A little trial and error shows that N=8 works, and in fact 29/9!<0.0015, so

sinx=8n=0f(n)(0)n!xn±0.0015=xx36+x5120x75040±0.0015.

Figure 11.11.1 shows the graphs of sinx and and the approximation on [0,3π/2]. As x gets larger, the approximation heads to negative infinity very quickly, since it is essentially acting like x7.

Example 11.11.2

sin x and a polynomial approximation.

Figure 11.11.1. sinx and a polynomial approximation.

Solution

We can extract a bit more information from this example. If we do not limit the value of x, we still have |f(N+1)(z)(N+1)!xN+1||xN+1(N+1)!| so that sinx is represented by

Nn=0f(n)(0)n!xn±|xN+1(N+1)!|.

If we can show that limN|xN+1(N+1)!|=0 for each x then

sinx=n=0f(n)(0)n!xn=n=0(1)nx2n+1(2n+1)!,

that is, the sine function is actually equal to its Maclaurin series for all x. How can we prove that the limit is zero? Suppose that N is larger than |x|, and let M be the largest integer less than |x| (if M=0 the following is even easier). Then

|xN+1|(N+1)!=|x|N+1|x|N|x|N1|x|M+1|x|M|x|M1|x|2|x|1|x|N+1111|x|M|x|M1|x|2|x|1=|x|N+1|x|MM!.

The quantity |x|M/M! is a constant, so limN|x|N+1|x|MM!=0 and by the Squeeze Theorem (11.1.3)

limN|xN+1(N+1)!|=0 as desired. Essentially the same argument works for cosx and ex; unfortunately, it is more difficult to show that most functions are equal to their Maclaurin series.

Example 11.11.3

Find a polynomial approximation for ex near x=2 accurate to ±0.005.

Solution

From Taylor's theorem: ex=Nn=0e2n!(x2)n+ez(N+1)!(x2)N+1, since f(n)(x)=ex for all n. We are interested in x near 2, and we need to keep |(x2)N+1| in check, so we may as well specify that |x2|1, so x[1,3]. Also |ez(N+1)!|e3(N+1)!, so we need to find an N that makes e3/(N+1)!0.005. This time N=5 makes e3/(N+1)!<0.0015, so the approximating polynomial is ex=e2+e2(x2)+e22(x2)2+e26(x2)3+e224(x2)4+e2120(x2)5±0.0015. This presents an additional problem for approximation, since we also need to approximate e2, and any approximation we use will increase the error, but we will not pursue this complication.

Note well that in these examples we found polynomials of a certain accuracy only on a small interval, even though the series for sinx and ex converge for all x; this is typical. To get the same accuracy on a larger interval would require more terms.

Contributors


This page titled 11.12: Taylor's Theorem is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by David Guichard via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?