Section 7.6: The Taylor Approximation Suppose that we want to approximate f (x) at x = a by a polynomial of degree n: f (x) ≈ Tn (x) = c0 + c1 (x − a) + c2 (x − a)2 + c3 (x − a)3 + c4 (x − a)4 + · · · + cn (x − a)n . To assure a good approximation near x = a, we require that f (a) = Tn (a) f 0 (a) = Tn0 (a) f 00 (a) = Tn00 (a) .. . (n) f (a) = Tn(n) (a). The higher derivatives of Tn (x) are Tn (x) Tn0 (x) Tn00 (x) Tn000 (x) = = = = .. . (n) Tn (x) = c0 + c1 (x − a) + c2 (x − a)2 + c3 (x − a)3 + c4 (x − a)4 + · · · + cn (x − a)n c1 + 2c2 (x − a) + 3c3 (x − a)2 + 4c4 (x − a)3 + · · · + nan (x − a)n−1 2c2 + 3(2)c3 (x − a) + 4(3)(x − a)2 + · · · + n(n − 1)an (x − a)n−2 3(2)c3 + 4(3)(2)c4 (x − a) + · · · + n(n − 1)(n − 2)an (x − a)n−3 n!an . Evaluating at x = a gives Tn (a) Tn0 (a) Tn00 (a) Tn000 (a) = = = = .. . (n) Tn (a) = It follows that the nth coefficient of Tn (x) is cn = c0 c1 2!c2 3!c3 n!cn . f (n) (a) . n! Definition: The nth degree Taylor polynomial for f (x) at x = a is given by Tn (x) = f (a) + f 0 (a)(x − a) + f 00 (a) f 000 (a) f (n) (a) (x − a)2 + (x − a)3 + · · · + (x − a)n . 2! 3! n! 1 Example: Find the nth degree Taylor polynomial for f (x) = ex at x = 0. Example: Find the nth degree Taylor polynomial for f (x) = sin x at x = 0. 2 Example: Find the nth degree Taylor polynomial for f (x) = cos x at x = 0. Example: Find the nth degree Taylor polynomial for f (x) = 3 1 at x = 0. 1−x Example: Find the third degree Taylor polynomial for f (x) = √ x at x = 4. Definition: If the nth degree Taylor polynomial Tn (x) is used to approximate f (x) at x = a, then the remainder of the approximation is Rn (x) = f (x) − Tn (x). How good is this approximation? How large should we take n to achieve a desired accuracy? These questions can be answered using Taylor’s Inequality. Theorem: (Taylor’s Inequality) If |f (n+1) (x)| ≤ M for |x − a| < R, then the remainder Rn (x) of the Taylor series satisfies |Rn (x)| ≤ M |x − a|n+1 . (n + 1)! 4 Example: Consider the function f (x) = ln x. (a) Find the third degree Taylor polynomial for f (x) at x = 3. (b) Use Taylor’s Inequality to estimate the accuracy of the approximation f (x) ≈ T3 (x) for 2 ≤ x ≤ 4. 5 Example: Determine the degree of the Taylor polynomial of f (x) = ln(x + 1) at x = 0 so that the approximation f (x) ≈ Tn (x) has error less than 0.01 on the interval [0, 0.1]. 6