9 Infinite Series Copyright © Cengage Learning. All rights reserved. 9.7 Taylor Polynomials and Approximations Copyright © Cengage Learning. All rights reserved. Objectives Find polynomial approximations of elementary functions and compare them with the elementary functions. Find Taylor and Maclaurin polynomial approximations of elementary functions. Use the remainder of a Taylor polynomial. 3 Polynomial Approximations of Elementary Functions 4 Polynomial Approximations of Elementary Functions To find a polynomial function P that approximates another function f, begin by choosing a number c in the domain of f at which f and P have the same value. That is, The approximating polynomial is said to be expanded about c or centered at c. Geometrically, the requirement that P(c) = f(c) means that the graph of P passes through the point (c, f(c)). Of course, there are many polynomials whose graphs pass through the point (c, f(c)). 5 Polynomial Approximations of Elementary Functions The goal is to find a polynomial whose graph resembles the graph of f near this point. One way to do this is to impose the additional requirement that the slope of the polynomial function be the same as the slope of the graph of f at the point (c, f(c)). With these two requirements, you can obtain a simple linear approximation of f, as shown in Figure 9.10. Figure 9.10 6 Example 1 – First-Degree Polynomial Approximation of f(x) = ex For the function f(x) = ex, find a first-degree polynomial function P1(x) = a0 + a1x whose value and slope agree with the value and slope of f at x = 0. In other words, find the tangent line approximation to f(x) = ex at x = 0. Solution: Because f(x) = ex and f'(x) = ex, the value and the slope of f, at x = 0, are given by f(0) = e0 = 1 and f'(0) = e0 = 1. 7 Example 1 – Solution cont’d Because P1(x) = a0 + a1x, you can use the condition that P1(0) = f(0) to conclude that a0 = 1. Moreover, because P1'(x) = a1, you can use the condition that P1'(0) = f'(0) to conclude that a1 = 1. Therefore, P1(x) = 1 + x. Figure 9.11 shows the graphs of P1(x) = 1 + x and f(x) = ex. Figure 9.11 8 Example 1 – Solution cont’d P1(x) = 1 + x. Can we do better? Find P2(x), P3(x), and P4(x). Approximate e0.1 using P4(x). e0.1 P4 0.1 1.105170 Based on the observed pattern, Find Pn(x) for f(x) = ex around x=0. 1 2 1 3 1 n Pn x 1 x x x ... x 2 3! n! 9 Maclaurin Polynomials cont’d What would Pn(x) be for any f(x) around x=0. f 0 2 f 0 3 f n 0 n Pn x f 0 f 0 x x x ... x 2! 3! n! 10 Example 2 Find the Maclaurin polynomial of degree 6 for f(x) = cos x. Use the 6th degree polynomial to approximate cos (0.1). 1 2 1 4 1 6 P6 x 1 x x x 2! 4! 6! 11 Taylor and Maclaurin Polynomials 12 Taylor and Maclaurin Polynomials When approximating a function with a polynomial, we need all the derivative to agree. 1st derivatives – slopes agree at the point 2nd derivatives – curvature agrees at the point, etc. The polynomial approximation at x=c: Tangent line approximation: y f c f c x c At x=c, y=f (c) and At x=c, y f c How do we build a polynomial so that every derivative agrees? 13 Taylor and Maclaurin Polynomials If we want to build a quadratic approximation to y=f(x) at x=c, we need the following: y=f(c), 1st derivatives agree, and 2nd derivatives agree. y f 0 c x c 0 f c 2 f c x c x c 2 1 Ex: Find the quadratic approximation for f x sin x at x 1 P2 x 1 x 2 2 2 . 2 14 Taylor and Maclaurin Polynomials Taylor polynomials are named after the English mathematician Brook Taylor (1685–1731) and Maclaurin polynomials are named after the English mathematician Colin 15 Maclaurin (1698–1746). Example 3 Find the Taylor polynomial P4(x) for f(x) = ln x centered at c=1. Use it to estimate ln(1.2). P4 x x 1 1 1 1 2 3 4 x 1 x 1 x 1 2 3 4 16 Day 2 Remainder of a Taylor Polynomial 18 Taylor Polynomials Taylor Polynomial approximation at x=c: f c f c f n c 2 3 n Pn x f c f c x c x c x c ... x c 2! 3! n! Kth Taylor Polynomial of f(x) centered at x=c: k n 0 f n c n! x c n 19 Example 4 Find the 3rd Taylor polynomial for f(x) = sin x, expanded about c 6. 1 3 1 3 P3 x x x x 2 2 6 2 2! 6 2 3! 6 2 3 20 Remainder of a Taylor Polynomial An approximation technique is of little value without some idea of its accuracy. To measure the accuracy of approximating a function value f(x) by the Taylor polynomial Pn(x), you can use the concept of a remainder Rn(x), defined as follows. 21 Remainder of a Taylor Polynomial So, Rn(x) = f(x) – Pn(x). The absolute value of Rn(x) is called the error associated with the approximation. That is, The next theorem gives a general procedure for estimating the remainder associated with a Taylor polynomial. This important theorem is called Taylor’s Theorem, and the remainder given in the theorem is called the Lagrange form of the remainder. 22 Remainder of a Taylor Polynomial 23 Remainder of a Taylor Polynomial One useful consequence of Taylor’s Theorem is that n 1 xc Rn x max f n 1 z n 1! where f n 1 z is the maximum value of f n 1 z between x and c. For n=0, Taylors Theorem states that if f is differentiable in an interval containing c, then, for each x in the interval, there exists z between x and c such that: f x f c f z x c f x f c or f z xc 24 Example 8 – Determining the Accuracy of an Approximation The third Maclaurin polynomial for sin x is given by Use Taylor’s Theorem to approximate sin(0.1) by P3(0.1) and determine the accuracy of the approximation. Solution: Using Taylor’s Theorem, you have where 0 < z < 0.1. 25 Example 8 – Solution cont’d Therefore, Because f (4)(z) = sin z, it follows that the error |R3(0.1)| can be bounded as follows. This implies that the error is between 0 and 0.000004 26 From Harvard Series Booklet 27 Example 9 – Finding the upper bound for the error of an approximation Use Taylor’s Theorem to obtain an upper bound for the error of the approximation: 12 13 14 15 e 11 2! 3! 4! 5! 1 2 1 3 1 n Solution: f x e , Pn x 1 x x x ... x 2! 3! n! x f 6 z ez max on 0,1 e1. e1 6 e R5 x 1 0.00378 6! 720 28 Homework Day 1: pg.656 1-4 all, 13-29 odd, 41,43 Day 2: pg.657 45-51 odd, MMM pg.188-189 29