advertisement

Taylor’s Theorem Theorem 1 (Taylor’s Theorem) Let a < b, n ∈ IN ∪ {0}, and f : [a, b] → IR. Assume that f (n) exists and is continuous on [a, b] and f (n+1) exists on (a, b). Let α ∈ [a, b] and define the Taylor polynomial of degree n with expansion point α to be Pn (x) = n X 1 (k) f (α) (x k! − α)k k=0 Then, for all x ∈ [a, b], f (x) = Pn (x) + Rn (α, x) where the error term Rn (α, x) is given by R x 1 (n+1) f (t) (x − t)n dt, if f (n+1) is integrable. (a) (integral form) Rn (α, x) = α n! (b) (Lagrange form) Rn (α, x) = and x. (c) (Cauchy form) Rn (α, x) = and x. (d) If r ∈ IN, then Rn (α, x) = α and x. (e) Rn (α, x) = 1 Q(n) (α)(x n! 1 (n+1) (c)(x (n+1)! f 1 (n+1) f (c) (x n! − c)n (x − α) for some c strictly between α 1 (n+1) (c) (x−c)n−r+1 (x−α)r rn! f − α)n+1 where ( Q(t) = Proof: by − α)n+1 for some c strictly between α f (t)−f (x) t−x ′ f (x) for some c strictly between if t 6= x if t = x Fix any evaluation and expansion points x, α ∈ [a, b]. Define the function S(t) f (x) = f (t) + (x − t)f ′ (t) + 12 (x − t)2 f ′′ (t) + · · · + 1 (x n! − t)n f (n) (t) + S(t) (1) Observe that substituting t = α into (1) gives f (x) = Pn (x) + S(α). So we wish to find Rn (α, x) = S(α) The function S(t) is determined by its derivative and its value at one point. Finding a value of S(t) for one value of t is easy. Substitute t = x into (1) to yield S(x) = 0. To find S ′ (t), apply ddt to both sides of (1). Recalling that x is just a constant parameter, 0 = f ′ (t) + − f ′ (t) + (x − t)f ′′ (t) + − (x − t)f ′′ (t) + 12 (x − t)2 f (3) (t) 1 1 + · · · + − (n−1)! (x − t)n−1 f (n) (t) + n! (x − t)n f (n+1) (t) + S ′ (t) = 1 n! (x − t)n f (n+1) (t) + S ′ (t) c Joel Feldman. 2014. All rights reserved. November 28, 2014 Taylor’s Theorem 1 so that 1 (n+1) f (t) (x − t)n S ′ (t) = − n! (a) By the fundamental theorem of calculus Z Z x ′ S (t) dt = S(α) = − S(x) − S(α) = − x α α 1 (n+1) f (t) (x n! − t)n dt (c) By the mean value theorem, there is a c strictly between α and x such that 1 (n+1) f (c) (x − c)n (α − x) S(α) = S(α) − S(x) = S ′ (c) (α − x) = − n! = 1 (n+1) (c) (x n! f − c)n (x − α) (b) By the generalized mean value theorem (see the notes entitled “The Mean Value Theorem”) with g(t) = (x − t)n+1 , there is a c strictly between α and x such that S(α) = S(α) − S(x) = S ′ (c) g ′ (c) g(α) − g(x) n+1 1 (n+1) 1 = − n! f (c) (x − c)n −(n+1)(x−c) n (x − α) = (n+1) 1 (c)(x (n+1)! f − α)n+1 Don’t forget, when computing g ′ (c), that g is a function of t with x just a fixed parameter. (d) By the generalized mean value theorem with g(t) = (x−t)r , there is a c strictly between α and x such that ′ (c) S(α) = S(α) − S(x) = Sg ′ (c) g(α) − g(x) r 1 (n+1) 1 = − n! f (c) (x − c)n −r(x−c) r−1 (x − α) = (n+1) 1 (c)(x rn! f − c)n−r+1 (x − α)r (e) We’ll only consider the case that x 6= α. For x = α, the error Rn (α, x) is obviously 1 Q(n) (α)(x − α)n+1 = 0 even if Q(n) (α) is zero and we’ll just take it as a convention that n! not defined. Since f is n times differentiable, so is Q(t), at least for all t 6= x. In particular Q(t) is n times differentiable at t = α. From the definition of Q we have that f (t) = f (x) + (t − x) Q(t) =⇒ f (α) = f (x) − (x − α) Q(α) f ′ (t) = Q(t) + (t − x) Q′ (t) =⇒ f ′ (α) = Q(α) − (x − α) Q′ (α) f (2) (t) = 2Q′ (t) + (t − x) Q(2) (t) .. . =⇒ f (2) (α) = 2Q′ (α) − (x − α) Q(2) (α) .. . f (k) (t) = kQ(k−1) (t) + (t − x) Q(k) (t) =⇒ f (k) (α) = kQ(k−1) (α) − (x − α) Q(k) (α) c Joel Feldman. 2014. All rights reserved. November 28, 2014 Taylor’s Theorem 2 for k ≤ n. So f (x) − P (x) = f (x) − f (α) − n X 1 (k) (α) (x k! f k=1 n n X = (x − α)Q(α) − − α)k (k−1) 1 (α) (x (k−1)! Q − α)k − 1 (k) (α) (x k! Q − α)k+1 k=1 o The sum telescopes leaving f (x) − P (x) = (n) 1 (α) (x n! Q − α)n+1 as desired. Remark 2 It is rarely necessary, or even possible, to evaluate Rn (α, x) exactly. It is usually sufficient to find a number M such that f (n+1) (c) ≤ M for all c between the expansion point α and the x of interest. Both parts (a) and (b) of Taylor’s Theorem then imply that |Rn (α, x)| ≤ 1 (n+1)! M |x − x0 |n+1 Example 3 (Sine and Cosine Series) The trigonometric functions sin x and cos x have widely used Taylor expansions about α = 0. Every derivative of sin x and cos x is one of ± sin x and ± cos x. Consequently, when we apply Theorem 1.b we always have (n+1) |x|n+1 f (c) ≤ 1 and hence |Rn (α, x)| ≤ (n+1)! . This converges to zero as n → ∞. Consequently, for both f (x) = sin x and f (x) = cos x, we have lim Rn (α = 0, x) = 0 and n→∞ h f (x) = lim f (0) + f ′ (0) x + · · · + n→∞ 1 (n) f (0) xn n! i First, compute all derivatives at general x. f (x) = sin x f ′ (x) = cos x f ′′ (x) = − sin x f (x) = cos x f ′ (x) = − sin x f ′′ (x) = − cos x f (3) (x) = − cos x f (4) (x) = sin x f (3) (x) = sin x f (4) (x) = cos x · · · ··· The pattern starts over again with the fourth derivative being the same as the original function. Now set x = α = 0. f (x) = sin x f (0) = 0 f ′ (0) = 1 f ′′ (0) = 0 f (3) (0) = −1 f (4) (0) = 0 · · · f (x) = cos x f (0) = 1 f ′ (0) = 0 f ′′ (0) = −1 f (3) (0) = 0 f (4) (0) = 1 · · · c Joel Feldman. 2014. All rights reserved. November 28, 2014 Taylor’s Theorem 3 For sin x, all even numbered derivatives are zero. The odd numbered derivatives alternate between 1 and −1. For cos x, all odd numbered derivatives are zero. The even numbered derivatives alternate between 1 and −1. We conclude that sin x = x − cos x = 1 − 1 3 x 3! 1 2 2! x + + 1 5 x 5! 1 4 4! x −··· = −··· = ∞ X n=0 ∞ X 1 (−1)n (2n+1)! x2n+1 (1) (−1) n 2n 1 (2n)! x n=0 If we wish to evaluate sin x or cos x for some specific value of x, we may always use trig identities like sin x = sin(x ± 2π) = − sin(x ± π) = cos π2 − x to reduce consideration to 0 ≤ x ≤ π4 < 1. Then the alternating series test tells us that the error introduced by truncating the series in (1) is between 0 and the first term dropped. That is, if 0 ≤ x ≤ 1, 1 3 x + sin x − x − 3! 1 2 cos x − 1 − 2! x + 1 5 5! x −···+ 1 4 4! x −···+ (−1)n−1 2n−1 (2n−1)! x (−1)n−1 2n−2 (2n−2)! x 2n+1 x is between 0 and (−1)n (2n+1)! 1 is between 0 and (−1)n (2n)! x2n This error decreases spectacularly quickly as n increases. For example 1 5! 1 9! ≈ 0.0083 ≈ 0.000003 1 6! 1 10! ≈ 0.0014 ≈ 0.00000028 1 7! 1 11! ≈ 0.0002 ≈ 0.000000025 1 8! 1 12! ≈ 0.000025 ≈ 0.000000002 Example 4 (Exponential Series) A similar phenomenon happens with the exponential function f (x) = ex . By Theorem 1.b, for all natural numbers n and all real numbers x, ex = 1 + x + 21 x2 + 1 3 3! x +···+ 1 n n! x + n+1 ec (n+1)! x for some c strictly between 0 and x. Now consider any fixed real number x. As c runs from 0 to x, ec runs from e0 = 1 to ex . In particular, ec is always between 1 and ex and so is smaller than 1 + ex . Thus the error term |Rn (0, x)| = |x|n+1 ec n+1 x ≤ [ex + 1] (n + 1)! (n + 1)! |x| Let’s call en (x) = (n+1)! . I claim that as n increases towards infinity, en (x) decreases (quickly) towards zero. To see this, let’s compare en (x) and en+1 (x). n+1 en+1 (x) = en (x) c Joel Feldman. 2014. All rights reserved. |x|n+2 (n+2)! |x| (n+1)! n+1 = |x| n+2 November 28, 2014 Taylor’s Theorem 4 (x) < 12 . That is, increasing the So, when n is bigger than, for example 2|x|, we have en+1 en (x) index on en (x) by one decreases the size of en (x) by a factor of at least two. As a result en (x) must tend to zero as n → ∞. Consequently lim Rn (0, x) = 0 and n→∞ h e = lim 1 + x + 21 x2 + x n→∞ c Joel Feldman. 2014. All rights reserved. 1 3 x 3! +···+ 1 n x n! November 28, 2014 i = ∞ X 1 n x n! n=0 Taylor’s Theorem 5