<<

Formulas for the Remainder Term in Taylor

In Section 8.7 we considered functions f with of all orders and their f na x an n0 n!

The n th partial sum of this Taylor series is the nth-degree Taylor of f at a: f a f a f na T x f a x a x a2 x an n 1! 2! n!

We can write

f x Tnx Rnx

where Rnx is the remainder of the Taylor series. We know that f is equal to the sum of its Taylor series on the x a R if we can show that lim n l Rnx 0 for x a R. Here we derive formulas for the remainder term Rnx . The first such formula involves an .

1 Theorem If f n 1 is continuous on an open interval I that contains a , and x is in I, then x 1 n n1 Rnx y x t f t dt n! a

Proof We use mathematical induction. For n 1 ,

R1x f x T1x f x f a f ax a

xx and the integral in the theorem is a x t f t dt . To evaluate this integral we integrate by parts with u x t and dv f t dt , so du dt and v f t . Thus

x tx x y x t f t dt x t f tta y f t dt a a

0 x a f a f x f a (by FTC 2)

f x f a f ax a R1x

The theorem is therefore proved for n 1 . Now we suppose that Theorem 1 is true for n k , that is,

x 1 k k1 Rkx y x t f t dt k! a

We want to show that it’s true for n k 1 , that is

x 1 k1 k2 Rk1x y x t f t dt k 1! a

1 2 ■ FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES

Again we use , this time with u x tk1 and dv f k2t . Then du k 1x tk dt and v f k1t, so

1 x y x tk1 f k2t dt k 1! a tx 1 k 1 x x tk1 f k1t y x tk f k1t dt a k 1 ! ta k 1 !

1 1 x 0 x ak1 f k1a y x tk f k1t dt k 1! k! a

f k1a x ak1 R x k 1! k

f k1a f x T x x ak1 k k 1!

f x Tk1x Rk1x

Therefore, (1) is true for n k 1 when it is true for n k . Thus, by mathematical induction, it is true for all n .

To illustrate Theorem 1 we use it to solve Example 4 in Section 8.7.

EXAMPLE 1 Find the Maclaurin series for sin x and prove that it represents sin x for all x .

SOLUTION We arrange our computation in two columns as follows: f x sin x f 0 0 f x cos x f 0 1 f x sin x f 0 0 f x cos x f 0 1

f 4x sin x f 40 0

Since the derivatives repeat in a cycle of four, we can write the Maclaurin series as follows:

f 0 f 0 f 0 f 0 x x 2 x 3 1! 2! 3! x 3 x 5 x 7 x 2n1 x 1n 3! 5! 7! n0 2n 1!

With a 0 in Theorem 1, we have

x 1 n n1 Rnx y x t f t dt n! 0 FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES ■ 3

Since f n1t is sin t or cos t , we know that f n1t 1 for all t . We use the fact that, for a b,

b b y f t dt y f t dt a a

Thus, for x 0,

1 x 1 x n n1 n n1 Rn x y x t f t dt y x t f t dt n! 0 n! 0

n1 n1 1 x 1 x x y x tn dt n! 0 n! n 1 n 1!

For x 0 we can write

1 0 n n1 Rnx y x t f t dt n! x so n1 1 0 1 0 x n n1 n Rn x y x t f t dt y t x dt n! x n! x n 1!

Thus, in any case, we have x n1 Rnx n 1!

The right side of this inequality approaches 0 as n l (see Equation 8.7.10), so Rnx l 0by the Squeeze Theorem. It follows that Rnx l 0 as n l , so sin x is equal to the sum of its Maclaurin series.

For some purposes the integral formula in Theorem 1 is awkward to work with, so we are going to establish another formula for the remainder term. To that end we need to prove the following generalization of the for (see Section 6.4).

2 Weighted Mean Value Theorem for Integrals If f and t are continuous on a, b and t does not change sign in a, b , then there exists a number c in a, b such that

b b y f xtx dx f c y tx dx a a

Proof Because t doesn’t change sign,either tx 0 or tx 0 for a x b . For the sake of definiteness, let’s assume that tx 0 . By the (4.2.3),f has an absolute minimum value m and an absolute maximum value M , so m f x M for a x b . Since tx 0 , we have

mtx f xtx Mtx a x b 4 ■ FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES

and so

b b b 3 m y tx dx y f xtx dx M y tx dx a a a

xb t xb t If a x dx 0 , these inequalities show that a f x x dx 0 and so Theorem 2 is xb t true because both sides of the equation are 0. If a x dx 0 , it must be positive and xb t we can divide by a x dx in (3): xb f xtx dx m a M xb t a x dx Then, by the Intermediate Value Theorem (2.4.10), there exists a number c in a, b such that xb f xtx dx a b t b t f c b and so y f x x dx f c y x dx x t a a a x dx

4 Theorem If f n 1 is continuous on an open interval I that contains a , and x is in I , then there exists a number c between a and x such that f n1c R x x an1 n n 1!

Proof The tt x tn doesn’t change sign in the interval from a to x , so the Weighted Mean Value Theorem for Integrals gives a number c between a and x such that

x x y x tn f n1t dt f n1c y x tn dt a a

tx x tn1 x an1 n1 n1 f c f c n 1 ta n 1

Then, by Theorem 1,

x 1 n n1 Rnx y x t f t dt n! a

1 x an1 f n1c f n1c x an1 n! n 1 n 1!

The formula for the remainder term in Theorem 4 is called Lagrange’s form of the remainder term. Notice that this expression f n1c R x x an1 n n 1!

is very similar to the terms in the Taylor series except that f n1 is evaluated at c instead of at a . All we can say about the number c is that it lies somewhere between x and a . In the following example we show how to use Lagrange’s form of the remainder term as an alternative to the integral form in Example 1. FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES ■ 5

EXAMPLE 2 Prove that Maclaurin series for sin x represents sin x for all x .

SOLUTION Using the Lagrange form of the remainder term with a 0 , we have f n1c R x x n1 n n 1! where f x sin x and c lies between 0 and x . But f n1c is sin c or cos c . In any case, f n1c 1 and so

n1 n1 f c n1 x Rnx x n 1! n 1!

By Equation 8.7.10 the right side of this inequality approaches 0 as n l , so Rnx l 0 by the Squeeze Theorem. It follows that Rnx l 0 as n l , so sin x is equal to the sum of its Maclaurin series.

EXAMPLE 3 (a) Approximate the function f x s3 x by a Taylor polynomial of degree 2 at a 8 . (b) How accurate is this when 7 x 9 ?

SOLUTION (a) f x s3 x x13 f 8 2

1 23 1 f x 3 x f 8 12

2 53 1 f x 9 x f 8 144

10 83 f x 27 x Thus the second-degree Taylor polynomial is

f 8 f 8 T x f 8 x 8 x 82 2 1! 2!

1 1 2 2 12 x 8 288 x 8 The desired approximation is

s3 1 1 2 x T2 x 2 12 x 8 288 x 8

(b) Using the Lagrange form of the remainder term we can write f c x 83 5x 83 R x x 83 10 c83 2 3! 27 3! 81c83 where c lies between 8 and x . In order to estimate the error we note that if 7 x 9 , then 1 x 8 1, so x 8 1 and therefore x 8 3 1. Also,since x 7, we have c83 7 83 179 and so 5 x 8 3 5 1 R2x 0.0004 81c83 81 179

Thus if 7 x 9 , the approximation in part (a) is accurate to within 0.0004.