9.10 Taylor and Maclaurin Series Colin Maclaurin 1698-1746 In the previous lesson we were able to take certain functions that could be a written in the form and write them as a geometric power series. 1 r Today we are going to make this more general so that we can write any function as a power series! Suppose we have a function represented by the polynomial: f ( x) ao a1 ( x c) a2 ( x c) 2 a3 ( x c)3 ... How could we determine what the coefficients an are in terms of f ? If we let x = c, all the terms after the first become 0 and we have: f (c) ao If we differentiate term by term, we get: f '( x) a1 2a2 ( x c) 3a3 ( x c) 2 4a4 ( x c)3 ... Again, if we let x = c, all the terms after the first become 0 and we have: f '(c) a1 f '( x) a1 2a2 ( x c) 3a3 ( x c) 2 4a4 ( x c)3 ... If we differentiate again we get: f "( x) 2a2 2 3a3 ( x c) 3 4a4 ( x c) ... 2 Again, if we let x = c, all the terms after the first become 0 and we have: f "(c) 2a2 Let’s differentiate one more time to get: f "'( x) 2 3a3 2 3 4a4 ( x c) 3 4 5a5 ( x c) 2 ... Finally when x = c: f "'(c) 2 3a3 3!a3 So what is the pattern?? In each case when x = c, we got: f ( n ) ( c ) n ! an Solving this equation for an f an we get: (n) (c ) n! Where have we seen this before? These are the coefficients of the Taylor polynomial that represents f(x). Definition of Taylor Series n 0 (n) f ( n ) (c) f '( c ) f "( c ) f (c) ( x c)n f (c) ( x c) ( x c) 2 ... ( x c) n ... n! 1! 2! n! is the Taylor series for f(x) at c. If c = 0, then what would we call this?? The Maclaurin series for f(x)! This is useful because now we can find a series representation for any function for which we can find its derivatives at c! Ex. 1: Find the first four terms of the Maclaurin series for f ( x) sin x then find the general term and the interval of convergence. f n 0 f f (0) sin 0 0 f '( x) cos x f '(0) cos 0 1 f "( x) sin x f "(0) sin 0 0 ( x) cos x f (3) (0) cos 0 1 (3) f (4) ( x) sin x f (4) (0) sin 0 0 ( x) cos x f (5) (0) cos 0 1 f f ( x) sin x (5) (0) n 0 2 (1) 3 0 4 1 5 x 0 (1) x x x x x ... n! 2! 3! 4! 5! (n) n 0 f ( n ) (0) n 0 2 (1) 3 0 4 1 5 x 0 (1) x x x x x ... n! 2! 3! 4! 5! x3 x5 x 7 (1)n x 2 n1 x ... 3! 5! 7! n 0 (2n 1)! 2 n 3 To find the interval of lim convergence, use the Ratio Test: n x (2n 3)! x 2 n1 (2n 1)! 2 x lim 0 1 n (2n 3)(2n 2) Converges for all x, so the interval of convergence is: (, ) We know this series converges for all x, but what does it converge to?? Does it necessarily converge to sin x ? In other words, the series could agree with sin x at its derivatives but maybe not at points in between the derivatives. How could we tell if the series really does converge to sin x everywhere (and in the long run), and not just at its derivatives? Recall that a Taylor polynomial of n terms has a remainder: (n) f '(c) f "(c) f (c ) 2 f ( x ) f (c ) ( x c) ( x c) ... ( x c) n Rn ( x) 1! 2! n! What is the remainder equal to?? f ( n1) ( z ) Rn ( x) ( x c)n1 (n 1)! ( n 1) f ( z) We need lim Rn ( x) ( x c)n1 0 (n 1)! n to be able to say that f ( x) n 0 n f (c) n ( x c) n! Ex. 2: We already showed that the Maclaurin series for sin x converges for all x. Now show that it in fact converges to sin x for all x. Taylor’s inequality tells us that our remainder is bounded by the maximum value for the (n+1)st derivative. What is that? Since f ( n1) ( x) sin x or cos x, ( n 1) n 1 x f ( z) n 1 0 Rn ( x) ( x c) (n 1)! (n 1)! 0 Rn ( x) lim n x x n 1 (n 1)! n 1 (n 1)! Rn ( x) 0 0 lim n Therefore the Maclaurin series for sin x converges to the function sin x for all x. 2 n 1 (1) x sin x n 0 (2n 1)! n For certain functions (categorized as transcendental functions) if the Taylor Polynomial is infinite, becoming a Taylor Series, then the polynomial is actually equivalent to the original function. WOW!!! http://calculusapplets.com/taylor.html Taylor Series and Maclaurin Series The diagram visually illustrates the convergence of the Maclaurin series for sin x by comparing the graphs of the Maclaurin polynomials P1(x), P3(x), P5(x), and P7(x) with the graph of the sine function. Notice that as the degree of the polynomial increases, its graph more closely resembles that of the sine function. Guidelines for Finding a Taylor Series 1) Differentiate f(x) several times and evaluate each derivative at c. Try to recognize a pattern in these numbers. f (c), f '(c), f "(c), f "'(c),..., f 2) 3) (n) (c),... Use the sequence developed in the first step to form the Taylor coefficients f ( n ) (c) and determine the interval of an n! convergence for the resulting power series. Within this interval of convergence, determine whether or not the series converges to f(x). Ex. 3 (You try) Find the Taylor series for f ( x) e x centered at c = 2. Since e x is always its own derivative: n 0 f ( n ) (2) ( x 2)n n! f (n) (2) e 2 e2 n ( x 2) n 0 n ! Find the interval of convergence using the Ratio Test: e2 ( x 2)n1 n! ( x 2) lim 2 0 1 n lim n (n 1)! e ( x 2) n n 1 Interval of convergence: (, ) 2 ex n 1 0 Rn ( x) ( x 2) (n 1)! e x n e ( x 2) ? n 0 n ! To show convergence for all x, we need numbers between 2 and x such that: x e lim Rn ( x) lim ( x 2) n1 0? n n (n 1)! n 1 ( x 2) e x lim n (n 1)! Ratio Test? lim Rn ( x) 0 n Therefore the Taylor series for f ( x) e x at x 2 converges to the function f ( x) e x for all x. Ex. 4: Find the first four terms and the general term of the 2 f ( x ) sin x . Maclaurin series for Since we already know that Maclaurin series for sin x we can use that to build our series: x3 x5 x 7 sin x x ... 3! 5! 7! by replacing x with x 2 : 6 10 14 x x x 2 2 sin( x ) x ... 3! 5! 7! n 0 f (n) 2(2 n 1) (0) n n x x (1) n! (2n 1)! n 0 Ex. 5: Find the Maclaurin series for f x cos x and then use the result to find the first four terms of the power series for f ( x) cos x . x2 x4 x6 Given that cos x 1 ..., 2! 4! 6! x x x x 1 2 cos 2! 4 4! 6! x x 2 x3 1 ... 2! 4! 6! 6 ... Ex. 6: Write the first four non-zero terms in the Maclaurin series for f x xe . x 2 3 4 x x x Given that e 1 x ..., 2! 3! 4! x e x xe x x 2 x3 1 x ... 2! 3! 3 4 x x 2 x x ... 2! 3! Ex. 7: Evaluate the summation using a known power series: 1 2n ! k 1 n 2n 2n 1 x x x x x Given that cos x 1 ... ... 2! 4! 6! 8! 2n ! 2 1 2n ! k 1 n 4 2n 6 8 cos 1 n Homework Pg. 685 1-11 odd, 21-25 odd, 31, 37-45 odd Day 2 pg. 685 15-19 odd, MMM 220