28
Section 9.3 Taylor’s Theorem

Taylor’s Theorem

  • Upload
    pahana

  • View
    66

  • Download
    0

Embed Size (px)

DESCRIPTION

Section 9.3. Taylor’s Theorem. Why Taylor Series?. When you learn new things, it is a healthy to ask yourself “Why are we learning this? What makes it interesting? What makes it relevant to the corpus of knowledge the human race has acquired?” - PowerPoint PPT Presentation

Citation preview

Page 1: Taylor’s Theorem

Section 9.3

Taylor’s Theorem

Page 2: Taylor’s Theorem

• When you learn new things, it is a healthy to ask yourself “Why are we learning this? What makes it interesting? What makes it relevant to the corpus of knowledge the human race has acquired?”

• This is not a copout or an excuse to justify not wanting to learn new things, but rather a way to put what your learning into perspective and make interesting connections

• Hence, we ask ourselves… what makes Taylor series interesting or useful? Why do we use them?

Why Taylor Series?

Page 3: Taylor’s Theorem

• Which is faster for a computer to find for a value of x between -1 and 1?

• Imagine you were doing millions of these calculations per second. The time savings of the polynomial would be immense!

• Of course, the latter polynomial only gives you an approximation of arctan(x).

• In what scenario might someone care how accurate your approximation is?

Taylor Series Are a Tool for Approximation

3 51 x xtan (x) or x ?3 5

Page 4: Taylor’s Theorem

Imagine there’s an asteroid barreling towards Earth. If it hits, it will destroy the planet.

Example 1: Taylor Series as a Tool for Approximation

Page 5: Taylor’s Theorem

The world’s best scientists have calculated that a rocket launched at an angle of arctan(0.8) radians will hit the asteroid dead-center.

Page 6: Taylor’s Theorem

The problem is that the rocket needs to be launched pronto or else the asteroid is going to hit us. He doesn’t have time to wait around for his computer to calculate the billions of digits of arctan(0.8) for the near-perfect hit…

0.67474094222355266330565209736

Page 7: Taylor’s Theorem

But we don’t need to hit this particular asteroid dead center to destroy it. Rather, we just need to make contact to destroy it.

Page 8: Taylor’s Theorem

But we don’t need to hit this particular asteroid dead center to destroy it. Rather, we just need to make contact to destroy it.

Page 9: Taylor’s Theorem

Our scientists tell us we really only need to be within 5% of the actual value of arctan(0.8) radians to make contact. Anything beyond this will miss…

Page 10: Taylor’s Theorem

As long as we can calculate arctan(0.8) within this ±5% range, we’re saved!

Page 11: Taylor’s Theorem

3 5

5x xP (x) x 3 5

1f(x) tan (x)

5P (0.8) 0.6948693f(0.8) 0.67474094222355

Actual Estimate%Error Actual

5f(0.8) P (0.8)f(0.8)

2.9831%

Error Actual Estimate 5f(0.8) P (0.8) 0.02012839

Page 12: Taylor’s Theorem

We’re saved!! We needed to be within 5% and we were actually within 2.983%!!!!

Page 13: Taylor’s Theorem

Example 1

Find the Taylor polynomial of order four for the function at x 0, and use it to approximate the value of the function at x 0.1.

2 3 44x 8x 16x2x ...2 3 4

2 3 4x x xln(1 x) x ...2 3 4

f(x) ln(1 2x)

2 3 42x 2x 2x2x ( ) ( ) ( )( ) ...2 3 4

3

2 44

8xP (x) 2x 2x 4x3

3

2 44

8(0.1)P (0.1) 2(0.1) 2(0.1) 4(0.1)3 0.22306

2(0.1)f(0.1) ln(1 ) 0.223143551... ActualError 0.223143551 0.22306 0.000076885

Page 14: Taylor’s Theorem

Example 1

Find the Taylor polynomial of order four for the function at x 0, and use it to approximate the value of the function at x 0.1.

2 3 44x 8x 16x2x ...2 3 4

2 3 4x x xln(1 x) x ...2 3 4

f(x) ln(1 2x)

2 3 42x 2x 2x2x ( ) ( ) ( )( ) ...2 3 4

3

2 44

8xP (x) 2x 2x 4x3

3

2 44

8(0.1)P (0.1) 2(0.1) 2(0.1) 4(0.1)3 0.22306

2(0.1)f(0.1) ln(1 ) 0.223143551... ActualError 0.223143551 0.22306 0.000076885

Page 15: Taylor’s Theorem

Example 28

2

Find a formula for the truncation error if we use P (x) to approximate1f(x) on( 1,1).

1 x

2 4 6 8 10 121 x x x x x x ...

2 3 4 51 1 x x x x x ...1 x

2 3 4 5 62 2 2 2 2 21 x x x x x x ...f(x)

8 8P (x) R (x)

10 12 14 168R (x) x x x x ...

10

2x

1 ( x )

10

2x

1 x

Page 16: Taylor’s Theorem

All of our examples so far have problem with them:In the Asteroid Problem (and Example 1), we computed the (Actual – Estimate)/Actual to find our error of our approximation. Why did we find an ESTIMATE if checking if it was accurate enough to use required us to compute the ACTUAL value??And Example 2 didn’t need

a Taylor series expansion in the first place… It was just 1/(1+x2)

Page 17: Taylor’s Theorem

Example 3: An Error ESTIMATE for arctan(0.8)

3 5

5

5

x xf(x)=arctan(x) P (x) x is used when x is near zero. ESTIMATE3 5the error of using P (0.8) to approximate arctan(0.8).

3 5

5x xP (x) x 3 5

EstimateThis!7 9 11 13

5x x x xR (x) ...7 9 11 13

1

3 5 7 9

Notice at x=0.8, the Taylor series for tan (x) is an alternating series:(0.8) (0.8) (0.8) (0.8)f(0.8) (0.8) ...3 5 7 9

Each new term bounces us above or below the exact value, and eachsubsequent"bounce" gets us a little closer to the actual value...That is, the error can be no more thanthe next term in the series evaluated atx=0.8...

Page 18: Taylor’s Theorem

Example 3: An Error ESTIMATE for arctan(0.8)

3 5

5

5

x xf(x)=arctan(x) P (x) x is used when x is near zero. ESTIMATE3 5the error of using P (0.8) to approximate arctan(0.8).

7

5xR (x) (Thenext term)7

7

50.8R (0.8) 0.029959317

5This says that our approximation P (0.8)of arctan(0.8)is at most 0.02995931 units off. This gives a maximumpercent error of 4.646%. The world is saved!

Page 19: Taylor’s Theorem

We needed to be within 5% and we have an estimate that says our error is NO WORSE than 4.646%!

Page 20: Taylor’s Theorem

Alternating Series Remainder Estimate

2

(3) (n)3 n

n

f''(a)f(x) f(a) f'(a)(x a) (x a)2!f (a) f (a)(x a) ... (x a) R (x)3! n!

(n 1) n 1

nf (a)(x a)MaximumPossibleError : R (x) (n 1)!

(n) n2

n

(n 1) n 1

f''(a) f (a)(x a)Theerror for P (x) f(a) f'(a)(x a) (x a) ...2! n!f (a)(x a)is no more than the next value in the series, , as long (n 1)!

as the series alternates AT YOUR CHOSEN VALUEOFx.

Page 21: Taylor’s Theorem

Example 4: What If We Don’t Alternate?

2x 2The approximation f(x)=e 1 2x 2x is used when x is small. Find a bound for the maximum error when x <0.1. Then graph.

22P (x) 1 2x 2x .

2Weareestimating R (x) ,but we don't alternate this time! That is,the next term isn't enough:

3 4 n

2(2x) (2x) (2x)R (x) ... ...3! 4! n!

3

2(2x)R (x) SomeAdditionalSmallStuff3!

Don't sweat the small stuff, we have a theorem to take care of it...

Page 22: Taylor’s Theorem

Remainder Estimate Theorem

(n 1) n 1

nf (a)(x a)R (x) Some Additional Small Stuff(n 1)!

2

(3) (n)3 n

n

f''(a)f(x) f(a) f'(a)(x a) (x a)2!f (a) f (a)(x a) ... (x a) R (x)3! n!

(n 1) n 1

nf (c)(x a)MaximumPossibleError : R (x) (n 1)!

Taylor'sTheorem:We can overcome this "extra small stuff"by replacing "a" with"c" for somecbetween"a" and"x."

Page 23: Taylor’s Theorem

Example 42x 2

3The approximation f(x)=e P (x) 1 2x 2x is used when x is small. Find a boundfor the maximum error when x <0.1. Then graph.

(n 1) n 1

nf (c)(x a)R (x) (n 1)!

(3) 3

2f (c)xR (x) 3!

(3) 3 3 2c 3f (c)x 2 e x3! 3!

3 2(0.1) 32 e (0.1)3!

0.001628537

2R (x) 0.001628537(MaximumPOSSIBLEError)

2xPick a c that makes thisas large as possible. eis increasing on -0.1<x<0.1,so this will be biggest at 0.1.

3 2xf'''(x) 2 e

Page 24: Taylor’s Theorem

Example 42x 2

3The approximation f(x)=e P (x) 1 2x 2x is used when x is small. Find a boundfor the maximum error when x <0.1. Then graph.

2R (x) 0.001628537(MaximumPOSSIBLEError) 3f(0.1) P (0.1) 0.00140275

(ACTUALError)

Page 25: Taylor’s Theorem

Example 5

2x x xThe approximation f(x)=ln 1 is used when x is small. Use the Remainder2 2 8Estimation Theorem to get a bound for the maximum error when x <0.1. Then graph.

2

2x xP (x) .2 8 2Weareestimating R (x) .

(3) 3f (c)xWecanfindourmaximumpossibleerror with .3!Onthe interval [-0.1,0.1],ourmax error willbeat x 0.1or x 0.1.

(3)3

2f (t)(x 2)

35

2 3

x 0.1:2 ( 0.1)R (x) 4.860 103!( 0.1 2)

35

2 3

x 0.12 (0.1)R (x) 3.599 103!(0.1 2)

5ESTIMATEDMaximumError on Interval :4.860 10

Page 26: Taylor’s Theorem

Example 5

xf(x)=ln 1 2

2

2x xP (x) 2 8

35

2 3

x 0.1:2 ( 0.1)R (x) 4.860 103!( 0.1 2)

f(-0.1)=-0.05129329...

2

2( 0.1) ( 0.1)P ( 0.1) 0.051252 8

5ActualError :f( 0.1) P( 0.1) 4.329 10

Page 27: Taylor’s Theorem

Example 5

35

2 3

x 0.1:2 ( 0.1)R (x) 4.860 103!( 0.1 2)

5Actual error is4.3 10 ,whichiswithin our bound.

2x x xy ln 1 2 2 8

Page 28: Taylor’s Theorem

MEMORIZE!!

2

0

2

0

2 3

0

3 5 2 1 2 1

1 1 ... ... (| | 1)1

1 1 ... ( ) ... ( ) (| | 1)1

1 ... ... (for all real )2! 3! ! !

sin( ) ... ( 1) ... ( 1) (fo3! 5! (2 1)! (2 1)!

n n

n

n n

n

n nx

n

n nn n

x x x x xx

x x x x xx

x x x xe x xn n

x x x xx xn n

0

2 4 2 2

0

2 31 1

1

3 5 2 11

r all real )

cos( ) 1 ... ( 1) ... ( 1) (for all real )2! 4! (2 )! (2 )!

ln(1 ) ... ( 1) ... ( 1) ( 1 1)2 3

tan ( ) ... ( 1) ... ( 13 5 (2 1)

n

n nn n

n

n nn n

n

nn

x

x x x xx xn n

x x x xx x xn n

x x xx xn

2 1

0) (| | 1)(2 1)

nn

n

x xn