Taylor Polynomials & Approximations Contents Taylor Polynomials & Approximations ............................................................................... 1 Example 1 ............................................................................................................................ 2 Analytical ......................................................................................................................... 2 Definition of the nth Taylor Polynomial...................................................................... 3 Definition of the nth Maclaurin Polynomial ............................................................... 3 Example 2 ............................................................................................................................ 3 Multiple Choice ................................................................................................................ 3 Example 3 ............................................................................................................................ 4 Conceptual ....................................................................................................................... 4 Presenting Lagrange............................................................................................................ 4 Taylor’s Theorem ......................................................................................................... 4 Lagrange Error Bound ................................................................................................. 5 Example 4 ............................................................................................................................ 5 Graphical.......................................................................................................................... 5 Taylor Series ........................................................................................................................ 6 Taylor Series for f(x) at c.............................................................................................. 6 Maclaurin Series for Elementary Functions ....................................................................... 6 Example 5 ............................................................................................................................ 7 Free Response .................................................................................................................. 7 Operations with Series ........................................................................................................ 7 Example 6 ............................................................................................................................ 7 Differentiation of a Series ................................................................................................ 7 History and Applications .................................................................................................... 8 A Taylor polynomial is an approximation for a function. A Taylor polynomial is centered at a value c, which simply means that the polynomial approximation intercepts the actual function at (c, f (c)). Incidentally, this means the approximation will also be more accurate for x-values closer to c. A Maclaurin polynomial is simply a Taylor polynomial centered at 0. (Weisstein) But how do we obtain an approximation? Example 1 Analytical 𝝅 Find the third-degree Taylor polynomial for sin (x) centered at c = 𝟐 . Wait, hold on a second. What does “third-degree” mean? Well, we must first consider how we obtain these approximations. The most basic approximation for a function around a point is, simply, to make sure the approximation is the same at that point. So, our first approximation is: 𝜋 π P0 ( ) = sin = 1 2 2 This is our zeroth-degree Taylor polynomial. The approximation and the function have the same f (c). Now, how do we get our approximation to better, well, approximate the function? Why don’t we make the approximation and the function have the same first derivative at c, so this would be our first-degree Taylor polynomial should be in the form f (c) + (f ' (c))(x – c), so that the estimation would have the same slope (be tangent to the function) at and intersect the function at x = c. We would then take the integral of that, to find the actual approximation function, with the appropriate constant added on. 𝜋 π P′1 ( ) = cos = 0 2 2 𝜋 𝜋 𝜋 P1 ( ) = ∫ P ′1 ( ) dx = 1 + (0)(𝑥 − ) = 1 2 2 2 To obtain the second-degree Taylor polynomial, we would ensure that the second derivatives have the same value at c. We would then integrate twice, ensuring again that the appropriate constant values are added. 𝜋 π P′′2 ( ) = −sin = −1 2 2 𝜋 𝜋 𝜋 P′2 ( ) = ∫ P ′′ 2 ( ) dx = (0) + (−1)(𝑥 − ) 2 2 2 𝜋 2 𝜋 (−1)(𝑥 − ) (𝑥 − 2)2 𝜋 𝜋 𝜋 2 P2 ( ) = ∫ P ′ 2 ( ) dx = 1 + (0)(𝑥 − ) + =1− 2 2 2 2 2 The third-degree approximation would be found in a similar fashion. 𝜋 π P′′′3 ( ) = −cos = 0 2 2 𝜋 𝜋 𝜋 P′′3 ( ) = ∫ P ′′ ′3 ( ) dx = (−1) + (0)(𝑥 − ) 2 2 2 𝜋 (0)(𝑥 − )2 𝜋 𝜋 𝜋 2 P′3 ( ) = ∫ P ′ ′3 ( ) dx = 0 + (−1)(𝑥 − ) + 2 2 2 2 𝜋 𝜋 𝜋 (−1)(𝑥 − )2 (0)(𝑥 − )3 (𝑥 − )2 𝜋 𝜋 𝜋 2 2 2 P3 ( ) = ∫ P ′ 2 ( ) dx = 1 + (0)(𝑥 − ) + =1− =1− 2 2 2 2 6 2 If you go through this process for many different functions, you can find a general function. To save you the trouble of finding it yourself, we will present it here. Definition of the nth Taylor Polynomial Pn (𝑥) = 𝑓(𝑐) 𝑓 ′ (𝑐) 𝑓 ′′ (𝑐) 𝑓 (𝑛) (𝑐) (𝑥 − 𝑐) + (𝑥 − 𝑐)2 + ⋯ + (𝑥 − 𝑐)𝑛 + 0! 1! 2! 𝑛! Definition of the nth Maclaurin Polynomial Pn (𝑥) = 𝑓(𝑐) 𝑓 ′ (𝑐) 𝑓 ′′ (𝑐) 2 𝑓 (𝑛) (𝑐) 𝑛 + 𝑥+ 𝑥 + ⋯+ 𝑥 0! 1! 2! 𝑛! 0! is considered to be 1 to make the math more elegant. Note also that the Maclaurin polynomial is simply a Taylor polynomial centered at 0. Taylor polynomials can be used to estimate the value of functions. Example 2 Multiple Choice Use the third-degree Taylor polynomial for 𝑓(𝑥) = 𝑒 𝑥 centered about c = 0 to approximate the value of 𝑒 1.1 . A) 2.667 B) 2.927 C) 3.004 D) 4.000 E) Approximation does not exist First, we must find the general form of a third-degree Taylor polynomial for 𝑓(𝑥) centered at c = 0, which is 𝑃3 (𝑥) = 𝑓(0) + 𝑓 ′ (0)(𝑥) + 𝑓 ′′ (0)(𝑥)2 𝑓 ′′′ (0)(𝑥)3 + 2 6 A third-degree Taylor polynomial for 𝑒 𝑥 would be 𝑃3 (𝑥) = 1 + 𝑥 + 𝑥2 𝑥3 + 2 6 To find an approximation for 𝑒 1.1 , we simply need to plug in 1.1 for x. 1.12 1.13 𝑃3 (𝑥) = 1 + 1.1 + + = 2.927 2 6 Therefore, the correct answer is B. A is incorrect because 1 was plugged in instead of 1.1. C is incorrect because it is obtained by using the Taylor polynomial centered at 1, or a calculator was used to directly approximate 𝑒 1.1 . D is incorrect because factorial denominators were not included in the calculation. E is simply incorrect. Example 3 Conceptual Given the function 𝑓(𝑥) = 7𝑥 42 , why is it impossible to find the 43rd-degree Maclaurin polynomial? The 43rd-degree Maclaurin polynomial’s last term would require finding 𝑓 (43) (0), which is 0. Therefore, the 43rd-degree term does not exist, and any further terms would not exist. Therefore, for this function, you would be limited to finding the 42 nd-degree Maclaurin (or Taylor) polynomial. In general, you can only find a Taylor or Maclaurin polynomial to the degree at which a derivative still exists. That is, if a function only has existent derivatives up to the nth derivative, then you can only find the nth-degree polynomial estimation. Presenting Lagrange Taylor polynomials are estimations for the value of a function at a point. But how close are these estimations to the actual values? Now, it is impossible to find the exact error for our estimations, because if we knew that, we could just find the actual value. Instead, we are able to find the maximum possible error, known as the Lagrange error bound. (Larson, Hostetler, & Edwards, 2006) We can find this through Taylor’s Theorem. The proof of this theorem is lengthy and confusing, so it will not be provided here. Interestingly enough, the Mean Value Theorem is actually just a special case of Taylor’s Theorem, with n = 0. Taylor’s Theorem For each x in the interval on which 𝑓(𝑥) is differentiable through order n + 1 in an interval containing c, then for each x in the interval there exists z in [x, c] such that the difference between 𝑓(𝑥) and the Taylor polynomial approximation is 𝑓 (𝑛+1) (𝑧) (𝑥 − 𝑐)𝑛+1 𝑅𝑛 (𝑥) = (𝑛 + 1)! Lagrange Error Bound |𝑅𝑛 (𝑥)| ≤ max |𝑓 (𝑛+1) (𝑧)| |𝑥 − 𝑐|𝑛+1 (𝑛 + 1)! Essentially, the error will be less than the maximum of the next term in the polynomial approximation. This will be demonstrated in the example below. Example 4 Graphical Graph the function ex and three polynomial approximations and find the error for the first-degree polynomial approximation. The function ex is in black, the zeroth-degree Maclaurin polynomial is in yellow, the first-degree Maclaurin polynomial is in orange, and the second-degree Maclaurin polynomial is in red. 𝑃1 (𝑥) = 1 + 𝑥 𝑃2 (𝑥) = 1 + 𝑥 + 𝑥2 2 The maximum possible error for 𝑃1 (𝑥) at x = 1 would be the next term in the polynomial, so it would be 𝑥2 2 = 1 2 Taylor Series A Taylor series is a Taylor polynomial that perfectly represents a function. It is essentially the ∞th-degree Taylor polynomial. A Maclaurin series is a Taylor series at c = 0. Taylor Series for f(x) at c ∞ 𝑓 (𝑛) (𝑐) 𝑓 (𝑛) (𝑐) 𝑛 ′ (𝑐)(𝑥 (𝑥 (𝑥 − 𝑐)𝑛 𝑓(𝑥) = ∑ − 𝑐) = 𝑓(𝑐) + 𝑓 − 𝑐) + ⋯ + 𝑛! 𝑛! 𝑛=0 A Taylor series is a power series; therefore, they can be tested for convergence. A Taylor series will converge on an interval if the Lagrange remainder is 0 ( lim 𝑅𝑛 = 0) on that interval. 𝑛→∞ Maclaurin Series for Elementary Functions You should try to memorize or easily be able to derive these series. The value of this is that more complicated functions will usually be in a form similar to one or more of these basic functions. The following example illustrates how you can use these basic series to generate more complicated ones. Example 5 Free Response Write out the Maclaurin series for sin x use it to find the Maclaurin series for sin 𝑥 2 . The Taylor series for sin x is (−1)𝑛 𝑥 2𝑛+1 𝑥3 𝑥5 sin 𝑥 = 𝑥 − + − ⋯ + (2𝑛 + 1)! 3! 5! To find the series for sin x2, we can simply replace x in the series for sin x with x2 to generate the new series, which is a lot easier than having to generate the new series from scratch. (−1)𝑛 𝑥 4𝑛+2 𝑥 6 𝑥10 sin 𝑥 2 = 𝑥 2 − + − ⋯+ (2𝑛 + 1)! 3! 5! Operations with Series Series can be added and subtracted but not multiplied or divided. To find a series that is the result of one or more of these operations, perform the operations on the individual terms, ensure that you have collected all of the terms of the same degree (i.e. all of the x2 terms), and see if you can spot a general pattern to generate each term. Alternatively, just perform the operations on the general terms. Example 6 Differentiation of a Series Find the general term for the Maclaurin series for ∞ 𝑓(𝑥) = ln 𝑥 = ∑ 𝑛=0 1 𝑥 using the series for ln x. (−1)𝑛−1 (𝑥 − 1)𝑛 𝑛 ∞ ∞ ∞ 𝑛=0 𝑛=1 𝑛=0 (−1)𝑛−1 (𝑥 − 1)𝑛−1 (𝑛) 1 𝑓′(𝑥) = ∑ = ∑(−1)𝑛−1 (𝑥 − 1)𝑛−1 = ∑(−1)𝑛 (𝑥 − 1)𝑛 = 𝑛 𝑥 To differente (or integrate a series) simply differentiate or integrate the general term or every term you have written out. History and Applications As with most of mathematics, the history of Taylor series can be traced back to the Greeks. Archimedes was the first to mathematically prove that an infinite number of smaller parts could be added to create a finite sum through his method of exhaustion, which involved inscribing polygons with progressively more sides inside a shape to find its area (or rather, an approximation that is arbitrarily close to the actual area). This applies to Taylor series, which utilize infinite sums of terms that get smaller and smaller in order to create an approximation that differs from the actual values of these functions by an infinitesimally small amount. In the 1300s, Indian mathematician Madhava found Taylor series for special cases, including the basic trigonometric functions. He also founded the Kerala School, which continued to find more series and approximations. (Collins) In the 1600s, Scottish mathematician James Gregory found more Maclaurin series. However, English mathematician Brook Taylor was the first to find a general method for generating his eponymous series, in 1715. Later in the 1700s, Scottish mathematician Colin Maclaurin further worked extensively on special cases of the Taylor series centered at 0, causing those special cases to be named for him. Brook Taylor Taylor series have many applications in calculus in higher mathematics. However, very little “real world” usage of these series can be found. The most prominent use of these series is probably their use in approximating values of functions for calculators, allowing for scientists, engineers, and mathematicians to do their work that does affect the real world. Works Cited Collins, J. (n.d.). Background of Taylor Series. Retrieved June 9, 2011, from MA10126 Project - Taylor Series: http://people.bath.ac.uk/jpc21/background.html Larson, R., Hostetler, R. P., & Edwards, B. H. (2006). Calculus with Analytic Geometry. New York: Houghton Mifflin Company. Weisstein, E. W. (n.d.). Taylor Series. Retrieved June 9, 2011, from MathWorld--A Wolfram Web Resource: http://mathworld.wolfram.com/TaylorSeries.html Exercises Analytical Taylor Polynomials 1. Find the third-degree Taylor polynomial for ln 𝑥 centered at 1. 𝜋 2. Find the fourth-degree Taylor polynomial for sin 𝑥 centered at . 4 3. Find the fifth-degree Maclaurin polynomial for 1 . 𝑥−1 4. Find the second-degree Taylor polynomial for 𝑥 2 𝑒 2𝑥 centered at 1. Approximations 5. Approximate the value of cos 4 using the fifth-degree Taylor polynomial centered at 𝜋. 6. Use the polynomial from example 1 to find the approximation for 𝑓(1.1). 7. Use the polynomial from example 4 to find the approximation for 𝑓(2). Error 8. Find the error bound for the approximation for 𝑓(3) using the sixth-degree Maclaurin polynomial for 𝑓(𝑥) = 𝑒 𝑥 and compare to the actual error (found using a calculator). 9. Find the error bound for the approximation in example 5. Taylor Series 10. Find the general term for the Maclaurin series for 𝑓(𝑥) = ln 𝑥 − sin 𝑥. 2 11. Find the general term for the Taylor series for 𝑓(𝑥) = 𝑒 𝑥 centered at 1. Multiple Choice ∞ 1. ∑ 𝑛=0 (−1)𝑛 𝑥 2𝑛 is the Taylor series for (2𝑛)! A) sin x B) cos x C) log x D) 1 1+𝑥 E) arctan x 2. The coefficient for 𝑥 7 in the Maclaurin series for sin 𝑥 is A) 1 B) 7 1 7! C) 0 D) 1 1 E) − 7! 6! 3. The fourth-degree Maclaurin polynomial for cos 𝑥 3 is A) 1 − 𝑥5 𝑥6 2! + 𝑥8 4! B) 1 − 𝑥6 2 + 𝑥8 4 C) 𝑥 3 − 𝑥9 3! + 𝑥 15 5! D) 1 − 𝑥 2 + 𝑥 4 E) 𝑥 − 𝑥 3 + 4. What is the approximation for cos 2 obtained with the fifth-degree Maclaurin polynomial? A) 0 B) 1 C) 0.333 D) 0.933 E) –0.333 ∞ 5. If ∑ 𝑛=0 A) e (−1)𝑛−1 (𝑥 − 1)𝑛 is a Maclaurin series that converges to 𝑓(𝑥), what is 𝑓 ′ (1)? 𝑛 B) –1 C) 0 D) 1 E) Does not exist Free Response 2 Let 𝑓 be a function such that 𝑓(𝑥) = 𝑒 −𝑥 . Let 𝑃(𝑥) be the fifth-degree Maclaurin polynomial for 𝑓(𝑥). a. Write out the fifth-degree Maclaurin polynomial for 𝑒 𝑥 and use that to find 𝑃(𝑥) and a general term for the Taylor series that represents 𝑓(𝑥). 1 b. Use the Lagrange error bound to show that |𝑓(0.1) − 𝑃(0.1)| < 1000 2 c. Use 𝑃(𝑥) to approximate ∫0 𝑓(𝑥) 𝑑𝑥.