Section 9.7 and 9.10: Taylor Polynomials and Approximations/Taylor and Maclaurin Series
Power Series for Functions We can create a Power Series (or polynomial series) that can approximate a function around a certain value of the function. In order to approximate the function, we force the series to match the function at its value through many derivatives. = Example: T 2 (x) = 1 + x + x2 approximates f x 2 x = 0 because f 0 = T 2 0 = 1 f 0 = T 2 (0) = 1 f 0 = T 2 (0) = 1 e x at
Taylor Series Generated by f at x=0 Also known as a Maclaurin Series generated by f. Let f be a function with derivatives of all orders throughout some open interval containing 0. Then the Taylor series generated by f at x = 0 is: f 0 + f 0 x + f 0 x 2 + + f n 0 f k (0) k=0 k! x k x n +
Verifying the Maclaurin Series Justify that the Taylor Series centered at x = 0 matches any function at its value through all of its derivatives at x = 0. f 0 + f 0 x + f 0 x 2 + f 0 3! x 3 + + f n 0 x n + If x = 0, does the series equal f(0)? f 0 + f 0 0 + f 0 = f 0 Yes! 0 2 + f 0 3! 0 3 + + f n 0 0 n + If x = 0, does the derivative of the series equal f (0)? Derivative: 0 + f 0 + f 0 x + f 0 x = 0: 0 + f 0 + f 0 0 + + f 0 = f 0 Yes! x 2 + + f n 0 (n 1)! xn 1 + 0 2 + f n 0 n 1! 0n 1 +
Verifying the Maclaurin Series Justify that the Taylor Series centered at x = 0 matches any function at its value through all of its derivatives at x = 0. f 0 + f 0 x + f 0 x 2 + f 0 3! x 3 + + f n 0 x n + If x = 0, does the second derivative of the series equal f (0)? 2 nd Deriv: 0 + 0 + f 0 + f 0 x + + f n 0 (n 2)! xn 2 + x = 0: 0 + 0 + f 0 + f 0 0 + + f n 0 (n 2)! 0n 2 + = f 0 Yes! This pattern will continue. If x = 0, then the nth derivative of the series will equal f n 0. The Taylor Series meets the defined requirements.
Taylor Series v Taylor Polynomial Taylor Polynomial: Have a finite number of terms and are approximations of the function around a value of x. f 0 + f 0 x + f 0 x 2 + + f n 0 Taylor Series: Have a infinite number of terms and are equivalent to the function for values of x. f 0 + f 0 x + f 0 x 2 + + f n 0 x n x n +
Maclaurin Series to Memorize 1 1 x = 1 + x + x2 + x 3 + + x n + = n=0 x n for x < 1 e x = 1 + x + x2 + x3 3! + + xn + = x n n=0 for x < 1 sin x = x x3 + x5 3! 5! Starts at 0 because sin 0 = 0 cos x = 1 x2 + x4 4! Starts at 1 because cos 0 = 1 Odd degree powers and sin x is an odd function + 1 n x2n+1 2n+1! + 1 n x2n 2n! + = + = 1 n x2n+1 n=0 for all Even degree powers and cos x is an even function 2n+1! real x n x2n n=0 1 for all 2n! real x We will discuss the interval of convergence later.
Example 1 Suppose g is a function with derivatives of all orders for real numbers. Assume g 0 = 4, g 0 = 2, g 0 = 6, and g 0 = 8. Write the second-degree the Taylor polynomial for g at x = 0, and use it to approximate g(0.5). Notice the degree required. Use the Formula for a second-degree polynomial: g 0 + g 0 x + g 0 4 + 2 x + 6 x2 4 + 2x + 3x 2 x 2 Substitute x = 0.5 into the polynomial to approximate the function g: 4 + 2 0.5 + 3 0.5 2 2.25
Notice: A Taylor series for a polynomial function IS the polynomial function in standard form. Example 2 Find the Taylor series for f x = (1 + x) 3 at x = 0. Find the function and derivatives of f(x): f x = (1 + x) 3 f x = 3(1 + x) 2 f x = 6(1 + x) 1 f x = 6 All future derivatives will be zero. Substitute into the formula: Find the value of the function and each derivative if x = 0: f 0 = 1 f 0 = 3 f 0 = 6 f 0 = 6 f (4) x = 0 f 0 = 0 1 + 3 x + 6 x2 + 6 3! x3 = 1 + 3x + 3x 2 + x 3
Example 3 Find the Maclaurin series for f x = x 2 e x. Find the function and derivatives of f(x): f x = x 2 e x f (x) = x 2 e x + 2xe x f (x) = x 2 e x + 4xe x + 2e x f x = x 2 e x + 6xe x + 6e x f (4) (x) = x 2 e x + 8xe x + 12e x f (5) (x) = x 2 e x + 10xe x + 20e x f 6 (x) = x 2 e x + 12xe x + 30e x Substitute into the formula: 0 + 0 x + 2 x2 + 6 3! x3 + 12 4! x3 + 20 5! x4 + 30 6! x5 + = Find the value of the function and each derivative if x = 0: Not enough terms to see a pattern. f 0 = 0 f 0 = 0 f 0 = 2 f 0 = 6 f (4) (0) = 12 f (5) (0) = 20 f 6 (0) = 30 x 2 + x 3 + x4 + x5 3! + + xn+2 +
There are several method for generating new Taylor Series from known ones: integrate term by term, differentiate term by term, using algebra, or using substitution.
Example 3: Method 2 Find the Maclaurin series for f x = x 2 e x. We know the Maclaurin series for e x : 1 + x + x2 + x3 3! + + xn + = n=0 x n We know the Maclaurin series for x 2 : x 2 Multiply the Maclaurin series for e x by the Maclaurin series for x 2 : x 2 (1 + x + x2 + x3 3! + + xn + ) x 2 + x 3 + x4 + x5 3! + + xn+2 + = n=0 x n+2
Example 4 Find the Maclaurin series for f x = e x2. Find the function and derivatives of f(x): f x Substitute into the formula: f x = e x2 f (x) = 2xe x2 = 4x 2 e x2 2e x2 Find the value of the function and each derivative if x = 0: Not enough terms to see a pattern. f 0 = 1 f 0 = 0 f 0 1 + 0 x + 2 x2 + 0 3! x3 + 12 4! x4 + 0 5! x5 + 120 6! = 2 f (x) = 8x 3 e x2 + 12xe x2 f 0 = 0 f (4) (x) = 16x 4 e x2 48x 2 e x2 + 12e x2 f (4) 0 = 12 f 5 x = 32x 5 e x2 + 160x 3 e x2 120xe x2 f (5) 0 = 0 f 6 x = 64x 6 e x2 480x 4 e x2 + 720x 2 e x2 120e x2 f (6) 0 = 120 1 x 2 + x4 x6 3! + + ( 1) n x 2n x 6 + + = n=0 ( 1) n x 2n
There are several method for generating new Taylor Series from known ones: integrate term by term, differentiate term by term, using algebra, or using substitution.
Example 4: Method 2 Find the Maclaurin series for f x = e x2. We know the Maclaurin series for e x : 1 + x + x2 + x3 3! + + xn + = n=0 x n Substitute x 2 for x in the Maclaurin series for e x : 1 + ( x 2 ) + ( x2 ) 2 + ( x2 ) 3 3! + + ( x2 ) n + 1 x 2 + x4 x6 3! + + ( 1) n x 2n + = n=0 ( 1) n x 2n
Finding ANY Taylor Series It should be possible to approximate functions around values other than x = 0. How should we change the Maclaurin Series to make a Taylor Series centered at any x = a? Remember it must still match the function at its value through all of its derivatives at x = a. If x = a, does the series equal f(a)? f a + f a Change the 0 to an a: x + f a 0 + f a + f a a + + f a f a + f a (x a) + f a x 2 + + a 2 + f n a f n a x n + Change the x to x a. n 1! an 1 + f a No After substituting a for x, we need these values to be 0 in order for the sum to equal f (a). (x a) 2 + + f n a (x a) n +
Finding ANY Taylor Series It should be possible to approximate functions around values other than x = 0. How should we change the Maclaurin Series to make a Taylor Series centered at any x = a? Remember it must still match the function at its value through all of its derivatives at x = a. f a + f a (x a) + f a Change the 0 to an a: (x a) 2 + + f n a Change the x to x a. (x a) n + If x = a, does the derivative of the series equal f (a)? Deriv: 0 + f a x = a: 0 + f a = f a + f a (x a) + f a + f a (a a) + f a YES! (x a) 2 + + f n a (n 1)! (x a)n 1 + (a a) 2 f n a + + (n 1)! (a a)n 1 +
Taylor Series Generated by f at x=a Let f be a function with derivatives of all orders throughout some open interval containing a. Then the Taylor series generated by f at x = a is: f a + f a (x a) + f a k=0 (x a) 2 + + f k (a) (x a) k k! f n a (x a) n +
Example Consider f x = e x. (a) Find the fourth degree Taylor Polynomial for f x centered at c = 1. Find the function and derivatives of f(x): f x f x f x f x = e x = e x = e x = e x = e x Find the value of each derivative if x = 1: f 1 = e 1 f 1 = e 1 f 1 = e 1 f 1 = e 1 f (4) x = e x f (4) 1 = e 1 Substitute into the formula for 4 terms: e 1 + e 1 (x 1) + e1 (x 1)2 + e1 (x 3! 1)3 + e1 (x 1)4 4! e + e(x 1) + e (x 2 1)2 + e (x 6 1)3 + e (x 1)4 24
Example Consider f x = e x. (b) Approximate e 1.5 and e 10 with the Taylor Polynomial. Substitute x = 1.5, 10 into the Taylor polynomial: e + e(1.5 1) + e 2 (1.5 1)2 + e 6 (1.5 1)3 + e e + e(10 1) + e 2 (10 1)2 + e 6 (10 1)3 + e 24 (1.5 1)4 = 4.481 Since e 1.5 4.481 and e 10 22026.466, the Taylor polynomial is a better approximation when it is closer to center value. 24 (10 1)4 = 1210.655
Extension Find the Maclaurin series for f x = e ix. We know the Maclaurin series for e x : Substitute ix for x in the Maclaurin series for e x : 1 + x + x2 + x3 3! + x4 4! + x5 5! + xn + 1 + ix + ix 2 1 + ix + i2 x 2 1 + ix + x2 + ix 3 3! + i3 x 3 3! + ix3 3! + ix 4 4! + i4 x 4 4! + ix 5 5! + i5 x 5 5! + + x4 4! + ix5 5! + + (1 + x2 + x4 4! + ) + i(x + x3 3! + x5 5! + ) cos x + i sin x
Extension Continued Find the Maclaurin series for f x = e ix. Therefore: e ix = cos x + i sin x Let x = π: e iπ = cos π + i sin π e iπ = 1 + 0 An equation relating the 5 most important numbers in mathematics! e iπ + 1 = 0