example of use of Taylor’s theorem

example of use of Taylor’s theorem

In this entry we use Taylor’s

Theorem

in the following form:

Theorem 1

(Taylor’s Theorem: Bounding the Error).

Suppose

f

and all its

derivatives

are

continuous

. If

T

n

⁢

(

x

)

is the

n

-th

Taylor polynomial

of

f

⁢

(

x

)

around

x

=

a

, then the error, or the

difference

between the real value of

f

and the values of

T

n

⁢

(

x

)

is given by:

|

E

n

⁢

(

x

)

|

=

|

f

⁢

(

x

)

-

T

n

⁢

(

x

)

|

≤

M

(

n

+

1

)

!

⁢

|

x

-

a

|

n

+

1

where

M

is the

maximum

value of

f

(

n

+

1

)

(the

n

+

1

-th derivative of

f

) in the

interval

between

a

and

x

.

Example 2

.

Suppose we want to approximate

e

using the Taylor polynomial of degree 4,

T

4

⁢

(

x

)

, around

x

=

0

for the

function

e

x

. We know that

T

4

⁢

(

x

)

=

1

+

x

+

x

2

/

2

+

x

3

/

3

!

+

x

4

/

4

!

so we are asking how close are

e

and

T

4

⁢

(

1

)

=

1

+

1

+

1

/

2

+

1

/

6

+

1

/

24

. In order to use the formula in the theorem, we just need to find

M

, the maximum value of the

4

th derivative of

e

x

between

a

=

0

and

x

=

1

. Since

f

(

4

)

=

e

x

and

e

x

is

strictly increasing

, the maximum in

(

0

,

1

)

happens at

x

=

1

. Thus

M

=

e

which is a number, say, less than

3

. Therefore:

|

E

4

⁢

(

1

)

|

=

|

f

⁢

(

1

)

-

T

4

⁢

(

1

)

|

=

|

e

-

(

1

+

1

+

1

/

2

+

1

/

6

+

1

/

24

)

|

≤

M

5

!

⁢

|

1

-

0

|

5

=

M

5

!

<

3

5

!

=

0.025

Thus the

approximation

has an error of less than

0.025

. Actually, if we use a

calculator

we obtain that the error is

exactly

0.0099

. But, of course,

the whole point of the theorem is not to use a calculator

.

Example 3

.

What Taylor polynomial

T

n

⁢

(

x

)

(what

n

) should we use to approximate

e

within

0.0001

? As above, we will be using the Taylor polynomial

T

n

⁢

(

x

)

for

e

x

, evaluated at

x

=

1

. Thus, we want the error

|

E

n

⁢

(

1

)

|

<

0.0001

. Notice all derivatives are

e

x

and the maximum happens at

x

=

1

, where

e

1

=

e

, so for all derivatives

M

<

3

. Hence by the theorem:

|

E

n

⁢

(

1

)

|

=

|

f

⁢

(

1

)

-

T

n

⁢

(

1

)

|

=

|

e

-

(

1

+

1

+

1

/

2

+

…

+

1

/

n

!

)

|

≤

M

(

n

+

1

)

!

⁢

|

1

-

0

|

n

+

1

=

M

(

n

+

1

)

!

<

3

(

n

+

1

)

!

So we need

3

/

(

n

+

1

)

!

<

0.0001

. Try several values of

n

until that is satisfied:

3

/

2

=

1.5

,

3

/

3

!

=

0.5

,

3

/

4

!

=

0.125

,

3

/

5

!

=

0.025

,

3

/

6

!

=

0.00416

3

/

7

!

=

0.00059

,

3

/

8

!

=

0.00007

Thus

n

=

7

should work. So we just need

T

7

⁢

(

x

)

, or add

1

+

1

+

1

/

2

+

…

+

1

/

7

!

.

Title

example of use of Taylor’s theorem

Canonical

name

ExampleOfUseOfTaylorsTheorem

Date of creation

2013-03-22 15:05:51

Last modified on

2013-03-22 15:05:51

Owner

alozano (2414)

Last modified by

alozano (2414)

Numerical id

4

Author

alozano (2414)

Entry type

Example

Classification

msc 41A58

Generated on Fri Feb 9 21:27:28 2018 by

LaTeXML