<<

LECTURE 1

Variations on Taylor's Formula

Numerical metho ds are ipso facto approximate metho ds. This b eing the case, it will b e imp ortant through-

out this course to determine the accuracy of numerical results. We shall b egin by reviewing the analytic

metho ds by whichwe approximate functions and howwe b ound the errors that arise from such approxima-

tions.

n

Definition 1.1. We denote by C [a; b] the set of functions on the [a; b]  R that have continuous

n

up to order n. We denote by C R the set of functions on the that have continuous

1 1

derivatives up to order n. We denote by C [a; b] and C R the sets of functions for which derivatives of

al l orders exist on, respectively, [a; b] and R.

2 1 2

Example 1.2. If f x x sin1=x then f is in C R but not in C R. To see this, note

1

2

=0 lim f x = lim x sin

x!0 x!0

x



1

2 0

since x ! 0 and sin is b ounded b etween 1 and 1. Thus f 2 C R.

x

df f x f 0

lim

x!0

dx x

x=0

1

x sin = lim

x!0

x

= 0

again b ecause it the of a that is the pro duct of a function that vanishes at the limit p oint

1

and a function that remains b ounded. So f is also in C R. However,

2 0 0

d f f x f 0

lim

2

x!0

dx x

x=0

1

2x sin1=x cos   0

x

= lim

x!0

x

1

cos  

x

= lim

x!0

x

2

do es not exist. Thus, f=2 C R.

Remark 1.3. In general, wehave

1 3 2 1 0

C [a; b]    C [a; b]  C [a; b]  C [a; b]  C [a; b]

n+1

Theorem 1.4. Taylor's Theorem with Remainder. If f 2 C [a; b], then for any points

x; x 2 [a; b],

o

n

X

1

k  k

f x x x  + R x f x=

o o n

k !

k =0

where

Z

x

1

n+1 n

R x f tx t dt

n

n!

x

o 1

1. VARIATIONS ON TAYLOR'S FORMULA 2

Proof. This theorem is surprisingly easy to prove. We start by using to evaluate the

right hand side of the de nition of the error term R x: Setting

n

1

n n+1

u = x t dv = f tdt

n!

1

n1 n

x t v = f t du =

n1!

and using the integration by parts formula

Z Z

x x

x

udv = uv j vdu

x

o

x x

o o

we nd

Z

x

x

1 1

n n n n1

x t f t f tx t dt + R x

n

n! n 1!

x

o x

o

1

n n

f x x x  + R x =

o o n1

n!

Wethus have a recursive formula for R x. Using this recursive formula over and over again we can reduce

n

the right hand side to

1 1

n n n1 n1

R x = f x x x  f x x x  + 

n o o o o

n! n 1!

1 1

0 n

f x x x  + R x 

o o 0

1! 0!

Z

n

x

X

1

n

0 0 n

f tx t dt = f x x x  +

o o

0!

x

o

n=1

Z

n

x

X

n

0 n

= f tdt f x x x  +

o o

x

o

n=1

n

X

n

n

= f x x x  + f x f  x 

o o o

n=1

n

X

n

n

= f x x x  + f x

o o

n=0

Solving the extreme sides for f x yields

n

X

1

k  k

f x= f x x x  + R x

o o n

k !

k =0

Remark 1.5. Note that in this formulation of Taylor's Theorem, wehave an explicit formula for computing

the error term R x. However, since the error term dep ends on the choice of x and x in a non-trivial way,

n o

we do not have at least at face value an understanding of how the error term changes as wevary x. Such

an understanding would b e critical if we are to regard

n

X

1

k  k

f x f x x x 

n o o

k !

k =0

as a p olynomial function approximate to the original function f x. Belowwe'll deduce b ounds on the

error term R xasx ranges throughout the interval [a; b].

n

Theorem 1.6.  for . Let u and v becontinuous real-valued functions

on an interval [a; b], and suppose that v x  0 for al l x 2 [a; b]. Then there exists a point  2 [a; b] such

that

Z Z

b b

uxv xdx = u  v xdx .

a a

1. VARIATIONS ON TAYLOR'S FORMULA 3

Proof. Let and denote, resp ectively, the minimal and maximal values of uxon[a; b]. Then

v x  uxv x  vx ; 8 x 2 [a; b]

Integrating this relationship b etween a and b yields

Z Z Z

b b b

v xdx uxv xdx  v xdx 

a a a

or

R

b

uxv xdx

a

 

R

b

v xdx

a

Nowbyhyp othesis, = u x  and = u x  for some x ;x 2 [a; b] . By the Intermediate Value Theorem

1 2 1 2

for Continuous Functions, for anynumber between and there must exist a p oint  2 [a; b] such that

u = . In particular, there must exist a p oint  2 [a; b] such that

R

b

uxv xdx

a

u =

R

b

v xdx

a

Hence there exists a p oint  2 [a; b] such that

Z Z

b b

v xdx uxv xdx = u 

a a

Remark 1.7. The usual Mean Value Theorem; i.e., the statement that if f xiscontinuous and di eren-

tiable on [a; b] then there is a p oint  2 [a; b] such that

f b f a

0

f  =

b a

0

is a sp ecial case of the formulation ab ove. To see this, note that if we take ux=f x and v x = 1, then

the ab ove theorem implies

Z Z

b b

0 0

f xdx = f   dx

a a

Carrying out the integrations on b oth sides yields

f b f a

0 0

f b f a=f  b a  f  =

b a

n n+1

Theorem 1.8. Taylor's Theorem with Lagrange Remainder. If f 2 C [a; b] and f x exists on

a; b then for any point x and x in [a; b]

o

n

X

1

k  k

f x= f x x x  + E x

o o n

k !

k =0

where

1

n+1

n+1

E x= f  x x 

n o

n + 1!

for some point  between x and x :

o

Proof. According to Taylor's Theorem with Integral Remainder is

Z

n

x

X

1 1

k  k n+1 n

f x= f x x x  + f tx t dt

o o

k ! n!

x

o

k =0

By the Mean Value Theorem for Integrals

Z Z

x x

1 1 1

n+1

n+1 n+1 n+1 n n

f   f  x x  f tx t dt = x t dt =

o

n! n! n + 1!

x x

o o

1. PROBLEMS 4

for some  between x and x . Hence,

o

n

X

1 1

n+1

k  k n+1

f x= f x x x  + f  x x 

o o o

k ! n + 1!

k =0

for some  between x and x .

o

Remark 1.9. Note that in this formulation of Taylor's theorem the error term is still not precisely deter-

mined; b ecause the p oint  in the theorem statement is left undetermined. We know only that there is some

p oint  2 [a; b] such that

n

X

1 1

n+1

k  k n+1

f x x x  = f  x x  f x

o o o

k ! n + 1!

k =0

However, what we gain in this formulation are solid b ounds on the size of the error term over a range of x.

n+1

To see this let M b e the maximum value of f x on the interval [a; b], then

n

X

M 1

n+1

k  k

f x x x   jx x j f x

o o o

k ! n + 1!

k =0

Note that this b ound is indep endent of the choice of x and x in [a; b].

o

n+1

Corollary 1.10. Alternative Form of Taylor's Theorem.Iff 2 C [a; b], then for any points x

and x + h 2 [a; b],

n

X

1

k  k

f x + h= f xh + E h

n

k !

k =0

where

1

n+1 n+1

E h= f  h

n

n + 1!

in which the point  lies between x and x + h.

1. Problems

1.1. Given that

n

d

n1

ln jxj =1 n 1!

n

dx

x=1

a Use the Taylor Theorem with Integral Remainder to nd the magnitude of the error term R 1:99

100

when one approximates ln[1:99] using the rst 101 terms of the Taylor expansion ab out 1 of ln jxj.

b Use the Taylor Theorem with Lagrange Remainder to obtain an upp er b ound on the error term E x

100

when x ranges from 1.985 to 1.995 for the Taylor expansion of ln jxj ab out 1.