• 沒有找到結果。

TAYLOR SERIES

在文檔中 INFINITE SERIES (頁 57-68)

NOTES

THEOREM 4.2 Suppose that lim

2. For each series f (x), compare the intervals of convergence of f (x) and

7.7 TAYLOR SERIES

You may still be wondering about the reason why we have developed series. Each time we have developed a new concept, we have worked hard to build a case for why we want to do what we’re doing. For example, in developing the derivative, we set out to find the slope of a tangent line and to find instantaneous velocity, only to find that they were essentially the same thing. When we developed the definite integral, we did so in the course of trying to find area under the curve. But, we have not yet completely revealed why we’re pursuing series, even though we’ve been developing them for more than five sections now. Well, the punchline is close at hand. In this section, we develop a compelling reason for considering series. They are not merely another mathematical curiosity, but rather, are an essential means for exploring and computing with transcendental functions (e.g., sin x, cos x, ln x, ex, etc.).

Suppose that the power series

k=0bk(x− c)khas radius of convergence r > 0. As we’ve observed, this means that the series converges absolutely to some function f on the interval (c− r, c + r). We have

f (x)=

k=0

bk(x− c)k = b0+ b1(x− c) + b2(x− c)2+ b3(x− c)3+ b4(x− c)4+ · · · , for each x∈ (c − r, c + r). Differentiating term by term, we get that

f(x)=

k=0

bkk(x− c)k−1= b1+ 2b2(x− c) + 3b3(x− c)2+ 4b4(x− c)3+ · · · ,

again, for each x∈ (c − r, c + r). Likewise, we get

f(x)=

k=0

bkk(k− 1)(x − c)k−2= 2b2+ 3 · 2b3(x− c) + 4 · 3b4(x− c)2+ · · ·

and

f(x)=

k=0

bkk(k− 1)(k − 2)(x − c)k−3= 3 · 2b3+ 4 · 3 · 2b4(x− c) + · · ·

and so on (all valid for c− r < x < c + r ). Notice that if we substitute x = c in each of the above derivatives, all the terms of the series drop out, except one. We get

f (c)= b0, f(c)= b1, f(c)= 2b2, f(c)= 3! b3

and so on. Observe, that in general, we have

f(k)(c)= k! bk. (7.1)

Solving (7.1) for bk, we have

bk= f(k)(c)

k! , for k = 0, 1, 2,. . . .

To summarize, we found that if

k=0bk(x− c)kis a convergent power series with radius of convergence r> 0, then the series converges to some function f that we can write as

f (x)=

k=0

bk(x− c)k=

k=0

f(k)(c)

k! (x− c)k, for x ∈ (c − r, c + r).

Now, think about this problem from another angle. Instead of starting with a series, sup-pose that you start with an infinitely differentiable function, f (i.e., f can be differentiated infinitely often). Then, we can construct the series

Taylor series expansion of f (x) about x= c

 k=0

f(k)(c)

k! (x− c)k,

called a Taylor series expansion for f . (See the historical note on Brook Taylor in sec-tion 4.6.) There are two important quessec-tions we need to answer.

r Does a series constructed in this way converge? If so, what is its radius of convergence?

r If the series converges, it converges to a function. What is that function? (For instance, is it f ?)

We can answer the first of these questions on a case-by-case basis, usually by applying the Ratio Test. The second question will require further insight.

EXAMPLE 7.1 Constructing a Taylor Series Expansion

Construct the Taylor series expansion for f (x)= ex, about x = 0 (i.e., take c = 0).

Solution Here, we have the extremely simple case where

f(x)= ex, f(x)= exand so on, f(k)(x)= ex, for k = 0, 1, 2,. . . . This gives us the Taylor series

 k=0

f(k)(0)

k! (x− 0)k=

k=0

e0

k!xk=

k=0

1 k!xk. From the Ratio Test, we have

klim→∞

ak+1

ak

 = limk→∞ |x|k+1 (k+ 1)!

k!

|x|k = |x| lim

k→∞

k!

(k+ 1) k!

= |x| lim

k→∞

1

k+ 1 = |x| (0) = 0 < 1, for all x.

So, the Taylor series 

k=0

1

k!xkconverges for all real numbers x. At this point, though, we do not know the function to which the series converges. (Could it be ex?) 

REMARK 7.1

The special case of a Taylor series expansion about x= 0 is often called a Maclaurin series. (See the historical note about Colin Maclaurin in section 7.3.) That is, the series

k=0

f(k)(0) k! xkis the Maclaurin series expansion for f .

Before we present any further examples of Taylor series, let’s see if we can determine the function to which a given Taylor series converges. First, notice that the partial sums of a Taylor series (like any power series) are simply polynomials. We define

Pn(x)=

n k=0

f(k)(c) k! (x− c)k

= f (c) + f(c) (x− c) + f(c)

2! (x− c)2+ · · · + f(n)(c)

n! (x− c)n. Observe that Pn(x) is a polynomial of degree n, as f(k)(c)

k! is a constant for each k. We refer to Pnas the Taylor polynomial of degree n for f expanded about x = c.

EXAMPLE 7.2 Constructing and Graphing Taylor Polynomials For f (x)= ex, find the Taylor polynomial of degree n expanded about x= 0.

x

2 4

2

2 2 4 6

8 y  ex

y  P1(x) y

FIGURE 7.39a y= exand y= P1(x).

Solution As in example 7.1, we have that f(k)(x)= ex, for all k. So, we have the nth degree Taylor polynomial is

Pn(x)=

n k=0

f(k)(0)

k! (x− 0)k=

n k=0

e0 k!xk

=

n k=0

1

k!xk = 1 + x +x2 2! +x3

3! + · · · + xn n!.

Since we established in example 7.1 that the Taylor series for f (x)= ex about x= 0 converges for all x, this says that the sequence of partial sums (i.e., the sequence of Taylor polynomials) converges for all x. In an effort to determine the function to which the Taylor polynomials are converging, we have plotted P1(x), P2(x), P3(x) and P4(x), together with the graph of f (x)= exin Figures 7.39a–d, respectively.

x

2 4

2

2 2 4 6

8 y  ex

y  P2(x) y

x

2 4

2

2 2 4 6

8 y  ex

y  P3(x) y

x

2 4

2

2 2 4 6

8 y  ex

y  P4(x) y

FIGURE 7.39b y= exand y= P2(x).

FIGURE 7.39c y= exand y= P3(x).

FIGURE 7.39d y= exand y= P4(x).

Notice that as n gets larger, the graphs of Pn(x) appear (at least on the inter-val displayed) to be approaching the graph of f (x)= ex. Since we know that the Taylor series converges and the graphical evidence suggests that the partial sums of the series are approaching f (x)= ex, it is reasonable to conjecture that the series con-verges to ex. This is, in fact, exactly what is happening, as we can prove using Theo-rems 7.1 and 7.2. 

THEOREM 7.1 (Taylor’s Theorem)

Suppose that f has (n+ 1) derivatives on the interval (c − r, c + r), for some r > 0.

Then, for x ∈ (c − r, c + r), f (x) ≈ Pn(x) and the error in using Pn(x) to approximate f (x) is

Rn(x)= f (x) − Pn(x)= f(n+1)(z)

(n+ 1)!(x− c)n+1, (7.2) for some number z between x and c.

The error term Rn(x) in (7.2) is often called the remainder term. Note that this term looks very much like the first neglected term of the Taylor series, except that f(n+1) is evaluated at some (unknown) number z between x and c, instead of at c. This remainder term serves two purposes: it enables us to obtain an estimate of the error in using a Taylor polynomial to approximate a given function and as we’ll see in the next theorem, it gives us the means to prove that a Taylor series for a given function f converges to f .

The proof of Taylor’s Theorem is somewhat technical and so we leave it for a more advanced text.

Note: If we could show that

nlim→∞Rn(x)= 0, for all x in (c − r, c + r),

then we would have that 0= lim

n→∞Rn(x)= lim

n→∞[ f (x)− Pn(x)]= f (x) − lim

n→∞Pn(x) or

nlim→∞Pn(x)= f (x), for all x ∈ (c − r, c + r).

That is, the sequence of partial sums of the Taylor series (i.e., the sequence of Taylor polynomials) converges to f (x) for each x ∈ (c − r, c + r). We summarize this in Theorem 7.2.

THEOREM 7.2

Suppose that f has derivatives of all orders in the interval (c− r, c + r), for some r> 0 and that lim

n→∞Rn(x)= 0, for all x in (c − r, c + r). Then, the Taylor series for f expanded about x= c converges to f (x), that is,

f (x)=

k=0

f(k)(c)

k! (x− c)k, for all x in (c− r, c + r).

REMARK 7.2

Observe that for n= 0, Taylor’s Theorem simplifies to a very familiar result. We have

R0(x)= f (x) − P0(x)

= f(z)

(0+ 1)!(x− c)0+1. Since P0(x)= f (c), we have simply

f (x)− f (c) = f(z)(x− c).

Dividing by (x− c), gives us f (x)− f (c)

x− c = f(z), which is the conclusion of the Mean Value Theorem. In this way, observe that Taylor’s Theorem is a generalization of the Mean Value Theorem.

We now return to the Taylor series expansion of f (x)= exabout x= 0, constructed in example 7.1 and investigated further in example 7.2 and prove that it converges to ex, as we had suspected.

EXAMPLE 7.3 Proving That a Taylor Series Converges to the Desired Function

Show that the Taylor series for f (x)= exexpanded about x = 0 converges to ex. Solution We already found the indicated Taylor series,

k=0

1

k!xkin example 7.1. Here, we have f(k)(x)= ex, for all k= 0, 1, 2,. . . . This gives us the remainder term

Rn(x)= f(n+1)(z)

(n+ 1)!(x− 0)n+1= ez

(n+ 1)!xn+1, (7.3) where z is somewhere between x and 0 (and depends also on the value of n). We first find a bound on the size of ez. Notice that if x > 0, then 0 < z < x and so,

ez< ex. If x ≤ 0, then x ≤ z ≤ 0, so that

ez ≤ e0= 1.

We define M to be the larger of these two bounds on ez. That is, we let M = max{ex, 1}.

Then, for any x and any n, we have

ez ≤ M.

Together with (7.3), this gives us the error estimate

|Rn(x)| = ez

(n+ 1)!xn+1 ≤ M |x|n+1

(n+ 1)!. (7.4)

To prove that the Taylor series converges to ex, we want to use (7.4) to show that limn→∞Rn(x)= 0, for all x. However, for any given x, how can we compute lim

n→∞

|x|n+1 (n+ 1)!? While we cannot do so directly, we can use the following indirect approach. We consider the series

n=0

|x|n+1

(n+ 1)!, as follows. Applying the Ratio Test, we have

nlim→∞

an+1

an

 = limn→∞

|x|n+2 (n+ 2)!

(n+ 1)!

|x|n+1 = |x| lim

k→∞

1 n+ 2 = 0, for all x. This then says that the series

n=0

|x|n+1

(n+ 1)! converges absolutely for all x. By the kth-term test for divergence, since this last series converges, its general term must tend to 0 as n→ ∞. That is,

nlim→∞

|x|n+1 (n+ 1)! = 0 and so, from (7.4), lim

n→∞Rn(x)= 0, for all x. From Theorem 7.2, we now have that the Taylor series converges to exfor all x. That is,

ex=

k=0

1

k!xk= 1 + x +x2 2! +x3

3! + x4

4! + · · · . (7.5)



The trick, if there is one, in finding a Taylor series expansion is in accurately calculating enough derivatives for you to recognize the general form of the nth derivative. So, take your time and BE CAREFUL! Once this is done, you need to show that Rn(x)→ 0, as n → ∞, for all x, to ensure that the series converges to the function you are expanding.

One of the reasons for calculating Taylor series is that we can use their partial sums to compute approximate values of a function.

EXAMPLE 7.4 Using a Taylor Series to Obtain an Approximation ofe Use the Taylor series for exin (7.5) to obtain an approximation to the number e.

Solution We have

e= e1=

k=0

1

k!1k=

k=0

1 k!.

We list some partial sums of this series in the accompanying table. From this we get the very accurate approximation

e≈ 2.718281828.  M

M k0

1 k!

5 2.716666667 10 2.718281801 15 2.718281828 20 2.718281828

EXAMPLE 7.5 A Taylor Series Expansion of sinx

Find the Taylor series for f (x)= sin x, expanded about x = π2 and prove that the series converges to sin x for all x.

Solution In this case, the Taylor series is

 k=0

f(k)π

2

 k!

xπ

2

k

.

First, we compute some derivatives and their value at x = π2. We have

f (x)= sin x fπ

2

= 1,

f(x)= cos x fπ

2

= 0,

f(x)= −sin x fπ

2

= −1,

f(x)= −cos x fπ

2

= 0,

f(4)(x)= sin x f(4)π

2

= 1

and so on. Recognizing that every other term is zero and every other term is±1, we see that the Taylor series is

 k=0

f(k)π

2

 k!

xπ

2

k

= 1 −1 2

xπ

2

2

+ 1 4!

xπ

2

4

− 1 6!

xπ

2

6

+ · · ·

=

k=0

(−1)k (2k)!

xπ

2

2k

.

In order to test the series for convergence, we consider the remainder term

|Rn(x)| =



f(n+1)(z) (n+ 1)!

xπ

2

n+1

 , (7.6)

for some z between x and π2. From our derivative calculations, note that f(n+1)(z)=

± cos z, if n is even

± sin z, if n is odd . From this, observe that

f(n+1)(z) ≤1,

for every n. (Notice that this is true whether n is even or odd.) From (7.6), we now have

|Rn(x)| =



f(n+1)(z) (n+ 1)!







xπ 2





n+1

≤ 1

(n+ 1)!



xπ 2





n+1

→ 0,

as n→ ∞, for every x, as in example 7.3. This says that

sin x =

k=0

(−1)k (2k)!

xπ

2

2k

= 1 −1 2

xπ

2

2

+ 1 4!

xπ

2

4

− · · · ,

for all x. In Figures 7.40a–d, we show graphs of f (x)= sin x together with the Taylor polynomials P2(x), P4(x), P6(x) and P8(x) (the first few partial sums of the series). Notice that the higher the degree of the Taylor polynomial is, the larger the interval is over which the polynomial provides a close approximation to f (x)= sin x.

y

x

2 4 6

2

1 1

y  sin x y  P2(x)

y

x

2 4 6

2

1 1

y  sin x y  P4(x)

FIGURE 7.40a

y= sin x and y = P2(x).

FIGURE 7.40b

y= sin x and y = P4(x).

y

x

2 4 6

2

1 1

y  sin x

y  P6(x)

y

x

2 4 6

2

1 1

y  sin x y  P8(x)

FIGURE 7.40c

y= sin x and y = P6(x).

FIGURE 7.40d

y= sin x and y = P8(x).



In example 7.6, we illustrate how to use Taylor’s Theorem to estimate the error in using a Taylor polynomial to approximate the value of a function.

EXAMPLE 7.6 Estimating the Error in a Taylor Polynomial Approximation

Use a Taylor polynomial to approximate the value of ln (1.1) and estimate the error in this approximation.

Solution First, note that since ln 1 is known exactly and 1 is close to 1.1 (Why would this matter?), we expand f (x)= ln x in a Taylor series about x = 1. We compute an adequate number of derivatives so that the pattern becomes clear. We have

f (x)= ln x f (1)= 0

f(x)= x−1 f(1)= 1

f(x)= −x−2 f(1)= −1

f(x)= 2x−3 f(1)= 2

f(4)(x)= −3 · 2x−4 f(4)(1)= −3!

f(5)(x)= 4! x−5 f(5)(1)= 4!

... ...

f(k)(x)= (−1)k+1(k− 1)! x−k f(k)(1)= (−1)k+1(k− 1)! (k ≥ 1).

We get the Taylor series

 k=0

f(k)(1)

k! (x− 1)k

= (x − 1) −1

2(x− 1)2+ 2

3!(x− 1)3+ · · · + (−1)k+1 (k− 1)!

k! (x− 1)k+ · · ·

=

k=1

(−1)k+1

k (x− 1)k.

We could use the remainder term to show that the series converges to f (x)= ln x, for 0< x < 2, but this is not the original question here. (This is left as an exercise.) As an illustration, we construct the Taylor polynomial, P4(x),

P4(x)=

4 k=1

(−1)k+1

k (x− 1)k from the preceding

= (x − 1) − 1

2(x− 1)2+1

3(x− 1)3−1

4(x− 1)4.

We show a graph of y= ln x and y = P4(x) in Figure 7.41. Taking x = 1.1 gives us the approximation

ln (1.1) ≈ P4(1.1) = 0.1 −1

2(0.1)2+1

3(0.1)3−1

4(0.1)4≈ 0.095308333.

2 3

1 2

2

4

y  ln x

y  P4(x) y

x

FIGURE 7.41

y= ln x and y = P4(x).

We can use the remainder term to estimate the error in this approximation. We have

|Error| = | ln (1.1) − P4(1.1)| = |R4(1.1)|

=

f(4+1)(z)

(4+ 1)! (1.1 − 1)4+1

 =4!|z|−5 5! (0.1)5, where z is between 1 and 1.1. This gives us the following bound on the error:

|Error| = (0.1)5

5z5 < (0.1)5

5(15) = 0.000002,

since 1< z < 1.1 implies that 1 z <1

1 = 1. Another way to think of this is that our approximation of ln (1.1) ≈ 0.095308333 is off by no more than ±0.000002. 

A more significant question related to example 7.6 is to determine how many terms of the Taylor series are needed in order to guarantee a given accuracy. We use the remainder term to accomplish this in example 7.7.

EXAMPLE 7.7 Finding the Number of Terms Needed for a Given Accuracy

Find the number of terms in the Taylor series for f (x)= ln x expanded about x = 1 that will guarantee an accuracy of at least 1× 10−10in the approximation of ln (1.1) and ln (1.5).

Solution From our calculations in example 7.6 and (7.2), we have that for some number z between 1 and 1.1,

|Rn(1.1)| =

f(n+1)(z)

(n+ 1)! (1.1 − 1)n+1



= n!|z|−n−1

(n+ 1)! (0.1)n+1= (0.1)n+1

(n+ 1) zn+1 <(0.1)n+1 n+ 1 ,

since 1< z < 1.1 implies that 1 z < 1

1 = 1. Further, since we want the error to be less than 1× 10−10, we require that

|Rn(1.1)| < (0.1)n+1

n+ 1 < 1 × 10−10.

You can solve this inequality for n by trial and error to find that n= 9 will guarantee the required accuracy. Notice that larger values of n will also guarantee this accuracy, since (0.1)n+1

n+ 1 is a decreasing function of n. We then have the approximation

ln (1.1) ≈ P9(1.1) =

9 k=0

(−1)k+1

k (1.1 − 1)k

= (0.1) − 1

2(0.1)2+1

3(0.1)3−1

4(0.1)4+1 5(0.1)5

−1

6(0.1)6+1

7(0.1)7−1

8(0.1)8+1 9(0.1)9

≈ 0.095310179813,

which from our error estimate we know is correct to within 1× 10−10. We show a graph of y= ln x and y = P9(x) in Figure 7.42. In comparing Figure 7.42 with Figure 7.41, observe that while P9(x) provides an improved approximation to P4(x) over the interval of convergence (0, 2), it does not provide a better approximation outside of this interval.

y

x

1 2 3

2

4 2

y  ln x

y  P9(x)

FIGURE 7.42

y= ln x and y = P9(x).

Similarly, notice that for some number z between 1 and 1.5,

|Rn(1.5)| =

f(n+1)(z)

(n+ 1)! (1.5 − 1)n+1

 =n!|z|−n−1

(n+ 1)! (0.5)n+1

= (0.5)n+1

(n+ 1) zn+1 < (0.5)n+1 n+ 1 ,

since 1< z < 1.5 implies that1 z < 1

1 = 1. So, here we require that

|Rn(1.5)| < (0.5)n+1

n+ 1 < 1 × 10−10.

Solving this by trial and error shows that n= 28 will guarantee the required accuracy.

Observe that this says that many more terms are needed to approximate f (1.5) than for f (1.1), to obtain the same accuracy. This further illustrates the general principle that the

farther away x is from the point about which we expand, the slower the convergence of the Taylor series will be. 

For your convenience, we have compiled a list of common Taylor series in the following table.

Interval of

Taylor Series Convergence Where to find

ex=

k=0

1

k!xk = 1 + x +1

2x2+ 1 3!x3+ 1

4!x4+ · · · (−∞, ∞) examples 7.1 and 7.3 sin x=

k=0

(−1)k

(2k+ 1)!x2k+1 = x − 1 3!x3+ 1

5!x5− 1

7!x7+ · · · (−∞, ∞) exercise 2 cos x=

k=0

(−1)k

(2k)!x2k = 1 −1 2x2+ 1

4!x4− 1

6!x6+ · · · (−∞, ∞) exercise 1 sin x=

k=0

(−1)k (2k)!

xπ

2

2k

= 1 −1 2

xπ 2

2

+ 1 4!

xπ

2

4

− · · · (−∞, ∞) example 7.5

ln x=

k=1

(−1)k+1

k (x− 1)k = (x − 1) −1

2(x− 1)2+1

3(x− 1)3− · · · (0, 2] examples 7.6, 7.7 tan−1x=

k=0

(−1)k

2k+ 1x2k+1 = x −1 3x3+1

5x5−1

7x7+ · · · (−1, 1) example 6.6

Notice that once you have found a Taylor series expansion for a given function, you can find any number of other Taylor series simply by making a substitution.

EXAMPLE 7.8 Finding New Taylor Series from Old Ones Find Taylor series in powers of x for e2x, ex2and e−2x.

Solution Rather than compute the Taylor series for these functions from scratch, recall that we had established in example 7.3 that

et=

k=0

1

k!tk = 1 + t + 1 2!t2+ 1

3!t3+ 1

4!t4+ · · · , (7.7) for all t (−∞, ∞). We use the variable t here instead of x, so that we can more easily make substitutions. Taking t= 2x in (7.7), we get the new Taylor series

e2x =

k=0

1

k!(2x)k=

k=0

2k

k!xk= 1 + 2x + 22 2!x2+23

3!x3+ · · · . Similarly, letting t= x2in (7.7), we get the Taylor series

ex2 =

k=0

1

k!(x2)k =

k=0

1

k!x2k= 1 + x2+ 1 2!x4+ 1

3!x6+ · · · .

Finally, taking t= −2x in (7.7), we get

e−2x =

k=0

1

k!(−2x)k =

k=0

(−1)k

k! 2kxk= 1 − 2x +22 2!x2−23

3!x3+ · · · . Notice that all of these last three series converge for all x (−∞, ∞). (Why is that?) 

EXERCISES 7.7

WRITING EXERCISES

1. Describe how the Taylor polynomial with n= 1 compares to the linear approximation (see section 3.1). Give an analo-gous interpretation of the Taylor polynomial with n= 2. That is, how do various graphical properties (position, slope, con-cavity) of the Taylor polynomial compare with those of the function f (x) at x= c?

2. Briefly discuss how a computer might use Taylor polynomials to compute sin (1.2). In particular, how would the computer know how many terms to compute? How would the number of terms necessary to compute sin (1.2) compare to the num-ber needed to compute sin (100)? Describe a trick that would make it much easier for the computer to compute sin (100).

(Hint: The sine function is periodic.)

3. Taylor polynomials are built up from a knowledge of f (c), f(c), f(c) and so on. Explain in graphical terms why information at one point (e.g., position, slope, concavity, etc.) can be used to construct the graph of the function on the entire interval of convergence.

4. If f (c) is the position of an object at time t= c, then f(c) is the object’s velocity and f(c) is the object’s acceleration at time c. Explain in physical terms how knowledge of these values at one time (plus f(c), etc.) can be used to predict the position of the object on the interval of convergence.

5. Our table of common Taylor series lists two different series for

在文檔中 INFINITE SERIES (頁 57-68)