Section 10.7: Taylor and Maclaurin Series Taylor and Maclaurin series are power series representations of functions. Let ∞ X f (x) = cn (x − a)n = c0 + c1 (x − a) + c2 (x − a)2 + c3 (x − a)3 + c4 (x − a)4 + · · · . n=0 Then f (a) = c0 . Taking the derivative gives f 0 (x) = c1 + 2c2 (x − a) + 3c3 (x − a)2 + 4c4 (x − a)3 + · · · . Then f 0 (a) = c1 . Similarly, f 00 (x) = 2c2 + 3 · 2c3 (x − a) + 4 · 3c4 (x − a)2 + · · · . f 00 (a) 00 Then f (a) = 2c2 and so c2 = . 2 Likewise, f 000 (x) = 3 · 2c3 + 4 · 3 · 2(x − a) + · · · . f 000 (a) . Then f 000 (a) = 3!c3 and so c3 = 3! Continuing in this fashion, we find that in general cn = f (n) (a) . n! Definition: The Taylor series for f (x) centered at x = a is f (x) = ∞ X f (n) (a) n=0 where f (n) n! (x − a)n , (a) is the nth derivative of f (x) at x = a. Example: Find the Taylor series for f (x) = e3x centered at x = 2. What is the associated radius of convergence? The higher-order derivatives of f (x) are f (x) f 0 (x) f 00 (x) f 000 (x) = = = = .. . e3x 3e3x 9e3x 27e3x f (n) (x) = 3n e3x f (2) f 0 (2) f 00 (2) f 000 (2) = = = = .. . e6 3e6 9e6 27e6 f (n) (2) = 3n e6 . So the Taylor series is ∞ X 3n e6 e3x = n=0 n! (x − 2)n . Using the Ratio Test, n+1 6 3 e (x − 2)n+1 3(x − 2) n! = 0 < 1. lim · n 6 = lim n→∞ (n + 1)! 3 e (x − 2)n n→∞ n + 1 The radius of convergence is R = ∞. 1 centered at x = 3. What is the associated Example: Find the Taylor series for f (x) = x radius of convergence? The higher-order derivatives of f (x) are 1 x 1 0 f (x) = − 2 x 2 00 f (x) = 3 x 6 000 f (x) = − 4 x .. . (−1)n n! f (n) (x) = xn+1 1 3 1 0 f (3) = − 9 2 00 f (3) = 27 6 000 f (3) = − 81 .. . (−1)n n! f (n) (3) = . 3n+1 f (x) = So the Taylor series is f (3) = ∞ 1 X (−1)n = (x − 3)n . n+1 x n=0 3 Using the Ratio Test, (−1)n+1 (x − 3)n+1 −(x − 3) |x − 3| 3n+1 = lim · = lim < 1. n→∞ 3n+2 (−1)n (x − 3)n n→∞ 3 3 The radius of convergence is R = 3. Definition: The Maclaurin series for f (x) is the Taylor series centered at x = 0. That is, f (x) = ∞ X f (n) (0) n=0 n! where f (n) (0) is the nth derivative of f (x) at x = 0. xn , Example: Find the Maclaurin series for f (x) = ex . What is the associated radius of convergence? For n ≥ 0, the nth derivative of f (x) is f (n) (x) = f (x) = ex . Then f (n) (0) = 1 and the Maclaurin series is x e = ∞ X xn n=0 n! . Using the Ratio Test, n+1 x x n! = 0 < 1. lim · = lim n→∞ (n + 1)! xn n→∞ n + 1 The radius of convergence is R = ∞. Example: Find the Maclaurin series for f (x) = sin x. What is the associated radius of convergence? The higher-order derivatives of f (x) = sin x are f (x) f 0 (x) f 00 (x) f 000 (x) f (4) (x) = = = = = .. . sin x cos x − sin x − cos x sin x f (0) f 0 (0) f 00 (0) f 000 (0) f (4) (0) = = = = = .. . 0 1 0 −1 0 The Maclaurin series for sin x is ∞ sin x = x − X (−1)n x2n+1 x3 x5 x 7 + − + −··· = . 3! 5! 7! (2n + 1)! n=0 Using the Ratio Test, 2 (−1)n+1 x2n+3 (2n + 1)! −x = lim = 0 < 1. lim · n→∞ (2n + 3)! (−1)n x2n+1 n→∞ (2n + 3)(2n + 2) The radius of convergence is R = ∞. Example: Find the Maclaurin series for f (x) = cos x. What is the associated radius of convergence? The higher-order derivatives of f (x) = cos x are f (x) f 0 (x) f 00 (x) f 000 (x) f (4) (x) = = = = = .. . cos x − sin x − cos x sin x cos x f (0) f 0 (0) f 00 (0) f 000 (0) f (4) (0) = = = = = .. . 1 0 −1 0 1 The Maclaurin series for cos x is ∞ X (−1)n x2n x2 x4 x6 + − + −··· = . cos x = 1 − 2! 4! 6! (2n)! n=0 Using the Ratio Test, 2 (−1)n+1 x2n+2 −x (2n)! = lim = 0 < 1. lim · n→∞ (2n + 2)! (−1)n x2n n→∞ (2n + 2)(2n + 1) The radius of convergence is R = ∞. 3 Example: Find the Maclaurin series for f (x) = ex . What is the associated radius of convergence? The Maclaurin series for eu is u e = ∞ X un n=0 n! . 3 Setting u = x3 , the Maclaurin series for ex is x3 e = ∞ X (x3 )n n=0 n! = ∞ X x3n n=0 n! . The radius of convergence is R = ∞. Example: Find the Maclaurin series for f (x) = x cos(x3 ). What is the associated radius of convergence? The Maclaurin series for cos u is cos u = ∞ X (−1)n u2n n=0 (2n)! . Setting u = x3 , the Maclaurin series for x cos(x3 ) is x cos(x3 ) = x ∞ X (−1)n (x3 )2n (2n)! n=0 ∞ X (−1)n x6n+1 = n=0 (2n)! . The radius of convergence is R = ∞. x . What is the associated radius of Example: Find the Maclaurin series for f (x) = x2 sin 2 convergence? The Maclaurin series for sin u is ∞ X (−1)n u2n+1 sin u = n=0 Setting u = (2n + 1)! . x x , the Maclaurin series for x2 sin is 2 2 x sin x 2 ∞ ∞ X (−1)n x 2n+1 X (−1)n x2n+2 =x = . 2n+1 (2n + 1)! (2n + 1)! 2 2 n=0 n=0 The radius of convergence is R = ∞. Z Example: Consider the definite integral 1 cos(x2 )dx. 0 (a) Evaluate the integral as a series. The Maclaurin series for cos(x2 ) is 2 cos(x ) = ∞ X (−1)n (x2 )2n n=0 Then Z 0 1 (2n)! = ∞ X (−1)n x4n n=0 (2n)! . 1 ∞ ∞ n 4n+1 X X (−1) x (−1)n 2 cos(x )dx = . = (4n + 1)(2n)! (4n + 1)(2n)! n=0 n=0 0 (b) Use the sum of the first three terms to approximate the integral. How accurate is this approximation? The second partial sum (sum of the first three terms) is Z 2 1 1 cos(x2 )dx ≈ S2 = 2 − + . 10 216 0 By the Remainder Estimate for Alternating Series, |R2 | ≤ a3 = Z Example: Approximate 1 1 1 = ≈ 0.00011. 13(6)! 9360 2 e−x dx with error less than 0.001. 0 2 The Maclaurin series for e−x is e −x2 = ∞ X (−x2 )n n=0 Then Z 0 1 n! = ∞ X (−1)n x2n n=0 n! . 1 ∞ ∞ n 2n+1 X X (−1) x (−1)n −x2 e dx = . = (2n + 1)(n)! (2n + 1)(n)! n=0 n=0 0 By the Remainder Estimate for Alternating Series, |Rn | ≤ an+1 = 1 . (2n + 3)(n + 1)! Let 1 1 < (2n + 3)(n + 1)! 1000 (2n + 3)(n + 1)! > 1000. If n = 4, then (2n + 3)(n + 1)! = (11)5! = 1320 > 1000. Then Z 1 1 1 1 1 2 e−x dx ≈ S4 = 1 − + − + ≈ 0.7475. 3 10 42 216 0 The true value is approximately 0.7469. Example: Evaluate limx→0 sin(x3 ) − x3 . x9 The Maclaurin series for sin(x3 ) is ∞ X (−1)n (x3 )2n+1 n=0 (2n + 1)! = ∞ X (−1)n x6n+3 n=0 = x3 − (2n + 1)! x9 x15 + − +··· . 3! 5! Then 9 15 − x3! + x5! − + · · · sin(x3 ) − x3 lim = lim x→0 x→0 x9 x9 1 x6 = lim − + − +··· x→0 3! 5! 1 = − . 6 Example: Find the sum of the given series. (a) ∞ X (−1)n 3n x2n n=0 n! The series can be rewritten as ∞ X (−3x2 )n n! n=0 2 = e−3x . ∞ X (−1)n π 2n+1 (b) 32n+1 (2n + 1)! n=0 The series can be rewritten as ∞ π √3 X (−1)n π 2n+1 = . = sin (2n + 1)! 3 3 2 n=0 (c) ∞ X (−4)n x2n n=1 n! The series can be rewritten as ∞ X (−4x2 )n n=1 n! = ∞ X (−4x2 )n n=0 n! 2 − 1 = e−4x − 1.