math.wiki
Calculus › Sequences and series in calculus › Taylor and Maclaurin series › The Taylor remainder and the Lagrange error bound
Open on the map
Calculus 2

The Taylor remainder and the Lagrange error bound

A Taylor polynomial gives a number. Without knowing the true value, how far off can that number be, and does adding terms forever give the function back?

Where you are 5 in Taylor and Maclaurin series

Why this exists

Lejla’s thermistor meter turns a resistance into a temperature, and on the way its chip needs e^{0.7}. The chip can only add and multiply, so it evaluates a Taylor polynomial of e^x. In Taylor polynomials the error of such a polynomial was watched by comparing with the true value, but the chip has no true value to compare with. It needs a guarantee computed from what is known in advance: “this polynomial is within 10^{-6}.”

A second gap is left by The common Maclaurin series. The series for \sin x converges for every x (Power series and the interval of convergence gives the radius), but convergence says nothing about what it converges to. This lesson closes both gaps with one formula for the error.

Definition

Day 1: the remainder and its bound

Let P_n be the Taylor polynomial of degree n of f about a. The remainder is

R_n(x) = f(x) - P_n(x)

so that f(x) = P_n(x) + R_n(x) exactly. Taylor’s theorem with the Lagrange form of the remainder: if f has derivatives through order n+1 on an open interval containing a and x, there is a number c between a and x with

R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x - a)^{n+1}

The remainder looks like the next term of the polynomial, except that the derivative is taken at an unknown point c instead of at a. Since c is unknown, what is used in practice is a bound. If \lvert f^{(n+1)}(t) \rvert \le M for every t between a and x, then

\lvert R_n(x) \rvert \le \frac{M}{(n+1)!}\lvert x - a \rvert^{n+1}

This is the Lagrange error bound.

Day 2: when a Taylor series equals its function

The nth partial sum of the Taylor series is P_n(x). So the series converges to f(x) exactly when R_n(x) \to 0 as n \to \infty.

Intuition

For n = 0 the theorem reads f(x) = f(a) + f'(c)(x - a), which is the mean value theorem. Taylor’s theorem is the same statement one level up: after the polynomial has used the first n derivatives at a, what is left is controlled by the next derivative somewhere along the way. A large (n+1)st derivative means the function bends away from its polynomial quickly; the (n+1)! and the power \lvert x - a \rvert^{n+1} say how much that bending can add up to over the distance from the center.

The formula also gives the remainder’s sign whenever the sign of f^{(n+1)} is known between a and x. That turns a polynomial into a floor or a ceiling for the function, as in Figure 1.

1 2 1 2 x y
y = x
y = \sin x
\displaystyle y = x - \frac{x^3}{6}
Figure 1The sign of the remainder traps \sin x between \displaystyle x - \frac{x^3}{6} and x for \displaystyle 0 \le x \le \frac{\pi}{2} (Example 4).

Results

Day 1: Taylor’s theorem and the error bound

Taylor’s theorem. If f^{(n+1)} exists on an open interval I containing a, then for every x in I with x \ne a there is c strictly between a and x with R_n(x) = \dfrac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}.

The Lagrange error bound. If \lvert f^{(n+1)}(t) \rvert \le M for all t between a and x, then \lvert R_n(x) \rvert \le \dfrac{M}{(n+1)!}\lvert x - a \rvert^{n+1}. If the bound on f^{(n+1)} holds on a whole interval \lvert x - a \rvert \le d, then \lvert R_n(x) \rvert \le \dfrac{M d^{n+1}}{(n+1)!} for every x in it.

Choosing M. M must be a proven bound over the whole stretch between a and x: the value f^{(n+1)}(a) alone is not enough (Exercise 10). Any proven larger number is allowed; a smaller M only sharpens the bound.

A zero coefficient. If the coefficient of (x-a)^{n+1} is 0, then P_{n+1} = P_n, so R_n = R_{n+1} and the bound may be taken with f^{(n+2)} and the power n + 2.

Day 2: convergence to the function

The criterion. The Taylor series of f about a converges to f(x) if and only if R_n(x) \to 0.

A limit that drives it. For every real x, \displaystyle \displaystyle\lim_{k \to \infty} \frac{\lvert x \rvert^k}{k!} = 0.

The common series. For every real x,

\begin{aligned} e^x &= \sum_{n=0}^{\infty} \frac{x^n}{n!}, \\ \sin x &= \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}, \\ \cos x &= \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} \end{aligned}

Bounded derivatives. If \lvert f^{(k)}(t) \rvert \le C for every k and every t in an interval around a, the Taylor series equals f on that interval (Exercise 19).

Two bounds compared. When a Taylor series at x is alternating with terms decreasing to 0, the Alternating series and their error bound also applies. For the common series at 0 the two bounds often coincide (Example 6). The alternating bound always gives the sign of the error; the Lagrange bound works without alternation and about any center.

Why it is true

Taylor’s theorem. Fix x \ne a in I and choose the number K with f(x) = P_n(x) + K(x-a)^{n+1}. Define

g(t) = f(t) - P_n(t) - K(t - a)^{n+1}

Since P_n^{(k)}(a) = f^{(k)}(a) for k = 0, 1, \ldots, n (Taylor polynomials) and every derivative of (t-a)^{n+1} of order at most n is 0 at a,

g(a) = g'(a) = \cdots = g^{(n)}(a) = 0

and g(x) = 0 by the choice of K. Each g^{(k)} with k \le n is differentiable on I, hence continuous. Now apply Rolle’s theorem (The mean value theorem) again and again. Since g(a) = g(x) = 0, there is c_1 strictly between a and x with g'(c_1) = 0. Since g'(a) = g'(c_1) = 0, there is c_2 strictly between a and c_1 with g''(c_2) = 0. After n + 1 steps there is c = c_{n+1} strictly between a and x with g^{(n+1)}(c) = 0. Because P_n has degree n, its (n+1)st derivative is 0, and

g^{(n+1)}(t) = f^{(n+1)}(t) - K(n+1)!

So K = \dfrac{f^{(n+1)}(c)}{(n+1)!}, which is the formula. The bound follows by replacing \lvert f^{(n+1)}(c) \rvert with M.

The limit. Fix x and take an integer N > 2\lvert x \rvert. For k > N, each extra factor \displaystyle \frac{\lvert x \rvert}{k} is less than \displaystyle \frac12, so

0 \le \frac{\lvert x \rvert^k}{k!} \le \frac{\lvert x \rvert^N}{N!}\left(\frac{1}{2}\right)^{k-N}

which tends to 0; squeezing gives the limit.

Sine and cosine. Every derivative of \sin or \cos is \pm\sin or \pm\cos, so M = 1 works for every n and every x:

\lvert R_n(x) \rvert \le \frac{\lvert x \rvert^{n+1}}{(n+1)!} \to 0

By the criterion, both Maclaurin series equal their functions at every real x. The case of e^x is Example 5.

Worked examples

Example 1

Day 1: Lejla’s meter and e to the 0.7

How many terms of the Maclaurin series of e^x guarantee e^{0.7} to within 10^{-6}?

Solution

Every derivative of e^x is e^x, which increases, so for t between 0 and 0.7, e^t \le e^{0.7}. That is the number being computed, so it cannot serve as M until it is bounded by something known: e^{0.7} < e^1 < 3. Take M = 3:

\lvert R_n(0.7) \rvert \le \frac{3 \cdot 0.7^{n+1}}{(n+1)!}
n + 1789
\displaystyle \frac{3 \cdot 0.7^{n+1}}{(n+1)!}4.9 \times 10^{-5}4.3 \times 10^{-6}3.3 \times 10^{-7}

The first entry below 10^{-6} is at n + 1 = 9, so n = 8: the nine terms through \displaystyle \frac{x^8}{8!}. Then P_8(0.7) \approx 2.0137526, and the true value e^{0.7} \approx 2.0137527 is 1.2 \times 10^{-7} away.

A sharper M does not save a term here. Once P_8 is known, e^{0.7} < 2.1 is proved, and M = 2.1 makes the n = 7 bound 3.0 \times 10^{-6}, still too big. The factorial, not M, does most of the work.

Example 2

Day 1: cosine of 0.4 and a zero coefficient

Bound the error of P_4(x) = 1 - \dfrac{x^2}{2} + \dfrac{x^4}{24} for \cos x at x = 0.4, and say whether P_4(0.4) is too big or too small.

Solution

The direct bound uses f^{(5)} = -\sin, with M = 1: \displaystyle \frac{0.4^5}{5!} \approx 8.5 \times 10^{-5}. But cosine is even, so its x^5 coefficient is 0 and P_5 = P_4. Hence R_4 = R_5, and Taylor’s theorem with n = 5 uses f^{(6)} = -\cos:

R_4(0.4) = R_5(0.4) = \frac{-\cos c}{6!}(0.4)^6

for some c in (0, 0.4). With M = 1, \displaystyle \lvert R_4(0.4) \rvert \le \frac{0.4^6}{720} \approx 5.69 \times 10^{-6}, fifteen times smaller than the direct bound. Since \displaystyle 0 < c < 0.4 < \frac{\pi}{2}, \cos c > 0 and the remainder is negative: P_4(0.4) = 0.9210667 is too big. Indeed \cos 0.4 \approx 0.9210610, and the error 5.67 \times 10^{-6} is almost the whole bound, because \cos c is close to 1.

Example 3

Day 1: Edin’s logarithm, and which end sets M

Edin’s meter stores \ln 4 and uses P_2(x) = \ln 4 + \dfrac{x-4}{4} - \dfrac{(x-4)^2}{32} for \ln x when 3 \le x \le 5. Bound the error at x = 5, at x = 3, and for every x in [3, 5].

Solution

The derivatives are \displaystyle \frac{1}{x}, \displaystyle -\frac{1}{x^2}, \displaystyle \frac{2}{x^3}, and the third, \displaystyle \frac{2}{t^3}, decreases as t grows. So its largest value on a stretch is at the left end.

At x = 5 the stretch is [4, 5], so \displaystyle M = \frac{2}{64} = \frac{1}{32} and \displaystyle \lvert R_2(5) \rvert \le \frac{1}{32 \cdot 3!} \cdot 1^3 = \frac{1}{192} \approx 0.0052.

At x = 3 the stretch is [3, 4], so \displaystyle M = \frac{2}{27}, and \displaystyle \lvert R_2(3) \rvert \le \frac{2}{27 \cdot 6} = \frac{1}{81} \approx 0.0123. The same distance from the center allows more than twice the error on the side where the derivative is larger.

For all of [3, 5], take \displaystyle M = \frac{2}{27} and d = 1: the error is at most \displaystyle \frac{1}{81} everywhere. The sign is known too: \displaystyle R_2(x) = \frac{2}{6c^3}(x - 4)^3 has the sign of x - 4. Check: P_2(5) \approx 1.6050 is below \ln 5 \approx 1.6094 by 0.0044, and P_2(3) \approx 1.1050 is above \ln 3 \approx 1.0986 by 0.0064.

Example 4

Day 1: trapping sine between two polynomials

Show that x - \dfrac{x^3}{6} \le \sin x \le x - \dfrac{x^3}{6} + \dfrac{x^5}{120} for 0 \le x \le \dfrac{\pi}{2}, and use it to trap \sin 0.9.

Solution

At x = 0 all three are 0. Take \displaystyle 0 < x \le \frac{\pi}{2}, so any c between 0 and x satisfies \displaystyle 0 < c < \frac{\pi}{2} and \cos c > 0.

Sine has no x^4 term, so \displaystyle P_4 = P_3 = x - \frac{x^3}{6}, and Taylor’s theorem with n = 4 uses f^{(5)} = \cos:

\sin x - \left(x - \frac{x^3}{6}\right) = \frac{\cos c}{120}x^5 > 0

With n = 6 (no x^6 term, so P_6 = P_5) it uses f^{(7)} = -\cos:

\sin x - P_5(x) = \frac{-\cos c'}{5040}x^7 < 0

for some c' in (0, x). These are the two inequalities. At x = 0.9,

0.7785 \le \sin 0.9 \le 0.78342075

a window of width 0.0049 that contains \sin 0.9 \approx 0.7833. Figure 1 shows the lower bound and the cruder upper bound \sin x \le x (from P_2 = P_1).

Example 5

Day 2: the series for e to the x equals e to the x, a second proof

Prove that \displaystyle e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} for every real x using the remainder.

Solution

Fix x. Every derivative of e^t is e^t, which increases. If x > 0, then e^t \le e^x between 0 and x; if x \le 0, then e^t \le 1 there. So M = e^{\max(x, 0)} serves for every n at once, and

\lvert R_n(x) \rvert \le e^{\max(x, 0)}\,\frac{\lvert x \rvert^{n+1}}{(n+1)!}

The first factor does not depend on n, and the second tends to 0 by the limit in Results. So R_n(x) \to 0 and the series equals e^x. The common Maclaurin series proved the same fact by showing the series times e^{-x} is constant; this proof needs nothing but derivatives, and it also says how many terms a given x needs. For fixed n the bound grows with \lvert x \rvert, so far from 0 many more terms are needed (Exercise 15).

Example 6

Day 2: Emina’s logarithms, two bounds compared

Emina needs \ln 1.2 and \ln 0.8 within 10^{-4} from \ln(1+x) = x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \cdots. Compare the Lagrange bound and the alternating series bound for each.

Solution

For f(t) = \ln(1+t), f^{(k)}(t) = \dfrac{(-1)^{k-1}(k-1)!}{(1+t)^k}, so \lvert f^{(n+1)}(t) \rvert = \dfrac{n!}{(1+t)^{n+1}}, which is largest where 1 + t is smallest.

For x = 0.2, on [0, 0.2] the largest value is n!, at t = 0:

\lvert R_n(0.2) \rvert \le \frac{n!}{(n+1)!}(0.2)^{n+1} = \frac{0.2^{n+1}}{n+1}

The series at 0.2 also alternates with terms \displaystyle \frac{0.2^k}{k} decreasing to 0, and its bound, the first omitted term, is the same number. At n = 3 it is \displaystyle \frac{0.0016}{4} = 4 \times 10^{-4}; at n = 4 it is \displaystyle \frac{0.00032}{5} = 6.4 \times 10^{-5}. So P_4(0.2) \approx 0.182267, an underestimate since the next term \displaystyle +\frac{x^5}{5} is positive (the Lagrange form agrees: f^{(5)} > 0). In fact \ln 1.2 \approx 0.182322.

For x = -0.2 every term \displaystyle -\frac{0.2^k}{k} is negative, so the alternating bound does not apply. The Lagrange bound does, with M taken at the far end t = -0.2, where 1 + t = 0.8:

\lvert R_n(-0.2) \rvert \le \frac{n!}{0.8^{n+1}} \cdot \frac{0.2^{n+1}}{(n+1)!} = \frac{0.25^{n+1}}{n+1}

At n = 4 this is 1.95 \times 10^{-4}, too big; at n = 5 it is 4.07 \times 10^{-5}. So P_5(-0.2) \approx -0.223131, and \ln 0.8 \approx -0.223144.

Example 7

Day 2: a series that converges, but not to its function

Let f(x) = e^{-1/x^2} for x \ne 0 and f(0) = 0. Show that every derivative of f at 0 is 0, and conclude that the Maclaurin series converges everywhere but equals f(x) only at x = 0.

Solution

The common Maclaurin series states this example and leaves the derivatives at 0 without proof; here is the proof, and what the remainder does.

Two facts. First, for x \ne 0, each derivative has the form \displaystyle f^{(k)}(x) = q_k\!\left(\frac{1}{x}\right)e^{-1/x^2} with q_k a polynomial: true for k = 0 with q_0 = 1, and differentiating that form by the product and chain rules,

\begin{aligned} &\left[-q_k'\!\left(\tfrac{1}{x}\right)\frac{1}{x^2} \right. \\ &\qquad \left. + \, q_k\!\left(\tfrac{1}{x}\right)\frac{2}{x^3}\right]e^{-1/x^2} \end{aligned}

is of the same form. Second, for every integer m \ge 0, \displaystyle \frac{1}{\lvert x \rvert^m}e^{-1/x^2} \to 0 as x \to 0: with \displaystyle u = \frac{1}{x^2} \to \infty it is u^{m/2}e^{-u}, and an exponential outgrows every power.

Now suppose f^{(k)}(0) = 0. From the definition of the derivative,

f^{(k+1)}(0) = \lim_{h \to 0} \frac{q_k\!\left(\frac{1}{h}\right)e^{-1/h^2}}{h} = 0

because each term of \displaystyle \frac{1}{h}q_k\!\left(\frac{1}{h}\right) is a constant times a power of \displaystyle \frac{1}{h}, and the second fact applies to each. By induction every f^{(k)}(0) = 0.

So every Taylor coefficient at 0 is 0: the series is 0 + 0x + 0x^2 + \cdots, which converges to 0 for every x. But f(x) > 0 for x \ne 0, so R_n(x) = f(x) for every n and does not tend to 0. Taylor’s theorem is not contradicted: it supplies a c with \displaystyle \frac{f^{(n+1)}(c)}{(n+1)!}x^{n+1} = e^{-1/x^2}, which only says that high derivatives of f are large somewhere near 0. The flatness is extreme: f(0.3) \approx 1.5 \times 10^{-5} (Figure 2).

−3 −2 −1 1 2 3 1 x y
y = e^{-1/x^2}
Figure 2e^{-1/x^2} is so flat at 0 that every derivative there is 0. Its Taylor series is the zero function, which meets the curve only at the origin (Example 7).

Boundaries

  • Derivatives must exist all the way. Taylor’s theorem needs f^{(n+1)} at every point between a and x. The bound is meaningless across a point where a derivative fails to exist.
  • M covers the whole stretch. The value of f^{(n+1)} at the center is not a bound (Exercise 10), and on one side of the center the derivative may be larger than on the other (Example 3).
  • c is not found, only shown to exist. The theorem gives no formula for c; it is used through bounds and signs.
  • Infinitely many derivatives are not enough. A function can have derivatives of every order, a Taylor series that converges everywhere, and still differ from that series at every x \ne 0 (Example 7). Equality needs R_n(x) \to 0, checked function by function.
  • The Lagrange bound can fail to prove a true equality. For \ln(1+x) with \displaystyle -1 < x < -\frac12 the bound grows without limit (Exercise 17), yet the series does equal \ln(1+x) there, because it comes from integrating the geometric series term by term on (-1, 1) (Representing functions as power series). Other forms of the remainder, not covered here, settle such cases.
  • The bound grows with distance. For fixed n it grows like \lvert x - a \rvert^{n+1}, so a polynomial is a good estimate only near its center.

Where this goes next

With the remainder in hand, Taylor and Maclaurin series can claim equality, not just convergence, for every common series. The binomial series adds the series for (1+x)^k. Using series to evaluate limits and integrals uses series to estimate definite integrals, where the error bounds of this lesson and of Alternating series and their error bound say how many terms are enough.

Exercises

Day 1: bounds and accuracy

  1. Bound the error of the Maclaurin polynomial P_3 of e^x at x = -0.4, and say whether P_3(-0.4) is above or below e^{-0.4}.
  2. Find the smallest degree of a Maclaurin polynomial of \sin x that the Lagrange bound guarantees within 10^{-5} of \sin 0.6.
  3. Find P_2 for f(x) = \dfrac{1}{x} about a = 2, and bound the error of P_2(2.3).
  4. In Taylor polynomials, the quadratic P_2 of \displaystyle \sqrt[4]{x} about 16 estimates \displaystyle \sqrt[4]{17}. Show that its error is less than 3 \times 10^{-5}.
  5. Find a degree n such that the Maclaurin polynomial P_n of e^x is within 10^{-4} of e^x for every x in \displaystyle \left[-\frac12, \frac12\right], using M = 2. Justify that M.
  6. A function has \lvert f^{(4)}(x) \rvert \le 5 on [1, 3]. Bound the error of its degree 3 Taylor polynomial about 2 at x = 2.4.
  7. For the function of Exercise 6, how close to 2 must x be for the bound to guarantee an error of at most 10^{-4}?

Day 1: reasoning

  1. Use Taylor’s theorem to show that e^x \ge 1 + x + \dfrac{x^2}{2} + \dfrac{x^3}{6} for every real x, with equality only at x = 0.
  2. Write out Taylor’s theorem for n = 0 and name it. Use it to show that \lvert \sin x - \sin y \rvert \le \lvert x - y \rvert for all real x and y.
  3. A claim: “In the Lagrange bound, M = \lvert f^{(n+1)}(a) \rvert will do.” Refute it with f(x) = e^x, a = 0, n = 1, x = 1.

Day 2: convergence and comparing bounds

  1. Prove that the Taylor series of \cos x about any center a converges to \cos x for every real x.
  2. How many terms of x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \cdots guarantee \ln 1.3 within 10^{-3}? Give both bounds, the estimate, and its side.
  3. Bound the error of P_3(-0.3) as an estimate of \ln 0.7, where P_3(x) = x - \dfrac{x^2}{2} + \dfrac{x^3}{3}. Why does the alternating series bound not apply?
  4. Estimate \cos 1.5 with P_6. Give the Lagrange bound, the alternating series bound, and the sign of the error.
  5. Using e < 3, find the smallest n for which the Lagrange bound guarantees \lvert e^{10} - P_n(10) \rvert < 1 for the Maclaurin polynomial of e^x.
  6. Let f(x) = e^{-1/x} for x > 0 and f(x) = 0 for x \le 0. Find f'(x) for x \ne 0, and compute f'(0) from the definition of the derivative. Granting that every derivative of f at 0 is 0 (the argument of Example 7 adapts), for which x does the Maclaurin series of f equal f(x)?

Day 2: reasoning

  1. For f(x) = \ln(1+x), show that the Lagrange bound proves R_n(x) \to 0 for \displaystyle -\frac12 \le x \le 1, and that for \displaystyle -1 < x < -\frac12 it grows without limit.
  2. Let g(x) = e^x + e^{-1/x^2} for x \ne 0 and g(0) = 1. Find the Maclaurin series of g and the function it converges to. What does this say about whether the derivatives at one point determine a function?
  3. Suppose \lvert f^{(k)}(t) \rvert \le C for every k and every t in an interval I around a. Prove that the Taylor series of f about a equals f(x) for every x in I.
Answers
  1. \displaystyle \lvert R_3(-0.4) \rvert \le \frac{0.4^4}{24} \approx 0.00107, and P_3(-0.4) is below. On [-0.4, 0], e^t \le 1, so M = 1. P_3(-0.4) = 1 - 0.4 + 0.08 - 0.010\overline{6} \approx 0.669333; \displaystyle R_3 = \frac{e^c}{24}x^4 > 0, so the polynomial underestimates. (Indeed e^{-0.4} \approx 0.670320.)
  2. Degree 5: \displaystyle x - \frac{x^3}{6} + \frac{x^5}{120}. With M = 1, P_3 = P_4 is bounded by \displaystyle \frac{0.6^5}{5!} = 6.48 \times 10^{-4}, too big; P_5 = P_6 is bounded by \displaystyle \frac{0.6^7}{7!} \approx 5.55 \times 10^{-6}.
  3. \displaystyle P_2(x) = \frac12 - \frac{x-2}{4} + \frac{(x-2)^2}{8}, P_2(2.3) = 0.43625, error at most 0.0016875. \displaystyle f'''(t) = -\frac{6}{t^4}, largest in size at t = 2 on [2, 2.3]: \displaystyle M = \frac{3}{8}, so \displaystyle \frac{3/8}{6}(0.3)^3 = 0.0016875. (True \displaystyle \frac{1}{2.3} \approx 0.434783.)
  4. \displaystyle f'''(x) = \frac{21}{64}x^{-11/4}, decreasing, so on [16, 17] \displaystyle M = \frac{21}{64} \cdot 2^{-11}, and the bound is \displaystyle \frac{M}{3!} \cdot 1^3 = \frac{7}{262{,}144} \approx 2.67 \times 10^{-5} < 3 \times 10^{-5}.
  5. n = 5. On \displaystyle \left[-\frac12, \frac12\right], e^t \le e^{1/2} < 2 because e < 4. The bound \displaystyle \frac{2(1/2)^{n+1}}{(n+1)!} is 5.2 \times 10^{-4} at n = 4 and 4.34 \times 10^{-5} at n = 5.
  6. \displaystyle \frac{5}{4!}(0.4)^4 = \frac{2}{375} \approx 0.00533.
  7. \lvert x - 2 \rvert \le 0.148. Need \displaystyle \frac{5}{24}\lvert x - 2 \rvert^4 \le 10^{-4}, so \lvert x - 2 \rvert \le (4.8 \times 10^{-4})^{1/4} \approx 0.14802.
  8. With n = 3, \displaystyle e^x - P_3(x) = \frac{e^c}{24}x^4 for some c between 0 and x. Since e^c > 0 and x^4 \ge 0, the difference is at least 0, and it is 0 only when x = 0.
  9. f(x) = f(a) + f'(c)(x - a) with c between a and x: the mean value theorem. With f = \sin, \sin x - \sin y = \cos c\,(x - y) and \lvert \cos c \rvert \le 1 (for x = y both sides are 0).
  10. The claim gives M = e^0 = 1 and bound \displaystyle \frac{1}{2!} \cdot 1^2 = \frac12. But \displaystyle R_1(1) = e - 2 \approx 0.718 > \frac12. The derivative e^t grows to e on [0, 1], and M must cover that.
  11. Every derivative of \cos is \pm\sin or \pm\cos, bounded by 1 everywhere, so \displaystyle \lvert R_n(x) \rvert \le \frac{\lvert x - a \rvert^{n+1}}{(n+1)!}. By the limit in Results with x - a in place of x, this tends to 0.
  12. Four terms (n = 4); both bounds equal \displaystyle \frac{0.3^5}{5} = 4.86 \times 10^{-4}; P_4(0.3) = 0.261975, an underestimate. On [0, 0.3], M = n! as in Example 6, so both bounds are \displaystyle \frac{0.3^{n+1}}{n+1}, which is 0.002025 at n = 3. The next term \displaystyle +\frac{x^5}{5} is positive. (\ln 1.3 \approx 0.262364.)
  13. \displaystyle \lvert R_3(-0.3) \rvert \le \frac{(3/7)^4}{4} = \frac{81}{9604} \approx 0.00843. On [-0.3, 0], \displaystyle \lvert f^{(4)}(t) \rvert = \frac{6}{(1+t)^4} \le \frac{6}{0.7^4}, so the bound is \displaystyle \frac{6}{0.7^4} \cdot \frac{0.3^4}{24}. All terms at x = -0.3 are negative, so the series does not alternate. (P_3(-0.3) = -0.354, \ln 0.7 \approx -0.356675.)
  14. P_6(1.5) \approx 0.070117; both bounds \displaystyle \frac{1.5^8}{8!} \approx 6.36 \times 10^{-4}; the estimate is too small. P_7 = P_6 and \lvert f^{(8)} \rvert = \lvert \cos \rvert \le 1; the first omitted term is \displaystyle +\frac{x^8}{8!}; Lagrange agrees, since \displaystyle R_7 = \frac{\cos c}{8!}x^8 > 0 for \displaystyle 0 < c < 1.5 < \frac{\pi}{2}. (\cos 1.5 \approx 0.070737.)
  15. n = 34. With M = 3^{10} the bound is \displaystyle \frac{3^{10} \cdot 10^{n+1}}{(n+1)!}, about 2.0 at n = 33 and 0.57 at n = 34.
  16. \displaystyle f'(x) = \frac{1}{x^2}e^{-1/x} for x > 0, f'(x) = 0 for x < 0, and f'(0) = 0. From the left the difference quotient is \displaystyle \frac{0 - 0}{h} = 0. From the right it is \displaystyle \frac{e^{-1/h}}{h}; with \displaystyle u = \frac{1}{h} \to \infty this is u\,e^{-u} \to 0. The Maclaurin series is 0, so it equals f(x) exactly for x \le 0 and differs from it at every x > 0, where f(x) > 0.
  17. \displaystyle \lvert f^{(n+1)}(t) \rvert = \frac{n!}{(1+t)^{n+1}}. For 0 < x \le 1, M = n! and the bound \displaystyle \frac{x^{n+1}}{n+1} \le \frac{1}{n+1} \to 0. For -1 < x < 0, \displaystyle M = \frac{n!}{(1+x)^{n+1}} and the bound is \displaystyle \frac{1}{n+1}\left(\frac{\lvert x \rvert}{1+x}\right)^{n+1}. The ratio \displaystyle \frac{\lvert x \rvert}{1+x} is at most 1 exactly when -x \le 1 + x, that is \displaystyle x \ge -\frac12, and then the bound tends to 0. For \displaystyle x < -\frac12 the ratio exceeds 1, and a power of a number above 1 divided by n + 1 grows without limit.
  18. Every g^{(k)}(0) = 1 + 0 = 1 by Example 7, so the series is \displaystyle \sum \frac{x^n}{n!}, which converges to e^x. Since e^{-1/x^2} > 0, that differs from g(x) at every x \ne 0. Two different functions, e^x and g, have the same derivatives at 0, so derivatives at one point do not determine a function.
  19. For x in I, every t between a and x is in I, so M = C works for every n and \displaystyle \lvert R_n(x) \rvert \le C\frac{\lvert x - a \rvert^{n+1}}{(n+1)!}, which tends to 0 by the limit in Results. By the criterion, the series equals f(x).
unattributed · CC-BY-SA-4.0