35 approximation using taylor expansions

26
Approximations Using Taylor Expansions

Upload: math266

Post on 27-Jun-2015

68 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Page 2: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Page 3: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b]

Page 4: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b]

a( )[ ]

b

f(x) is infinitely differentiable in here

Page 5: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b] and pn(x) be the n'th Taylor-poly expanded around at a,

a( )[ ]

b

f(x) is infinitely differentiable in here

Page 6: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b] and pn(x) be the n'th Taylor-poly expanded around at a,

then there exists a "c" between a and b

a( )[ ]

bc

f(x) is infinitely differentiable in here

Page 7: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b] and pn(x) be the n'th Taylor-poly expanded around at a,

then there exists a "c" between a and b such that

f(b) = pn(b) + (b – a)n+1(n + 1)! f(n+1)(c)

a( )[ ]

bc

f(x) is infinitely differentiable in here

Page 8: 35 approximation using taylor expansions

We have the Taylor's Remainder Theorem:

Approximations Using Taylor Expansions

Let f(x) be an infinitely differentiable function over some open interval that contains [a, b] and pn(x) be the n'th Taylor-poly expanded around at a,

then there exists a "c" between a and b such that

f(b) = pn(b) + (b – a)n+1(n + 1)! f(n+1)(c)

a( )[ ]

bc

f(x) is infinitely differentiable in here

We use the remainder formula to control the error when we use Taylor polynomials to approximate f(b).

Page 9: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

Approximations Using Taylor Expansions

Page 10: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

1 decimal place of accuracy error < 0.05

Approximations Using Taylor Expansions

Page 11: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

1 decimal place of accuracy error < 0.05

Approximations Using Taylor Expansions

2 decimal places of accuracy error < 0.005

Page 12: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

1 decimal place of accuracy error < 0.05

Approximations Using Taylor Expansions

2 decimal places of accuracy error < 0.005

3 decimal places of accuracy error < 0.0005

Page 13: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

1 decimal place of accuracy error < 0.05

Approximations Using Taylor Expansions

2 decimal places of accuracy error < 0.005

3 decimal places of accuracy error < 0.0005

Example: The Mac-polynomial of ex is

x + 2!1 + x2

+ .. ++ 3!x3

n! xn

pn(x) =

Find an n such that pn(1) approximates e with an accuracy to 4 decimal places.

Page 14: 35 approximation using taylor expansions

An approximation is said to be accurate to n decimal places if the error is less than 0.5 x 10-n. Therefore,

1 decimal place of accuracy error < 0.05

Approximations Using Taylor Expansions

2 decimal places of accuracy error < 0.005

3 decimal places of accuracy error < 0.0005

Example: The Mac-polynomial of ex is

x + 2!1 + x2

+ .. ++ 3!x3

n! xn

pn(x) =

Find an n such that pn(1) approximates e1 with an accuracy to 4 decimal places.

f(n+1)(c)(n+1)!

bn+1 isThe error term Rn(b) = ec

(n+1)! 1n+1

for some c between 0 and b = 1.

Page 15: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Assuming we know that e < 3, then the errorec

(n+1)! Rn(1) = < 3

(n+1)!

For n large enough such that

we will have pn(1) accurate to 4 decimal places.

0.00005 > 3(n+1)!

By trying different values for n (trial and error), we found 0.00005 > 3/9!, or n = 8 is large enough. So p8(1) e = 1 + 1 + 1/2! + 1/3! + .. + 1/8! 2.7183 approximates e accurately to at least 4 places.

> Rn(1)

Page 16: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

Page 17: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

Set b = 3o as π/60.

Page 18: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

Page 19: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,cos(n+1)(c)π60

,and at b = π/60,

Page 20: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

cos(n+1)(c)π60

,and at b = π/60,

Page 21: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1,

cos(n+1)(c)π60

,and at b = π/60,

Page 22: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1, hence |Rn( )| <

cos(n+1)(c)π60

,and at b = π/60,

π60 (n+1)!

(π/60)n+1

.

Page 23: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1, hence |Rn( )| <

cos(n+1)(c)π60

,and at b = π/60,

π60 (n+1)!

(π/60)n+1

.

We want 0.0005 > (n+1)! (π/60)n+1

.

Page 24: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1, hence |Rn( )| <

cos(n+1)(c)π60

,and at b = π/60,

π60 (n+1)!

(π/60)n+1

.

We want 0.0005 > (n+1)! (π/60)n+1

.

By trial and error n = 2 is sufficient.

Page 25: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1, hence |Rn( )| <

cos(n+1)(c)π60

,and at b = π/60,

π60 (n+1)!

(π/60)n+1

.

We want 0.0005 > (n+1)! (π/60)n+1

.

By trial and error n = 2 is sufficient. So p2( ) π/60

= 1 – (π/60)2/2

Page 26: 35 approximation using taylor expansions

Approximations Using Taylor Expansions

Example: Approximate cos(3o) to an accuracy of 3 decimal places.

1 – pn(x) =

with the error term Rn( ) = (n+1)!

Expanding around 0, the Mac-poly of cos(x) is

+ 4!x4

6!x6

8!x8

+ – 2!x2

..

Set b = 3o as π/60.

π60

( )n+1,

where c is some number between 0 and π/60.

|cosn+1(c)| < 1, hence |Rn( )| <

cos(n+1)(c)π60

,and at b = π/60,

π60 (n+1)!

(π/60)n+1

.

We want 0.0005 > (n+1)! (π/60)n+1

.

By trial and error n = 2 is sufficient. So p2( ) π/60

= 1 – (π/60)2/2 0.998629 gives us the desired result.