Formulas for the Remainder Term in Taylor Series In Section 8.7 we considered functions f with derivatives of all orders and their Taylor series ϱ f ͑n͒͑a͒ ͑x Ϫ a͒n ͚ n! n0 The nth partial sum of this Taylor series is the nth-degree Taylor polynomial of f at a: Tn͑x͒ f ͑a͒ ϩ f Ј͑a͒ f Љ͑a͒ f ͑n͒͑a͒ ͑x Ϫ a͒ ϩ ͑x Ϫ a͒2 ϩ и и и ϩ ͑x Ϫ a͒n 1! 2! n! We can write f ͑x͒ Tn͑x͒ ϩ Rn͑x͒ where Rn͑x͒ is the remainder of the Taylor series We know that f is equal to the sum of its Taylor series on the interval x Ϫ a Ͻ R if we can show that lim n l ϱ Rn͑x͒ for x Ϫ a Ͻ R Here we derive formulas for the remainder term Rn͑x͒ The first such formula involves an integral Խ Խ Խ Խ Theorem If f ͑nϩ1͒ is continuous on an open interval I that contains a, and x is in I , then Rn͑x͒ n! y x a ͑x Ϫ t͒ n f ͑nϩ1͒͑t͒ dt Proof We use mathematical induction For n 1, R1͑x͒ f ͑x͒ Ϫ T1͑x͒ f ͑x͒ Ϫ f ͑a͒ Ϫ f Ј͑a͒͑x Ϫ a͒ and the integral in the theorem is xax ͑x Ϫ t͒ f Љ͑t͒ dt To evaluate this integral we integrate by parts with u x Ϫ t and dv f Љ͑t͒ dt, so du Ϫdt and v f Ј͑t͒ Thus y x a x ͑x Ϫ t͒ f Љ͑t͒ dt ͑x Ϫ t͒ f Ј͑t͔͒ tx ta ϩ y f Ј͑t͒ dt a Ϫ ͑x Ϫ a͒ f Ј͑a͒ ϩ f ͑x͒ Ϫ f ͑a͒ (by FTC 2) f ͑x͒ Ϫ f ͑a͒ Ϫ f Ј͑a͒͑x Ϫ a͒ R1͑x͒ The theorem is therefore proved for n Now we suppose that Theorem is true for n k, that is, Rk ͑x͒ k! y x a ͑x Ϫ t͒k f ͑kϩ1͒͑t͒ dt We want to show that it’s true for n k ϩ 1, that is Rkϩ1 ͑x͒ ͑k ϩ 1͒! y x a ͑x Ϫ t͒kϩ1 f ͑kϩ2͒͑t͒ dt ■ FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES Again we use integration by parts, this time with u ͑x Ϫ t͒ kϩ1 and dv f ͑kϩ2͒͑t͒ Then du Ϫ͑k ϩ 1͒͑x Ϫ t͒ k dt and v f ͑kϩ1͒͑t͒, so ͑k ϩ 1͒! y x a ͑x Ϫ t͒kϩ1 f ͑kϩ2͒͑t͒ dt ͬ ͑x Ϫ t͒ kϩ1 f ͑kϩ1͒͑t͒ ͑k ϩ 1͒! 0Ϫ Ϫ tx ϩ ta kϩ1 ͑k ϩ 1͒! 1 ͑x Ϫ a͒ kϩ1 f ͑kϩ1͒͑a͒ ϩ ͑k ϩ 1͒! k! x y ͑x Ϫ t͒ k a x y ͑x Ϫ t͒ a k f ͑kϩ1͒͑t͒ dt f ͑kϩ1͒͑t͒ dt f ͑kϩ1͒͑a͒ ͑x Ϫ a͒ kϩ1 ϩ Rk ͑x͒ ͑k ϩ 1͒! f ͑x͒ Ϫ Tk͑x͒ Ϫ f ͑kϩ1͒͑a͒ ͑x Ϫ a͒ kϩ1 ͑k ϩ 1͒! f ͑x͒ Ϫ Tkϩ1͑x͒ Rkϩ1 ͑x͒ Therefore, (1) is true for n k ϩ when it is true for n k Thus, by mathematical induction, it is true for all n To illustrate Theorem we use it to solve Example in Section 8.7 EXAMPLE Find the Maclaurin series for sin x and prove that it represents sin x for all x SOLUTION We arrange our computation in two columns as follows: f ͑x͒ sin x f ͑0͒ f Ј͑x͒ cos x f Ј͑0͒ f Љ͑x͒ Ϫsin x f Љ͑0͒ f ٞ͑x͒ Ϫcos x f ٞ͑0͒ Ϫ1 f ͑4͒͑x͒ sin x f ͑4͒͑0͒ Since the derivatives repeat in a cycle of four, we can write the Maclaurin series as follows: f ͑0͒ ϩ f Ј͑0͒ f Љ͑0͒ f ٞ͑0͒ xϩ x ϩ x ϩ иии 1! 2! 3! xϪ ϱ x3 x5 x7 x 2nϩ1 ϩ Ϫ ϩ и и и ͚ ͑Ϫ1͒n 3! 5! 7! ͑2n ϩ 1͒! n0 With a in Theorem 1, we have Rn͑x͒ n! y x ͑x Ϫ t͒n f ͑nϩ1͒͑t͒ dt FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES ■ Խ Խ Since f ͑nϩ1͒͑t͒ is Ϯsin t or Ϯcos t, we know that f ͑nϩ1͒͑t͒ ഛ for all t We use the fact that, for a ഛ b, Խ y b a Խ f ͑t͒ dt ഛ y b a Խ f ͑t͒ Խ dt Thus, for x Ͼ 0, Խ Խ R ͑x͒ Խ n! y n ഛ n! x y x Խ ͑x Ϫ t͒n f ͑nϩ1͒ ͑t͒ dt ഛ ͑x Ϫ t͒n dt n! y x Խ Խ ͑x Ϫ t͒n f ͑nϩ1͒ ͑t͒ dt x nϩ1 x nϩ1 n! n ϩ ͑n ϩ 1͒! For x Ͻ we can write Rn͑x͒ Ϫ so Խ Խ Rn͑x͒ ഛ n! Խy Խ x xϪt ԽԽ n n! y x ͑x Ϫ t͒n f ͑nϩ1͒͑t͒ dt Խ f ͑nϩ1͒ ͑t͒ dt ഛ n! y x ͑t Ϫ x͒n dt ͑Ϫx͒ nϩ1 ͑n ϩ 1͒! Thus, in any case, we have x Խ R ͑x͒ Խ ഛ ͑nԽ ϩԽ 1͒! nϩ1 n The right side of this inequality approaches as n l ϱ (see Equation 8.7.10), so Rn͑x͒ l by the Squeeze Theorem It follows that Rn͑x͒ l as n l ϱ, so sin x is equal to the sum of its Maclaurin series Խ Խ For some purposes the integral formula in Theorem is awkward to work with, so we are going to establish another formula for the remainder term To that end we need to prove the following generalization of the Mean Value Theorem for Integrals (see Section 6.4) Weighted Mean Value Theorem for Integrals If f and t are continuous on ͓a, b͔ and t does not change sign in ͓a, b͔, then there exists a number c in ͓a, b͔ such that y b a b f ͑x͒t͑x͒ dx f ͑c͒ y t͑x͒ dx a Proof Because t doesn’t change sign, either t͑x͒ ജ or t͑x͒ ഛ for a ഛ x ഛ b For the sake of definiteness, let’s assume that t͑x͒ ജ By the Extreme Value Theorem (4.2.3), f has an absolute minimum value m and an absolute maximum value M , so m ഛ f ͑x͒ ഛ M for a ഛ x ഛ b Since t͑x͒ ജ 0, we have mt͑x͒ ഛ f ͑x͒t͑x͒ ഛ Mt͑x͒ aഛxഛb ■ FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES and so b b b m y t͑x͒ dx ഛ y f ͑x͒t͑x͒ dx ഛ M y t͑x͒ dx a a a If xab t͑x͒ dx 0, these inequalities show that xab f ͑x͒t͑x͒ dx and so Theorem is true because both sides of the equation are If xab t͑x͒ dx 0, it must be positive and we can divide by xab t͑x͒ dx in (3): mഛ xab f ͑x͒t͑x͒ dx xab t͑x͒ dx ഛM Then, by the Intermediate Value Theorem (2.4.10), there exists a number c in ͓a, b͔ such that f ͑c͒ xab f ͑x͒t͑x͒ dx xab t͑x͒ dx y and so b a b f ͑x͒t͑x͒ dx f ͑c͒ y t͑x͒ dx a Theorem If f ͑nϩ1͒ is continuous on an open interval I that contains a, and x is in I , then there exists a number c between a and x such that Rn͑x͒ f ͑nϩ1͒͑c͒ ͑x Ϫ a͒ nϩ1 ͑n ϩ 1͒! Proof The function t͑t͒ ͑x Ϫ t͒ n doesn’t change sign in the interval from a to x, so the Weighted Mean Value Theorem for Integrals gives a number c between a and x such that y x a x ͑x Ϫ t͒ n f ͑nϩ1͒͑t͒ dt f ͑nϩ1͒͑c͒ y ͑x Ϫ t͒ n dt a Ϫf ͑x Ϫ t͒ nϩ1 ͑c͒ nϩ1 ͑nϩ1͒ ͬ tx f ͑nϩ1͒͑c͒ ta ͑x Ϫ a͒ nϩ1 nϩ1 Then, by Theorem 1, Rn͑x͒ n! y x a ͑x Ϫ t͒ n f ͑nϩ1͒͑t͒ dt ͑nϩ1͒ ͑x Ϫ a͒ nϩ1 f ͑nϩ1͒͑c͒ f ͑c͒ ͑x Ϫ a͒ nϩ1 n! nϩ1 ͑n ϩ 1͒! The formula for the remainder term in Theorem is called Lagrange’s form of the remainder term Notice that this expression Rn͑x͒ f ͑nϩ1͒͑c͒ ͑x Ϫ a͒ nϩ1 ͑n ϩ 1͒! is very similar to the terms in the Taylor series except that f ͑nϩ1͒ is evaluated at c instead of at a All we can say about the number c is that it lies somewhere between x and a In the following example we show how to use Lagrange’s form of the remainder term as an alternative to the integral form in Example FORMULAS FOR THE REMAINDER TERM IN TAYLOR SERIES ■ EXAMPLE Prove that Maclaurin series for sin x represents sin x for all x SOLUTION Using the Lagrange form of the remainder term with a 0, we have Rn͑x͒ f ͑nϩ1͒͑c͒ nϩ1 x ͑n ϩ 1͒! where f ͑x͒ sin x and c lies between and x But f ͑nϩ1͒͑c͒ is Ϯsin c or Ϯcos c In any case, f ͑nϩ1͒͑c͒ ഛ and so Խ Խ f ͑c͒ x Խ R ͑x͒ Խ Խ͑n ϩ 1͒!Խ Խ x Խ ഛ ͑nԽ ϩԽ 1͒! ͑nϩ1͒ nϩ1 nϩ1 n By Equation 8.7.10 the right side of this inequality approaches as n l ϱ, so Խ R ͑x͒ Խ l by the Squeeze Theorem It follows that R ͑x͒ l as n l ϱ, so sin x is n n equal to the sum of its Maclaurin series EXAMPLE 3 (a) Approximate the function f ͑x͒ s x by a Taylor polynomial of degree at a (b) How accurate is this approximation when ഛ x ഛ 9? SOLUTION f ͑x͒ s x x 1͞3 (a) f ͑8͒ f Ј͑x͒ 13 xϪ2͞3 f Ј͑8͒ 121 f Љ͑x͒ Ϫ29 xϪ5͞3 f Љ͑8͒ Ϫ144 Ϫ8͞3 f ٞ͑x͒ 10 27 x Thus the second-degree Taylor polynomial is T2 ͑x͒ f ͑8͒ ϩ f Ј͑8͒ f Љ͑8͒ ͑x Ϫ 8͒ ϩ ͑x Ϫ 8͒2 1! 2! ϩ 121 ͑x Ϫ 8͒ Ϫ 288 ͑x Ϫ 8͒2 The desired approximation is x Ϸ T2 ͑x͒ ϩ 121 ͑x Ϫ 8͒ Ϫ 288 ͑x Ϫ 8͒2 s (b) Using the Lagrange form of the remainder term we can write R2 ͑x͒ f ٞ͑c͒ 5͑x Ϫ 8͒3 Ϫ8͞3 ͑x Ϫ 8͒ ͑x Ϫ 8͒3 10 27 c 3! 3! 81c 8͞3 where c lies between and x In order to estimate the error we note that if ഛ x ഛ 9, then Ϫ1 ഛ x Ϫ ഛ 1, so x Ϫ ഛ and therefore x Ϫ ഛ Also, since x Ͼ 7, we have Խ Խ Խ Խ c 8͞3 Ͼ 8͞3 Ͼ 179 and so xϪ8 Խ R ͑x͒ Խ Խ81c Խ 8͞3 Ͻ 5ؒ1 Ͻ 0.0004 81 ؒ 179 Thus if ഛ x ഛ 9, the approximation in part (a) is accurate to within 0.0004