20-Finding Taylor Coefficients
Total Page:16
File Type:pdf, Size:1020Kb
Taylor Coefficients Learning goal: Let’s generalize the process of finding the coefficients of a Taylor polynomial. Let’s find a general formula for the coefficients of a Taylor polynomial. (Students complete worksheet series03 (Taylor coefficients).) 2 What we have discovered is that if we have a polynomial C0 + C1x + C2x + ! that we are trying to match values and derivatives to a function, then when we differentiate it a bunch of times, we 0 get Cnn!x + Cn+1(n+1)!x + !. Plugging in x = 0 and everything except Cnn! goes away. So to (n) match the nth derivative, we must have Cn = f (0)/n!. If we want to match the values and derivatives at some point other than zero, we will use the 2 polynomial C0 + C1(x – a) + C2(x – a) + !. Then when we differentiate, we get Cnn! + Cn+1(n+1)!(x – a) + !. Now, plugging in x = a makes everything go away, and we get (n) Cn = f (a)/n!. So we can generate a polynomial of any degree (well, as long as the function has enough derivatives!) that will match the function and its derivatives to that degree at a particular point a. We can also extend to create a power series called the Taylor series (or Maclaurin series if a is specifically 0). We have natural questions: • For what x does the series converge? • What does the series converge to? Is it, hopefully, f(x)? • If the series converges to the function, we can use parts of the series—Taylor polynomials—to approximate the function, at least nearby a. How good an approximation is it? How many terms do we need to give a certain accuracy? • Can we use the series in integral and derivative problems? Notice that if the series converges to the function, we can use any accuracy test, such as the simple alternating series test, to answer questions like the above. Otherwise, we will have to use more sophisticated tools…. (More practice: series04) A nice way to lay out the calculations is to make a table of coefficients. That way if there are patterns they are easier to spot. Example: compute the Maclaurin series for sin(x). First, we lay out a table with n, f(n)(x), f(n)(0), and then divide by n! to get the coefficient: n f(n)(x) f(n)(0) Coefficient 0 sin(x) 0 0 1 cos(x) 1 1/1! = 1 2 – sin(x) 0 0 3 –cos(x) –1 1/3! = 1/6 4 sin(x) 0 0 5 cos(x) 1 1/5! 6 – sin(x) 0 0 So we can easily create the sixth degree Maclaurin polynomial x – x3/3! + x5/5!, and it appears the series will continue with just odd terms, alternating in sign. Notice that the sixth degree polynomial is identical with the fifth degree polynomial! 1/2 Example: Try the Taylor expansion for x = x . Notice that working near zero is a disaster, because the derivative isn’t defined at zero. Let’s work near x = 4. n f(n)(x) f(n)(4) Coefficient 0 1/2 2 2 x = x 1 1 x−1/2 1/4 1/4 2 2 1 −1 x−3/2 –1/32 –1/(32⋅2) = –1/64 2 ⋅ 2 3 1 −1 −3 x−5/2 3/256 3/(256⋅6) = 1/512 2 ⋅ 2 ⋅ 2 4 1 ⋅ −1 ⋅ −3 ⋅ −5 x−7/2 –15/(16⋅128) –5/16768 2 2 2 2 1/2 So the fourth degree Taylor expansion of x = x about x = 4 is (x − 4) (x − 4)2 (x − 4)3 5(x − 4)4 2 + − + − and it appears to get messier from there. There is 4 64 512 16768 probably something nice you can do with the coefficients with multiplying odd numbers and powers of two and alternating, but it seems unnecessary right this instant…. .