Taylor polynomials built by matching derivatives at a point, Taylor's theorem with remainder, estimating that remainder, and the distinction between a Taylor series converging and converging to the function it came from.
Subject: Calculus II · 73 slides · symbolic lesson
Open the interactive version of this deck
Title
Calculus II · Section 6.3
Any smooth function, rebuilt from its derivatives at one point
Objectives
Sections 6.1 and 6.2 found power series only for functions that look like a geometric series. This lesson finds the power series of almost any function you can differentiate, and tells you how far to trust it.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 561 — learning objectives 6.3.1 to 6.3.3
So far every power series you have met came from the geometric series: substitute, differentiate, integrate, and hope the function can be bent into the shape one over one minus something. That covers a surprising amount, but it cannot reach e to the x, or sine, or the cube root.
This lesson removes the restriction. If you can differentiate a function again and again at one point, you can write down its power series there, with no cleverness at all. The price is a new question: the series you build might not actually add up to the function, and even when it does, you usually stop after a few terms. So half of the lesson is about the error.
By the end you should be able to build any Taylor polynomial, say how accurate it is with a guaranteed number, choose a degree to hit a target accuracy, and explain why the exponential, sine and cosine equal their series everywhere.
Warm-up
Discussion prompt
From Sections 6.1 and 6.2: write the power series for one over one minus x with its interval, and then differentiate it term by term. What does the derivative series represent?
Write your answer before you reveal it. The geometric series is the one power series you know completely: its sum, its interval, and the fact that it really equals one over one minus x there.
The second line is the important habit. Inside its interval of convergence you may differentiate a power series term by term, and the result is a new power series with the same radius. Each differentiation knocks every exponent down by one and multiplies each term by its old exponent.
Keep your eye on what happens to the constant term when you differentiate: it disappears, and the old linear coefficient becomes the new constant. That single observation, repeated, is how you will read off every coefficient of a power series from derivatives in the next few slides.
Section
Part 1
Concept
Assume, for now, that f equals a power series centred at a. Forget convergence for a moment and ask what the coefficients would have to be.
\[ f(x) = c_0 + c_1(x-a) + c_2(x-a)^2 + c_3(x-a)^3 + \cdots \]
Put x equal to a
Why: Every term with a factor of x minus a vanishes.
\[ f(a) = c_0 + c_1 \cdot 0 + c_2 \cdot 0 + \cdots = c_0 \]
So the constant term is forced: it must be the value of f at the centre.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 561 — equation 6.4
This is a reverse-engineering argument. You do not yet know whether f has a power series; you pretend that it does and ask what the coefficients would be forced to be. If the answer is unique, you will have found the only possible candidate.
The trick is to evaluate at the centre. Every term except the first contains a factor of x minus a, and at x equal to a that factor is zero. The whole infinite tail collapses and only the constant term survives.
So the constant term has no choice: it must be f of a. This is exactly what you would want from an approximation anyway. Whatever else a good approximation of f near a does, it should at least give the right value at a.
Concept
\[ f'(x) = c_1 + 2c_2(x-a) + 3c_3(x-a)^2 + 4c_4(x-a)^3 + \cdots \]
\[ f'(a) = c_1 \]
\[ f''(x) = 2c_2 + 3\cdot 2\,c_3(x-a) + 4\cdot 3\,c_4(x-a)^2 + \cdots \]
\[ f''(a) = 2c_2 \;\Longrightarrow\; c_2 = \frac{f''(a)}{2} \]
\[ f'''(a) = 3\cdot 2\,c_3 \;\Longrightarrow\; c_3 = \frac{f'''(a)}{3\cdot 2} \]
Each differentiation lowers every power by one and brings the old exponent down as a multiplier. After n differentiations the nth coefficient has collected every whole number from n down to 1.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 561-562 — the derivation of the coefficients
Now repeat the trick with derivatives. Differentiate once and the old linear coefficient becomes the constant term, so evaluating at the centre picks it out: the first coefficient must equal the slope of f at a.
Differentiate again and something new appears. The x minus a squared term becomes two times c two, so matching the second derivative forces c two to be half of f double prime of a. The third derivative produces three times two times c three, so c three is the third derivative divided by six.
Look at the multipliers that pile up: two, then three times two, then four times three times two. Each differentiation brings the current exponent down as a factor. By the time the nth coefficient has become a constant, it has been multiplied by n, n minus 1, and so on down to 1. That product is n factorial, and it is why every Taylor coefficient is divided by a factorial.
Picture it
Figure (svg): Five curves on the same axes: y equals x to the fourth, 4x cubed, 12x squared, 24x, and the constant 24. All but the last pass through the origin; the horizontal line sits at height 24.
\[ \frac{d^4}{dx^4}(x-a)^4 = 4\cdot 3\cdot 2\cdot 1 = 4! \]
The term c four times x minus a to the fourth contributes nothing to the value or the first three derivatives at the centre, and exactly four factorial times c four to the fourth derivative. That factorial is what the coefficient must divide out.
The figure shows one term, x to the fourth, and its four derivatives. Each curve is steeper than the one before, and every one of them passes through the origin, except the last, which is the constant 24.
That is the whole story of the factorial. At the centre, the fourth-power term contributes nothing to the value, the slope, the second derivative or the third derivative; it only shows up in the fourth derivative, and there it shows up multiplied by four factorial.
So if you want the series to have the same fourth derivative as f at the centre, you must choose its coefficient to be the fourth derivative divided by 24. Leave out the factorial and your polynomial would have a fourth derivative 24 times too large. The same reasoning applies to every power, which is why the pattern is so rigid.
Concept
\[ c_n = \frac{f^{(n)}(a)}{n!} \]
\[ \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots \]
Taylor series (6.5) — If f has derivatives of all orders at a, this is the Taylor series for f at a. When the centre a is zero it is called the Maclaurin series.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 562 — definition and equation 6.5
Here is the result of the reverse engineering, written as a single formula. The nth coefficient is the nth derivative at the centre, divided by n factorial, and nothing else is possible.
Notice what the definition asks for: derivatives of all orders at a single point. Everything the series knows about f, it learns at a. It is remarkable that information at one point can ever reconstruct a function over a whole interval, and part four of this lesson will show it sometimes cannot.
The name Maclaurin series is used when the centre is zero. There is no new mathematics in it; it is simply the most common centre, because the powers of x are the simplest powers to work with. You will meet Maclaurin series for the exponential, sine and cosine in a few slides.
Notation
Annotate
On: \( \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}\,(x-a)^n \)
Step through the four notes in order. The first is the heart of it: the derivative is evaluated at a, so it is a number, not a function. Students sometimes leave the derivative as a function of x inside the series; then it is not a power series at all.
The factorial note connects back to the figure you just saw. Its only job is to cancel the multipliers that repeated differentiation produces, so that the series has exactly the right derivatives at the centre.
The last two notes are about reading the series as an approximation. Near a, the powers of x minus a are small, and higher powers are smaller still, so the early terms carry most of the weight. And the n equal to zero term is just f of a, since the zeroth derivative is the function itself and zero factorial is one.
Concept
Uniqueness of Taylor series (Theorem 6.6) — If f has a power series at a that converges to f on some open interval containing a, then that power series is the Taylor series for f at a.
\[ f(x) = \sum c_n(x-a)^n \text{ near } a \;\Longrightarrow\; c_n = \frac{f^{(n)}(a)}{n!} \]
So the series from Section 6.2, however it was found, must agree with the one built from derivatives. What the theorem does not promise is that the Taylor series converges to f at all; that question waits until Part 4.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 562 — Theorem 6.6
This theorem is short but it saves you a lot of work. It says that if a function has any power series representation at a, obtained by any method at all, then that series is the Taylor series. There cannot be two different power series for the same function about the same centre.
Here is why it matters. In Section 6.2 you found the series of arctangent or of the logarithm by integrating a geometric series. Uniqueness says those series are the Taylor series, so you can read derivatives off them without ever differentiating: the coefficient of x to the n times n factorial is the nth derivative at zero.
Be careful about what the theorem does not say. It assumes the function already has a power series converging to it. It does not promise that the Taylor series you build from derivatives will converge to f. That second question is harder, and it is settled by the remainder in part four.
Trap
Building the quadratic for e to the x at zero, a common first attempt:
\[ p_2(x) = 1 + x + x^2 \]
Wrong. The coefficient of x squared is f double prime over two factorial.
Differentiate the wrong answer twice: its second derivative is 2, but the exponential's is 1. Dividing by two factorial is exactly what makes the second derivatives agree.
\[ p_2(x) = 1 + x + \frac{x^2}{2} \]
This mistake comes from remembering the pattern of the coefficients but not their origin. For e to the x, every derivative at zero equals one, so it is tempting to make every coefficient one as well.
The quickest way to catch it is to differentiate your answer. A correct Taylor polynomial must reproduce the function's derivatives at the centre. The wrong quadratic has second derivative two at zero; the exponential has second derivative one. Dividing the x squared term by two factorial fixes that exactly.
Make the check a habit: after building any Taylor polynomial, differentiate it once or twice at the centre and see whether you recover the derivatives you started from. It takes ten seconds and catches the missing factorial every time.
Section
Part 2
Concept
\[ p_n(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \cdots + \frac{f^{(n)}(a)}{n!}(x-a)^n \]
nth Taylor polynomial — The nth partial sum of the Taylor series. It needs only n derivatives at a, and it matches f and its first n derivatives at a. At a equal to zero it is the nth Maclaurin polynomial.
| degree | what it matches at a | what it looks like |
|---|---|---|
| p₀ | the value | a horizontal line |
| p₁ | value and slope | the tangent line |
| p₂ | value, slope, bending | the best-fitting parabola |
| p₃ | … and how the bending changes | a cubic |
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 563 — definition of Taylor polynomials
In practice you never add infinitely many terms. You stop, and the partial sum you stop at is a polynomial: the nth Taylor polynomial. It is the polynomial of degree at most n that agrees with f in value and in its first n derivatives at the centre.
The table gives a geometric reading of the first few. Degree zero matches only the height, so it is a flat line. Degree one also matches the slope: it is the tangent line you used for linear approximation in Calculus One. Degree two also matches the curvature, so it bends the right way.
Each extra degree matches one more derivative, and each extra matched derivative makes the polynomial cling to the function over a slightly wider stretch around the centre. That is the picture to keep in mind for everything that follows.
Worked example
Find p0 through p3 for the natural logarithm at a equal to 1.
Differentiate three times
Why: Each derivative is a power of x.
\[ f = \ln x, \quad f' = x^{-1}, \quad f'' = -x^{-2}, \quad f''' = 2x^{-3} \]
Evaluate at the centre
Why: Every power of 1 is 1.
\[ f(1) = 0, \quad f'(1) = 1, \quad f''(1) = -1, \quad f'''(1) = 2 \]
Divide by the factorials
Why: Two over three factorial is one third.
\[ c_0 = 0, \quad c_1 = 1, \quad c_2 = -\tfrac12, \quad c_3 = \tfrac{2}{6} = \tfrac13 \]
Assemble the polynomials
Why: Each is the previous one plus one term.
\[ p_0 = 0, \quad p_1 = x - 1, \quad p_2 = (x-1) - \tfrac12(x-1)^2 \]
\[ p_3(x) = (x-1) - \tfrac12(x-1)^2 + \tfrac13(x-1)^3 \]
Figure (svg): The curve y equals ln x for x from 0.2 to 3.2, with its Taylor polynomials at 1: the flat line p0 equals 0, the tangent line p1, the parabola p2 and the cubic p3, all touching at the point (1, 0).
Check at x = 1.5
Why: The logarithm of 1.5 is 0.405465; the cubic gives 0.416667, and the quadratic 0.375. Close, and closer with more terms.
\[ p_3(1.5) = 0.5 - 0.125 + 0.041667 = 0.416667 \approx 0.405465 = \ln 1.5 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 563-564 — Example 6.11 and Figure 6.5
Follow the rhythm of the solution, because every Taylor polynomial problem has it: differentiate, evaluate at the centre, divide by the factorials, assemble. Here the logarithm has a clean pattern of derivatives because after the first one they are all powers of x.
The centre is 1 because the logarithm is not defined at zero, so it has no Maclaurin series. At 1 every power of x becomes 1, which makes the evaluation trivial. The third derivative is 2, and dividing by three factorial gives one third: the factorial cancels most of the growth in the derivatives.
In the figure, the flat line, the tangent line, the parabola and the cubic all pass through the point where the logarithm crosses the axis. Each one hugs the curve more closely near 1. The check at 1.5 shows the improvement in numbers: the quadratic is off by 0.03, the cubic by 0.011.
Worked example
\[ f(x) = \frac{1}{x^2} = x^{-2}, \quad a = 1 \]
Differentiate three times
Why: Power rule each time.
\[ f' = -2x^{-3}, \quad f'' = 6x^{-4}, \quad f''' = -24x^{-5} \]
Evaluate at 1
Why: Again every power of 1 is 1.
\[ f(1) = 1, \quad f'(1) = -2, \quad f''(1) = 6, \quad f'''(1) = -24 \]
Divide by the factorials
Why: Six over two is three; twenty-four over six is four.
\[ c_0 = 1, \quad c_1 = -2, \quad c_2 = \tfrac{6}{2} = 3, \quad c_3 = \tfrac{-24}{6} = -4 \]
Write the four polynomials
Why: Stop after the degree asked for.
\[ p_0 = 1, \quad p_1 = 1 - 2(x-1), \quad p_2 = p_1 + 3(x-1)^2 \]
\[ p_3(x) = 1 - 2(x-1) + 3(x-1)^2 - 4(x-1)^3 \]
Check at x = 1.1
Why: The true value is one over 1.21, which is 0.826446; the cubic gives 0.826.
\[ p_3(1.1) = 1 - 0.2 + 0.03 - 0.004 = 0.826 \approx 0.826446 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 564 — Checkpoint 6.10
Try this one yourself before revealing each line. The derivatives are all powers of x again, with the sign flipping every time and the size growing like a factorial: two, six, twenty-four.
The division is where the tidy pattern appears. Two over one factorial is two, six over two factorial is three, twenty-four over three factorial is four. The coefficients are just one, two, three, four with alternating signs, which is what you would get by differentiating the geometric series, as uniqueness predicts.
The check at 1.1 compares the cubic with the true value of one over 1.21. They agree to about four decimal places. Choosing a point close to the centre for a check is sensible: that is where a Taylor polynomial should be good, so a large disagreement there would reveal an arithmetic slip.
Prediction
\[ \ln 3 = 1.0986, \qquad p_1(3) = 2, \quad p_2(3) = 0, \quad p_3(3) = 2.6667 \]
Predict first
The Taylor polynomials of ln x at 1 are evaluated at x = 3, two units from the centre. What happens as the degree goes up?
Correct: They bounce around and get worse
Why: The values 2, 0, 2.667 overshoot, undershoot and overshoot by more each time. The next term, minus a quarter of 2 to the fourth, is minus 4. The series for ln x at 1 only converges out to distance 1 from the centre, so at x equal to 3 more terms make the approximation worse. Taylor polynomials are local.
Make a genuine prediction before you look at the answer. The natural expectation is that more terms always mean a better approximation, and the values at the top of the slide are there to test it.
They do not close in. The linear polynomial says 2, the quadratic says 0, the cubic says 2.67, and the next one would say minus 1.33. Each new term is bigger than the last, because at x equal to 3 the powers of x minus 1 are powers of 2, and they outgrow the one over n in the coefficients.
The lesson is that Taylor polynomials are local. They are built from information at the centre, and they are guaranteed to be good only near it. How near is controlled by the radius of convergence, which for the logarithm at 1 is exactly 1. Hold on to this example; it comes back in part five.
Worked example
Find p0 through p3 and the nth Maclaurin polynomial of e to the x.
Differentiate
Why: The exponential is its own derivative, every time.
\[ f^{(n)}(x) = e^x \quad \text{for every } n \]
Evaluate at zero
Why: e to the zero is one.
\[ f(0) = f'(0) = f''(0) = \cdots = f^{(n)}(0) = 1 \]
Divide by the factorials
Why: Each coefficient is one over n factorial.
\[ c_n = \frac{1}{n!} \]
Write the first four
Why: Add one term at a time.
\[ p_0 = 1, \quad p_1 = 1 + x, \quad p_2 = 1 + x + \frac{x^2}{2}, \quad p_3 = p_2 + \frac{x^3}{6} \]
Write the nth in sigma notation
Why: The pattern never changes.
\[ p_n(x) = 1 + x + \frac{x^2}{2!} + \cdots + \frac{x^n}{n!} = \sum_{k=0}^{n}\frac{x^k}{k!} \]
Figure (svg): The curve y equals e to the x from x equals minus 3 to 2.3, with the Maclaurin polynomials p0 equals 1, p1 equals 1 plus x, p2 and p3 drawn on top; all pass through (0, 1).
Check at x = 1
Why: The cubic gives 2.6667; e is 2.7183. The next term, one over 24, would add 0.0417 and close most of the gap.
\[ p_3(1) = 1 + 1 + 0.5 + 0.16667 = 2.66667 \approx 2.71828 = e \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 564-565 — Example 6.12a and Figure 6.6
This is the easiest Taylor computation there is, and one of the most important. Every derivative of e to the x is e to the x, so every derivative at zero is one, and the nth coefficient is simply one over n factorial.
Write the general polynomial in sigma notation as well as expanded. The sigma form makes the pattern impossible to forget and is the form you will need when you take a limit as n grows in part four.
In the figure the four polynomials crowd together near zero, all passing through the point zero, one. To the right they fall behind the exponential, which outgrows every polynomial. To the left the exponential flattens toward zero while the polynomials, dominated by their highest power, dive or climb. At x equal to 1 the cubic gives 2.667 against e, 2.718; adding more terms closes that gap very quickly, as you will see.
Worked example
Find the Maclaurin polynomials of sin x and the general pattern.
Differentiate four times
Why: After four derivatives you are back at the sine, so the cycle repeats.
\[ \sin x \to \cos x \to -\sin x \to -\cos x \to \sin x \]
Evaluate at zero
Why: Sine of zero is 0 and cosine of zero is 1.
\[ f(0) = 0, \quad f'(0) = 1, \quad f''(0) = 0, \quad f'''(0) = -1, \quad f^{(4)}(0) = 0 \]
Read the pattern
Why: Even derivatives vanish; odd ones alternate in sign.
\[ f^{(2m)}(0) = 0, \qquad f^{(2m+1)}(0) = (-1)^m \]
Build the polynomials
Why: The even-degree steps add nothing, so they repeat the odd one below.
\[ p_1 = p_2 = x, \quad p_3 = p_4 = x - \frac{x^3}{3!}, \quad p_5 = p_6 = x - \frac{x^3}{3!} + \frac{x^5}{5!} \]
Write the general one
Why: Only odd powers, alternating.
\[ p_{2m+1}(x) = p_{2m+2}(x) = \sum_{k=0}^{m}\frac{(-1)^k x^{2k+1}}{(2k+1)!} \]
Figure (svg): One and a bit periods of y equals sin x from minus 2 pi to 2 pi, with the Maclaurin polynomials p1 equals x, p3 and p5; each follows the sine wave further from the origin before breaking away.
Check at x = 1
Why: The quintic gives 0.841667 against sin 1, which is 0.841471: four correct digits from three terms.
\[ p_5(1) = 1 - \frac16 + \frac{1}{120} = 0.841667 \approx 0.841471 = \sin 1 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 565-566 — Example 6.12b and Figure 6.7
The derivatives of sine cycle with period four: sine, cosine, minus sine, minus cosine, and back to sine. At zero, the sines vanish and the cosines are plus or minus one. So half of the coefficients are zero, and the other half alternate in sign.
The even-numbered derivatives are the ones that vanish, which means only odd powers of x appear. That is no accident: sine is an odd function, and an odd function can only be built from odd powers. It also means consecutive polynomials come in equal pairs, p1 equals p2, p3 equals p4, and so on, because each even step adds a zero term.
In the figure, each odd degree adds another alternating term and follows the sine wave a little further before breaking away. The check at 1 shows how good even the quintic is: three nonzero terms give four correct decimal places. That efficiency is why calculators can evaluate sines with a handful of multiplications.
Worked example
Repeat for cos x.
Differentiate four times
Why: Again the cycle has length four.
\[ \cos x \to -\sin x \to -\cos x \to \sin x \to \cos x \]
Evaluate at zero
Why: Now the odd derivatives vanish.
\[ f(0) = 1, \quad f'(0) = 0, \quad f''(0) = -1, \quad f'''(0) = 0, \quad f^{(4)}(0) = 1 \]
Read the pattern
Why: Even derivatives alternate between 1 and minus 1.
\[ f^{(2m)}(0) = (-1)^m, \qquad f^{(2m+1)}(0) = 0 \]
Build the polynomials
Why: Odd-degree steps add nothing.
\[ p_0 = p_1 = 1, \quad p_2 = p_3 = 1 - \frac{x^2}{2!}, \quad p_4 = p_5 = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} \]
Write the general one
Why: Only even powers, alternating.
\[ p_{2m}(x) = p_{2m+1}(x) = \sum_{k=0}^{m}\frac{(-1)^k x^{2k}}{(2k)!} \]
Figure (svg): The curve y equals cos x from minus 2 pi to 2 pi, with the Maclaurin polynomials p0 equals 1, p2 equals 1 minus x squared over 2, and p4; all are symmetric about the vertical axis.
Check by differentiating
Why: The derivative of the cosine's p4 should be minus the sine's p3, because the derivative of cosine is minus sine. It is.
\[ \frac{d}{dx}\left(1 - \frac{x^2}{2} + \frac{x^4}{24}\right) = -x + \frac{x^3}{6} = -\left(x - \frac{x^3}{6}\right) \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 566-567 — Example 6.12c and Figure 6.8; the book's 'fourth derivative is sin x' should read cos x
This is the same cycle of four derivatives, shifted by one place. Now the odd derivatives vanish at zero, so only even powers appear, again matching the symmetry: cosine is an even function.
The book says the fourth derivative is sin x in this example; it is cos x, which is why the pattern repeats. Small misprints like this are common, and the best defence is to recompute every derivative yourself rather than trust a printed line.
The check on this slide is a different kind of check. Instead of plugging in a number, it uses a relationship you already know: the derivative of cosine is minus sine. Differentiating the cosine's quartic gives exactly minus the sine's cubic. When two Taylor computations agree with a known identity like that, you can be confident both are right.
Tweak it
Parameter explorer
The curve is the Maclaurin polynomial of sin x of degree n, drawn from −9 to 9. Slide n up from 1. How far from the origin does it look like a sine wave, and why does an even n change nothing?
\[ p_{{n}}(x) \approx \sin x \]
Move the slider slowly from 1 upward and watch two things: the stretch around the origin where the curve looks like a sine wave, and the ends of the window where it shoots off to plus or minus infinity.
Every polynomial eventually leaves, because a polynomial of odd degree must run off to infinity and the sine stays between minus one and one. But the point where it leaves moves further out as n grows. By degree 21 the curve tracks the wave from about minus 8 to 8, five humps of it, before it breaks away near the edges.
Notice also that moving from an odd degree to the next even degree does nothing. That is the zero coefficient of every even power, seen directly. The fact that the good stretch keeps widening, without limit, is the visual version of the statement that the sine's Maclaurin series converges to sine for every x.
Sorting
Sort into buckets
Sort each function by the powers its Maclaurin series can contain.
The rule behind this sort is symmetry. An odd function satisfies f of minus x equals minus f of x, and its even-numbered derivatives are also odd functions, which must be zero at zero. So only odd powers survive in its Maclaurin series. An even function is the mirror image: its odd derivatives vanish at zero, leaving only even powers.
Two items test whether you apply the rule to the whole function rather than a piece of it. The function x cos x is a product of an odd and an even function, which is odd. The function sine of x squared contains a sine, but the inside is even, and the whole thing is even.
This check costs nothing and catches many errors. If your series for an even function has an x cubed term, something has gone wrong before you even look at the numbers.
Worked example
\[ f(x) = \frac{1}{1+x} = (1+x)^{-1}, \quad a = 0 \]
Differentiate and look for the pattern
Why: Each derivative brings down the exponent and lowers it by one.
\[ f' = -(1+x)^{-2}, \quad f'' = 2(1+x)^{-3}, \quad f''' = -6(1+x)^{-4} \]
Evaluate at zero
Why: The signs alternate and the sizes are factorials.
\[ f^{(n)}(0) = (-1)^n n! \]
Divide by n factorial
Why: The factorials cancel completely.
\[ c_n = \frac{(-1)^n n!}{n!} = (-1)^n \]
Write the polynomials
Why: Alternating powers of x.
\[ p_0 = 1, \quad p_1 = 1 - x, \quad p_2 = 1 - x + x^2, \quad p_3 = 1 - x + x^2 - x^3 \]
\[ p_n(x) = \sum_{k=0}^{n}(-1)^k x^k \]
Check against the geometric series
Why: Replacing x by minus x in one over one minus x gives the same coefficients, as uniqueness demands; at x equal to 0.1 the cubic gives 0.909 against 0.90909.
\[ \frac{1}{1-(-x)} = \sum(-x)^k, \qquad p_3(0.1) = 0.909 \approx 0.909091 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 567 — Checkpoint 6.11
Work this one before revealing it. The derivatives follow the pattern you saw for one over x squared: each brings down the current exponent, so the signs alternate and the sizes are factorials.
The division step is the satisfying one: the nth derivative at zero is plus or minus n factorial, and dividing by n factorial leaves just plus or minus one. The polynomial is one minus x plus x squared minus x cubed and so on.
The check uses uniqueness. You already know a power series for this function: the geometric series with minus x in place of x. Theorem 6.6 says the two must agree coefficient by coefficient, and they do. The numerical check at 0.1 confirms the arithmetic. This is a good example of two very different routes arriving at the same series.
Matching
Match the pairs
Why: Read the constant term first: e to the x and one over one plus x both start at 1, while sine and the logarithm start at 0. Then the factorials: only the exponential divides by 2 and 6. The logarithm's coefficients are one over n, not one over n factorial, because its nth derivative at 0 is itself (n minus 1) factorial in size.
Before matching term by term, look at the constant term, which is just the function's value at zero. The exponential and one over one plus x both equal 1 there; sine and the logarithm both equal 0. That splits the four polynomials into two pairs straight away.
Then look for factorials. Only the exponential's polynomial divides by 2 and by 6. The sine's polynomial has no x squared term, because sine is odd.
The logarithm is the interesting one. Its coefficients are one over n, not one over n factorial. Its derivatives at zero grow like factorials themselves, so most of the factorial cancels. That leftover one over n is why the logarithm's series converges only on a finite interval, while the exponential's, with a full factorial in the denominator, converges everywhere.
Section
Part 3
Concept
\[ R_n(x) = f(x) - p_n(x) \]
nth remainder — The exact error made by using the nth Taylor polynomial in place of f at the point x.
Two questions depend on it. For one fixed n: how big is the error? And as n grows: does the error go to zero, so that the series really equals f?
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 567-568 — definition of the remainder
The remainder is defined in the simplest possible way: the function minus the polynomial. It is the exact error of the approximation at the point x, and for most functions you cannot compute it directly, because computing it would require knowing f of x exactly.
Two different questions both reduce to the remainder. In practice you fix a degree, use the polynomial, and want to know how far off you might be. In theory you want to know whether the Taylor series adds up to f, which happens exactly when the remainder shrinks to zero as n grows.
Taylor's theorem answers both at once, by giving a formula for the remainder that can be bounded even though it cannot be evaluated.
Concept
Figure (svg): The curve y equals square root of x from 0 to 4.6. The constant approximation p0 equals 1 is a horizontal line from the centre a equals 1. At x equals 4 a vertical bracket marks the gap R0 equals 1. A dashed secant joins (1, 1) to (4, 2), and a tangent line at c equals 2.25 runs parallel to it.
Write the zeroth remainder
Why: The zeroth polynomial is the constant f of a.
\[ R_0(x) = f(x) - p_0(x) = f(x) - f(a) \]
Apply the Mean Value Theorem
Why: Some c between a and x has slope equal to the secant's.
\[ f(x) - f(a) = f'(c)(x - a) \]
\[ R_0(x) = f'(c)(x-a) \]
In the picture, with f the square root, a equal to 1 and x equal to 4, the secant slope is one third, and c is 2.25, where one over twice the root of c equals one third.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 568 — the case n = 0
Start with the simplest case to see where the formula comes from. The zeroth Taylor polynomial is the constant f of a, so the remainder is how much f has changed between a and x.
The Mean Value Theorem, from Calculus One, says that change equals the slope at some intermediate point c times the distance. In the figure, the dashed secant from the centre to the point at 4 has slope one third, and the tangent at c equal to 2.25 is parallel to it. The red segment, the error of the flat approximation, is exactly that slope times the run of 3.
Notice what kind of information you get. You do not know c without solving an equation, but you do know it lies between a and x. That is the pattern of Taylor's theorem: an exact formula with one unknown point, which you then bound.
Concept
Theorem 6.7 — Let f be differentiable n plus 1 times on an interval I containing a. For each x in I there is a number c strictly between a and x with the formula below. If the (n plus 1)st derivative is bounded by M on I, the error bound follows.
\[ R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1} \]
\[ |f^{(n+1)}| \le M \text{ on } I \;\Longrightarrow\; |R_n(x)| \le \frac{M}{(n+1)!}|x-a|^{n+1} \]
The remainder looks exactly like the next term of the series, except that the derivative is taken at an unknown point c instead of at the centre.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 568 — Theorem 6.7
Read the remainder formula side by side with the Taylor series. It looks exactly like the first term you did not include, the one of degree n plus 1, except that the derivative is evaluated at an unknown point c instead of at the centre.
That substitution is the price of exactness. With the derivative at c, the formula is not an approximation of the error; it is the error. But since you cannot find c, you replace the derivative by the largest size it could have anywhere between a and x. That largest size is M, and it turns the formula into an inequality you can compute.
The hypotheses matter: f must have n plus 1 derivatives on an interval containing both the centre and the point x. You need one derivative more than the degree of the polynomial, because the error is controlled by the first derivative the polynomial does not match.
Notation
Annotate
On: \( R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}\,(x-a)^{n+1} \)
Go through the notes in order and connect each one to a calculation you will do. The n plus 1 in the derivative is the most common place to slip: for a polynomial of degree two you need the third derivative, not the second.
The note about c is the conceptual heart of the theorem. The point exists, and the theorem guarantees it lies strictly between a and x, but it depends on x and on n in a way no formula captures. You never solve for it. You only ask how large the derivative could possibly be on the interval where c must live.
The factorial and the power pull in opposite directions. The power of the distance grows if the distance is more than one; the factorial always grows, and eventually faster than any power. Which one wins decides whether the error shrinks, and you will see in part four that for the exponential, sine and cosine the factorial always wins.
Concept
Fix x. Define a function of t that subtracts the Taylor polynomial centred at t, plus a correction term chosen so that it vanishes at t equal to a.
\[ g(t) = f(x) - \sum_{k=0}^{n}\frac{f^{(k)}(t)}{k!}(x-t)^k - R_n(x)\frac{(x-t)^{n+1}}{(x-a)^{n+1}} \]
Check t = a
Why: The sum becomes the Taylor polynomial at x, and the last fraction is one.
\[ g(a) = f(x) - p_n(x) - R_n(x) = 0 \]
Check t = x
Why: Every power of x minus t is zero except the first term, which is f of x.
\[ g(x) = f(x) - f(x) - 0 = 0 \]
So g is zero at both ends, and Rolle's theorem hands you a c between a and x where g prime is zero.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 569 — proof of Theorem 6.7
This proof is clever, and it is worth following once. The idea is to build a function g of a new variable t that is zero at both ends of the interval, so that Rolle's theorem can find a point where its derivative is zero.
Read the definition of g as follows: for each t, subtract from f of x the Taylor polynomial centred at t, evaluated at x, and then subtract a correction proportional to x minus t to the power n plus 1. The correction is scaled so that at t equal to a it equals the full remainder.
Check the two ends yourself. At t equal to a, the sum is the ordinary Taylor polynomial, so g is f of x minus the polynomial minus the remainder, which is zero by definition. At t equal to x, every power of x minus t vanishes and only f of x minus f of x is left. Both ends are zero, so Rolle applies.
Concept
Differentiate one term by the product rule
Why: Both factors depend on t.
\[ \frac{d}{dt}\left[\frac{f^{(k)}(t)}{k!}(x-t)^k\right] = \frac{f^{(k+1)}(t)}{k!}(x-t)^k - \frac{f^{(k)}(t)}{(k-1)!}(x-t)^{k-1} \]
Add them up
Why: Each second piece cancels the first piece of the term before; only the last survives.
\[ g'(t) = -\frac{f^{(n+1)}(t)}{n!}(x-t)^n + (n+1)R_n(x)\frac{(x-t)^n}{(x-a)^{n+1}} \]
Set g prime of c to zero
Why: Cancel the common factor, x minus c to the n.
\[ \frac{f^{(n+1)}(c)}{n!} = (n+1)\frac{R_n(x)}{(x-a)^{n+1}} \]
Solve for the remainder
Why: Divide by n plus 1; n factorial times n plus 1 is (n plus 1) factorial.
\[ R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1} \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 569 — proof of Theorem 6.7, continued
Now differentiate g with respect to t. Each term of the Taylor sum is a product of a derivative of f at t and a power of x minus t, so the product rule gives two pieces, one with the next derivative and one with the power lowered by one.
Line the pieces up and they cancel in pairs: the first piece of each term cancels the second piece of the term after it. This is exactly the telescoping you saw with series in Chapter 5. Only the very last piece survives, together with the derivative of the correction term.
Rolle gives a c where this derivative is zero. Setting it to zero, cancelling the common factor x minus c to the n, and dividing by n plus 1 gives the remainder formula, with n factorial times n plus 1 becoming n plus 1 factorial. You do not need to reproduce this proof on an exam, but it shows that the unknown c comes straight from Rolle's theorem.
Picture it
Figure (svg): Two curves for x from 0 to 3: the actual error of the cubic approximation to sine, sin x minus x plus x cubed over 6, and above it the Taylor bound x to the fifth over 120. The error stays under the bound everywhere; at x equals 3 they are 1.64 and 2.03.
\[ |\sin x - p_3(x)| \le \frac{|x|^5}{5!} \]
Because the sine's p3 equals its p4, you may use the remainder of degree four, with the fifth derivative bounded by 1. The drawn error never crosses the ceiling.
The figure puts the theorem to a test. The solid curve is the actual error of the cubic approximation to sine, which you can compute here only because you know sine exactly. The dashed curve is the Taylor bound, x to the fifth over 120.
Why the fifth power, when the polynomial has degree three? Because the sine's cubic is also its polynomial of degree four: the x to the fourth coefficient is zero. So you are entitled to use the remainder after degree four, which involves the fifth derivative and five factorial, and gives a much sharper bound near zero. The book uses the same trick in Example 6.14.
The error never crosses the bound, which is what a bound is for. At x equal to 3 they are 1.64 and 2.03, not far apart; near zero both are tiny. The bound is a worst case, and for a well-behaved function like sine the worst case is not far from the truth.
Worked example
Find p1 and p2 for the cube root of x at 8, and use them to estimate the cube root of 11.
Differentiate twice
Why: Power rule with exponent one third.
\[ f = x^{1/3}, \quad f' = \frac{1}{3}x^{-2/3}, \quad f'' = -\frac{2}{9}x^{-5/3} \]
Evaluate at 8
Why: The cube root of 8 is 2, so 8 to the two thirds is 4 and 8 to the five thirds is 32.
\[ f(8) = 2, \quad f'(8) = \frac{1}{12}, \quad f''(8) = -\frac{2}{288} = -\frac{1}{144} \]
Build the two polynomials
Why: The second coefficient is minus one over 144, halved.
\[ p_1 = 2 + \frac{x-8}{12}, \qquad p_2 = 2 + \frac{x-8}{12} - \frac{(x-8)^2}{288} \]
Evaluate at 11
Why: Here x minus 8 is 3.
\[ p_1(11) = 2 + \frac{3}{12} = 2.25, \qquad p_2(11) = 2.25 - \frac{9}{288} = 2.21875 \]
Figure (svg): The curve y equals cube root of x from 0 to 20, with the tangent line p1 and the parabola p2 at x equals 8. A vertical dashed line at x equals 11 meets the three graphs at 2.25, 2.2188 and the true value 2.2240.
Check against the true value
Why: The cube root of 11 is 2.223980; the linear estimate is off by 0.0260 and the quadratic by 0.0052.
\[ |2.25 - 2.22398| = 0.02602, \qquad |2.21875 - 2.22398| = 0.00523 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 570-571 — Example 6.13a, b and Figure 6.9
The centre 8 is chosen because it is a perfect cube near 11, so the cube root and its derivatives are easy to evaluate there. Eight to the two thirds is 4 and eight to the five thirds is 32; those two facts make the arithmetic clean.
Watch the second coefficient carefully. The second derivative at 8 is minus one over 144, and dividing by two factorial gives minus one over 288. Forgetting that division is the most common error in this example.
The figure shows both polynomials touching the cube root at 8. The tangent line lies above the curve, because the cube root bends downward; the parabola bends downward too, and follows the curve much further. The check against the true cube root of 11 shows the quadratic is about five times more accurate than the linear estimate. In real problems you will not know the true value, which is exactly why you need the error bound on the next slides.
Step zero
\[ |R_1(11)| \le \frac{M}{2!}|11 - 8|^2 \]
Discussion prompt
To bound the error of p1 at 11, what exactly is M, on which interval do you look for it, and where on that interval is it largest?
Answer this before you touch the formula, because most wrong error bounds go wrong here, in the choice of M. M is not the derivative at the centre, and it is not the derivative at the point x. It is the largest size of the derivative anywhere between them.
Why the whole interval? Because the unknown point c could be anywhere in it. If you take a value smaller than the largest possible, you are betting that c happens to avoid the worst spot, and your bound is no longer guaranteed.
For the cube root, the second derivative is a constant times x to the minus five thirds. A negative power of x gets smaller as x grows, so its size is largest at the left end of the interval, the centre 8. That is where you evaluate it.
Worked example
Bound for p1: take M at x = 8
Why: The second derivative's size is largest at 8.
\[ |R_1(11)| \le \frac{1/144}{2!}(11-8)^2 = \frac{9}{288} = 0.03125 \]
Differentiate once more for p2
Why: The third derivative is positive and decreasing.
\[ f'''(x) = \frac{10}{27}x^{-8/3}, \quad f'''(8) = \frac{10}{27\cdot 256} \approx 0.0014468 \]
Bound for p2
Why: Three factorial is 6 and 3 cubed is 27.
\[ |R_2(11)| \le \frac{0.0014468}{3!}(11-8)^3 \approx 0.0065104 \]
Verify both bounds against the actual errors
Why: The true errors, 0.02602 and 0.00523, sit under their bounds. (The book prints 0.0011468 in this line; the value is 0.0014468, and its final 0.0065104 is right.)
\[ 0.02602 \le 0.03125, \qquad 0.00523 \le 0.00651 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 571-572 — Example 6.13c
The linear bound uses the second derivative at 8, which is one over 144 in size, divided by two factorial and multiplied by the distance squared, 9. The result, 0.03125, says the linear estimate 2.25 is within about three hundredths of the true cube root.
For the quadratic you need one more derivative. The third derivative is ten over twenty-seven times x to the minus eight thirds, positive and decreasing, so again it is largest at 8. Divide by three factorial and multiply by the distance cubed, 27.
The book prints 0.0011468 in that line where it means 0.0014468; its final bound of 0.0065104 is correct, so this is a typographical slip, not a wrong answer. The verification compares each bound with the actual error computed from the true cube root. Both actual errors sit under their bounds, and the quadratic's bound is about five times smaller, just as its actual error was.
Worked example
Differentiate three times
Why: Exponent one half, then minus one half, then minus three halves.
\[ f = x^{1/2}, \quad f' = \tfrac12 x^{-1/2}, \quad f'' = -\tfrac14 x^{-3/2}, \quad f''' = \tfrac38 x^{-5/2} \]
Evaluate at 4
Why: The root of 4 is 2, 4 to the three halves is 8.
\[ f(4) = 2, \quad f'(4) = \tfrac14, \quad f''(4) = -\tfrac{1}{32} \]
Build and evaluate at 6
Why: Here x minus 4 is 2.
\[ p_1(6) = 2 + \tfrac{2}{4} = 2.5, \qquad p_2(6) = 2.5 - \tfrac{1}{64}\cdot 4 = 2.4375 \]
Bound the first error
Why: The second derivative's size is largest at 4, where it is one over 32.
\[ |R_1(6)| \le \frac{1/32}{2!}\cdot 2^2 = 0.0625 \]
Bound the second error
Why: The third derivative is largest at 4, where it is three over 256.
\[ |R_2(6)| \le \frac{3/256}{3!}\cdot 2^3 = 0.015625 \]
Figure (svg): A zoomed number line from 2.36 to 2.58. The estimate 2.5 from p1 carries an error bar of plus or minus 0.0625; the estimate 2.4375 from p2 carries a bar of plus or minus 0.015625. A vertical line at the true value 2.4495 passes through both bars.
Check with the true root
Why: The square root of 6 is 2.449490; the actual errors are 0.0505 and 0.0120, each under its bound.
\[ |2.5 - 2.44949| = 0.0505 \le 0.0625, \qquad |2.4375 - 2.44949| = 0.0120 \le 0.0156 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 572 — Checkpoint 6.12
This is Example 6.13 again, with the square root centred at 4. Try each line yourself first. The only care needed is with the half-integer powers: four to the one half is 2, four to the three halves is 8, four to the five halves is 32.
Both error bounds take M at the centre 4, because every derivative here is a negative power of x and so shrinks as x grows. The quadratic's bound, 0.0156, is four times smaller than the linear one, 0.0625.
The figure turns the two answers into error bars. Each estimate is a dot with a guaranteed interval around it, and the true value of the square root of 6, the vertical line, lands inside both. That is the right way to think about an approximation: not as a number, but as a number with a certified margin.
Trap
Bounding the error of p1 for the cube root at 11, using the second derivative at 11:
\[ M = |f''(11)| \approx 0.00408 \]
\[ |R_1(11)| \le \tfrac{0.00408}{2}\cdot 9 \approx 0.0184 \]
Wrong. The actual error is 0.0260, bigger than this 'bound'.
M must be the largest size of the derivative anywhere between a and x, because c could be anywhere there. For a decreasing derivative that is the end nearest the centre, x equal to 8.
\[ M = |f''(8)| = \tfrac{1}{144} \]
\[ |R_1(11)| \le 0.03125 \]
This mistake looks reasonable. You want the error at 11, so you evaluate the derivative at 11. The resulting bound, about 0.018, looks like a tidy answer.
But it is smaller than the actual error, 0.026, so it is not a bound at all. The derivative at 11 is the smallest size the second derivative takes on the interval, not the largest. The unknown c could sit near 8, where the derivative is bigger.
Before choosing M, always ask whether the derivative is increasing or decreasing in size on the interval between the centre and x, and take the end where it is biggest. When you are not sure, a value that is obviously too large is still safe; a value that might be too small is never safe.
Worked example
Use the fifth Maclaurin polynomial of sine to approximate the sine of 10 degrees, and bound the error.
\[ p_5(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!}, \qquad x = \frac{\pi}{18} \approx 0.174533 \]
Evaluate the polynomial
Why: Three terms, each far smaller than the one before.
\[ p_5\left(\tfrac{\pi}{18}\right) = 0.174533 - 0.000886 + 0.000001 \approx 0.173648 \]
Use p6 instead of p5 for the error
Why: The sixth-degree term is zero, so p5 equals p6 and the remainder of degree six applies.
\[ \sin x - p_5(x) = R_6(x) = \frac{f^{(7)}(c)}{7!}x^7 \]
Bound the seventh derivative
Why: It is minus cosine, never bigger than 1 in size.
\[ |f^{(7)}(c)| = |{-\cos c}| \le 1 \]
Bound the error
Why: Seven factorial is 5040.
\[ |R_6| \le \frac{1}{7!}\left(\frac{\pi}{18}\right)^7 \approx 9.79\times 10^{-10} \]
Check against the true sine
Why: The sine of pi over 18 is 0.17364817767; the polynomial is off by 9.78 times ten to the minus ten, just inside the bound.
\[ p_5 - \sin\tfrac{\pi}{18} \approx 9.78\times 10^{-10} \le 9.79\times 10^{-10} \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 572-573 — Example 6.14a
Pi over 18 is ten degrees in radians, about 0.1745. At such a small input the terms of the sine's series shrink extremely fast: the cube term is under a thousandth and the fifth-power term is about one millionth.
The key move is to use the remainder after degree six rather than after degree five. Because the sixth-degree coefficient of sine is zero, the fifth and sixth Maclaurin polynomials are the same polynomial, so both remainders describe the same error. The later one has a seven factorial in the denominator and a seventh power of the input, which makes it far smaller.
The seventh derivative is minus cosine, never bigger than one, so M is one. The bound comes out below one billionth. The check compares with the true sine and finds an actual error of 9.78 times ten to the minus ten, a hair inside the bound of 9.79. That closeness is not a coincidence: for small inputs the bound is nearly the size of the first omitted term.
Worked example
For which x does the fifth Maclaurin polynomial approximate sin x to within 0.0001?
Write the bound as a function of x
Why: Same bound as before, with x in place of pi over 18.
\[ |R_6(x)| \le \frac{|x|^7}{7!} \]
Require it to be small enough
Why: Multiply both sides by 5040.
\[ \frac{|x|^7}{5040} \le 0.0001 \iff |x|^7 \le 0.504 \]
Take the seventh root
Why: The seventh root of 0.504 is 0.90676.
\[ |x| \le 0.504^{1/7} \approx 0.9068 \]
Figure (svg): The curve y equals absolute x to the seventh over 5040 for x from minus 1.2 to 1.2, flat near zero and rising steeply at both ends, with a horizontal line at 0.0001. The curve stays under the line between x equals minus 0.9068 and 0.9068, shaded.
Check both sides of the boundary
Why: At 0.906 the bound is just under a ten-thousandth; at 0.907 it is just over. The book's 'less than 0.907' rounds up by a hair.
\[ \frac{0.906^7}{5040} \approx 0.0000994, \qquad \frac{0.907^7}{5040} \approx 0.0001002 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 573 — Example 6.14b
Now the question is turned around. Instead of fixing x and asking for the error, you fix the error you can tolerate and ask which x qualify. The same bound does the work, as a function of x.
Solving is ordinary algebra: multiply through by 5040 and take a seventh root. The answer is about 0.9068, which in degrees is roughly 52 degrees each side of zero.
The figure shows why the answer is so generous. A seventh power is extremely flat near zero, so the bound stays under a ten-thousandth for a long way before shooting up. The book writes less than 0.907; computing both sides shows that 0.907 itself is just over the tolerance and 0.906 is just under, so the safe statement is absolute x at most 0.9068. Checking the boundary like this is a good habit whenever you round.
Worked example
\[ p_4(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!}, \qquad x = \frac{\pi}{12} \approx 0.261799 \]
Evaluate term by term
Why: The squared term is about 0.0343, the fourth-power term about 0.0002.
\[ p_4\left(\tfrac{\pi}{12}\right) = 1 - 0.03426946 + 0.00019573 = 0.96592627 \]
Use p5 for the error
Why: The fifth-degree coefficient is zero, so the remainder after degree five applies.
\[ |R_5(x)| \le \frac{|x|^6}{6!} = \frac{(0.261799)^6}{720} \]
Evaluate the bound
Why: The sixth power of 0.2618 is about 0.000322.
\[ |R_5| \le 4.47\times 10^{-7} \]
Check against the true cosine
Why: The cosine of 15 degrees is 0.9659258; the polynomial gives 0.9659263, off by 4.47 times ten to the minus seven, at the bound.
\[ 0.9659263 - 0.9659258 \approx 4.47\times 10^{-7} \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 573 — Checkpoint 6.13
Pi over 12 is fifteen degrees. Evaluate the fourth Maclaurin polynomial term by term: the x squared term is about 0.034 and the fourth-power term about 0.0002.
For the error, use the same trick as in Example 6.14. The fifth-degree coefficient of cosine is zero, so the fourth and fifth polynomials coincide, and you may use the remainder after degree five. Its sixth derivative is minus cosine, bounded by one, giving a sixth power over 720.
The bound is 4.47 times ten to the minus seven, and the actual error, computed from the true cosine, is 4.47 times ten to the minus seven as well, to three digits. For small inputs the error is almost exactly the first omitted term, so the bound is nearly tight. Seven correct decimal places from three terms is a remarkable return.
Estimation
\[ e = \sum_{k=0}^{n}\frac{1}{k!} + R_n(1), \qquad |R_n(1)| \le \frac{e}{(n+1)!} < \frac{3}{(n+1)!} \]
Predict first
Estimate first: which degree n is the smallest that guarantees the Maclaurin polynomial of eˣ gives e to within one millionth?
Correct: n = 9
Why: The bound three over (n plus 1) factorial is 0.0000083 at n equal to 8, still too big, and 0.00000083 at n equal to 9, under one millionth. Ten terms of one over k factorial give 2.7182815, off by only 0.0000003. The factorial makes convergence astonishingly fast.
\[ n = 9: \quad \frac{3}{10!} \approx 8.3\times 10^{-7} < 10^{-6} \]
Guess before you compute. You might expect to need a lot of terms for six decimal places, because six decimals is a very demanding accuracy.
The remainder bound at x equal to 1 is e over n plus 1 factorial, since every derivative is the exponential and its largest value between 0 and 1 is e itself. You do not want e in a bound meant to compute e, so replace it by 3, which is safely larger.
Now just tabulate. At n equal to 8 the bound is about eight millionths, not good enough; at n equal to 9 it is under one millionth. Ten terms suffice, and the true error is even smaller, about three ten-millionths. The factorial in the denominator grows so fast that each extra term buys roughly another decimal place. Compare that with the p-series of Chapter 5, which could need thousands of terms for three decimals.
Worked example
Find the smallest n for which the Taylor bound guarantees an error of at most one thousandth for sin x on the interval from minus pi to pi.
Bound the derivative
Why: Every derivative of sine is a sine or cosine.
\[ M = 1 \]
Put in the worst distance
Why: The farthest point from the centre is pi.
\[ |R_n(x)| \le \frac{\pi^{n+1}}{(n+1)!} \]
Tabulate until it drops below 0.001
Why: Compute each value.
\[ n = 10: 0.00737, \quad n = 11: 0.00193, \quad n = 12: 0.00047 \]
Read off n
Why: The first value under one thousandth.
\[ n = 12 \]
Check at the endpoint
Why: The degree-twelve polynomial is the degree-eleven one; at pi it gives minus 0.00045 against sin pi, which is 0, inside the guarantee.
\[ |p_{12}(\pi) - \sin\pi| \approx 0.00045 \le 0.00047 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 578 — Exercise 132
This is a design problem: you want one polynomial that is good to three decimals everywhere on a whole interval, not at one point. The Taylor bound is largest where the distance from the centre is largest, so you plan for the worst point, pi.
With M equal to 1, the bound is pi to the n plus 1 over n plus 1 factorial. Early on, the power of pi wins and the bound is huge; from about n equal to 3 onward the factorial takes over. Tabulating shows the bound first drops under a thousandth at n equal to 12.
The check evaluates the actual polynomial at the worst point. Since sine's twelfth coefficient is zero, the degree-twelve polynomial is the degree-eleven one, and at pi it misses sin pi, which is zero, by 0.00045: inside the guarantee, and close to it, which shows the bound is not wasteful here.
Error analysis
Annotate
On: \( R_1(11) = \frac{f''(c)}{2}\cdot 9 \;\Longrightarrow\; c = 9.5 \;\Longrightarrow\; |R_1| = 0.0235 \)
Read each note and decide whether that part of the argument is valid. The first line is fine: Taylor's theorem really does express the remainder exactly with the second derivative at some unknown c.
The error is in pretending to know c. Picking the midpoint is a guess dressed up as a calculation, and the resulting number, 0.0235, is smaller than the true error of 0.026. So the answer is wrong, not just unjustified.
There is also a logical point here worth absorbing. If you could find c, you could compute the exact error, and then you would know the cube root of 11 exactly, which is what you were approximating in the first place. The theorem is useful precisely because it lets you avoid finding c, by bounding over every possible c at once.
Section
Part 4
Worked example
Differentiate and spot the pattern
Why: Each derivative multiplies by the next negative whole number.
\[ f = x^{-1}, \quad f' = -x^{-2}, \quad f'' = 2x^{-3}, \quad f''' = -3!\,x^{-4} \]
Evaluate at 1
Why: Signs alternate; sizes are factorials.
\[ f^{(n)}(1) = (-1)^n n! \]
Write the series
Why: The factorials cancel.
\[ \sum_{n=0}^{\infty}\frac{(-1)^n n!}{n!}(x-1)^n = \sum_{n=0}^{\infty}(-1)^n(x-1)^n \]
Ratio test
Why: Consecutive terms differ by a factor of x minus 1 in size.
\[ \frac{|a_{n+1}|}{|a_n|} = |x-1| < 1 \iff 0 < x < 2 \]
Test the endpoints
Why: Both endpoint series have terms that do not go to zero.
\[ x = 2: \sum(-1)^n, \qquad x = 0: \sum 1 \quad \text{both diverge} \]
Figure (svg): The curve y equals one over x for x from 0.1 to 2.8, with its Taylor polynomials at 1 of degree 4 and 10. Between 0 and 2 the degree-10 polynomial is hard to tell from the curve; past x equals 2 both polynomials swing wildly away. The interval of convergence from 0 to 2 is shaded.
Check with a partial sum
Why: At x equal to 1.5 the first eleven terms give 0.666992, and one over 1.5 is 0.666667.
\[ \sum_{n=0}^{10}(-0.5)^n = 0.666992 \approx \frac{1}{1.5}, \qquad \text{interval } (0, 2) \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 573-574 — Example 6.15
This example moves from polynomials to the full series. The derivatives of one over x at 1 are plus or minus n factorial, so after dividing by n factorial each coefficient is plus or minus one.
With the series in hand, the next question is where it converges. The ratio test gives the absolute value of x minus 1 less than one, an open interval from 0 to 2. Then you must test the endpoints separately, as in Section 6.1: at both, the terms have size one and do not go to zero, so both endpoint series diverge.
The figure shows what the interval means visually. Inside it, the degree-ten polynomial lies almost on top of one over x. Outside it, to the right of 2, both polynomials swing away violently, and higher degree makes it worse. The check at 1.5, well inside, shows eleven terms agreeing with two thirds to three decimals.
Worked example
Evaluate the same derivatives at 2
Why: Now each power of 2 stays in the denominator.
\[ f^{(n)}(x) = (-1)^n n!\,x^{-(n+1)} \;\Longrightarrow\; f^{(n)}(2) = \frac{(-1)^n n!}{2^{n+1}} \]
Write the series
Why: Divide by n factorial.
\[ \frac1x = \sum_{n=0}^{\infty}\frac{(-1)^n}{2^{n+1}}(x-2)^n \]
Ratio test
Why: The ratio is the distance from 2, halved.
\[ \frac{|a_{n+1}|}{|a_n|} = \frac{|x-2|}{2} < 1 \iff 0 < x < 4 \]
Test the endpoints
Why: At x equal to 4 the terms are plus or minus one half; at 0 every term is one half.
\[ x = 4: \sum\frac{(-1)^n}{2}, \qquad x = 0: \sum\frac12 \quad \text{both diverge} \]
Check at x = 3
Why: Twenty-one terms give 0.3333335, and one over 3 is 0.3333333.
\[ \sum_{n=0}^{20}\frac{(-1)^n}{2^{n+1}} = 0.3333335 \approx \frac13, \qquad \text{interval } (0, 4) \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 574 — Checkpoint 6.14
Reuse the derivatives you just found; only the evaluation point changes. At 2, each derivative carries a power of 2 in the denominator, one more than the order of the derivative.
The series is the same alternating pattern, now in powers of x minus 2 divided by powers of 2. The ratio test gives the distance from 2, halved, less than one, so the radius is 2 and the open interval runs from 0 to 4.
Notice the pattern across the two examples: centred at 1 the radius was 1, centred at 2 it is 2. In both cases the interval stops exactly at zero, where one over x blows up. A Taylor series cannot reach past the nearest point where the function misbehaves. The check at 3 shows twenty-one terms agreeing with one third to about seven decimals.
Intuition
The ratio test tells you where the Taylor series adds up to some number. It never looks at f, so it cannot tell you that the number is f of x.
\[ \lim_{n\to\infty} p_n(x) \text{ exists} \quad\text{vs}\quad \lim_{n\to\infty} p_n(x) = f(x) \]
For one over x at 1 you can settle the second question by algebra, because one over x is a geometric series in one minus x. For most functions there is no such trick, and you need the remainder.
\[ \frac1x = \frac{1}{1-(1-x)} = \sum_{n=0}^{\infty}(1-x)^n, \quad |1-x| < 1 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 574 — the discussion after Example 6.15
Slow down on this distinction, because it is the most subtle idea in the lesson. The ratio test answers the question of whether the Taylor series adds up to something. It does not know what f is, so it cannot possibly tell you that the something is f of x.
For one over x the gap can be closed by algebra: one over x can be rewritten as a geometric series in one minus x, which you know converges to exactly one over x on the same interval. So in that example the series converges to the function it came from.
For most functions, e to the x or sine for instance, there is no geometric series in disguise. You need a general tool that compares the series with f directly, and the remainder is exactly that comparison.
Concept
Convergence of Taylor series (Theorem 6.8) — Suppose f has derivatives of all orders on an interval I containing a. Then the Taylor series converges to f of x for every x in I if and only if the remainder tends to zero for every x in I.
\[ f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n \iff \lim_{n\to\infty}R_n(x) = 0 \]
Why
Why: The partial sums are the Taylor polynomials, and the gap to f is the remainder.
\[ p_n(x) = f(x) - R_n(x) \to f(x) \iff R_n(x) \to 0 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 574-575 — Theorem 6.8
This theorem is almost a definition once you see it. The partial sums of the Taylor series are the Taylor polynomials, and each polynomial differs from f by the remainder. So the polynomials approach f of x exactly when the remainder approaches zero.
In practice you almost never compute the remainder exactly. You use the bound from Taylor's theorem: M over n plus 1 factorial times the distance to the power n plus 1. If you can show that bound goes to zero, the squeeze theorem forces the remainder to zero, and the series equals f.
One detail matters for the examples. M may depend on the interval, but it must not grow with n too fast. For the exponential, sine and cosine it does not grow with n at all, which is what makes the next three examples work.
Concept
Figure (svg): Bars of height 5 to the n over n factorial for n from 0 to 15. They rise to about 26 at n equals 4 and 5, then collapse: 1.22 at n equals 11 and 0.02 at n equals 15.
\[ \lim_{n\to\infty}\frac{|x|^{n+1}}{(n+1)!} = 0 \quad \text{for every real } x \]
This is the fact that makes the remainder vanish for the exponential, sine and cosine. It follows from Section 5.3's divergence test: the series of these terms converges by the ratio test, so its terms must go to zero.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 576 — the limit used in Example 6.16
Look at the bars: five to the n over n factorial. For the first few n, multiplying by five each step beats multiplying by n, so the bars grow, peaking at about 26 at n equal to 4 and 5. After that, each step multiplies by five over n, which is less than one, and the bars collapse. By n equal to 15 the value is two hundredths.
The same thing happens for any fixed x, however large. Once n is bigger than x, each step multiplies by less than one, and soon by very much less than one. The factorial always wins in the end.
The book proves this with a neat shortcut: the series of these quantities converges for every x by the ratio test, and the terms of a convergent series must tend to zero by the divergence test of Section 5.3. You can use this limit freely from now on.
Worked example
Write the Maclaurin series
Why: From the polynomials of Example 6.12(a).
\[ \sum_{n=0}^{\infty}\frac{x^n}{n!} \]
Ratio test
Why: The factorials leave one over n plus 1.
\[ \frac{|x|^{n+1}}{(n+1)!}\cdot\frac{n!}{|x|^n} = \frac{|x|}{n+1} \to 0 < 1 \]
Record the interval
Why: The limit is zero for every x.
\[ \text{interval of convergence } (-\infty, \infty) \]
Bound the remainder on |x| at most b
Why: Every derivative is e to the x, which is increasing, so its largest value there is e to the b.
\[ |R_n(x)| \le \frac{e^b}{(n+1)!}|x|^{n+1} \]
Squeeze
Why: The fixed factor e to the b times a quantity tending to zero.
\[ 0 \le |R_n(x)| \le e^b\cdot\frac{|x|^{n+1}}{(n+1)!} \to 0 \]
Check with a number
Why: At x equal to 2, eleven terms give 7.388995 against e squared, 7.389056.
\[ \sum_{n=0}^{10}\frac{2^n}{n!} = 7.388995 \approx 7.389056 = e^2 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 575-576 — Example 6.16a and Exercise 161
There are two separate jobs here, and the example does them in order. First the ratio test: the ratio of consecutive terms is x over n plus 1, which goes to zero for every x, so the series converges everywhere.
Second, the remainder. Pick any bound b on the size of x. Every derivative is the exponential, which is increasing, so on that interval its largest value is e to the b. That number is fixed; it does not change as n grows. The remainder bound is that fixed number times the quantity you just saw tends to zero, so the squeeze theorem sends the remainder to zero.
The numerical check at x equal to 2 uses Exercise 161: eleven terms of two to the n over n factorial give 7.388995, and e squared is 7.389056. Both jobs were needed. The first says the series settles; only the second says it settles on e to the x.
Worked example
Write the Maclaurin series
Why: From the polynomials of Example 6.12(b).
\[ \sin x = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots \]
Ratio test
Why: Consecutive terms differ by x squared over two factors.
\[ \frac{|x|^{2n+3}}{(2n+3)!}\cdot\frac{(2n+1)!}{|x|^{2n+1}} = \frac{x^2}{(2n+3)(2n+2)} \to 0 \]
Bound the remainder
Why: Every derivative of sine is plus or minus sine or cosine.
\[ |f^{(n+1)}(c)| \le 1 \;\Longrightarrow\; |R_n(x)| \le \frac{|x|^{n+1}}{(n+1)!} \]
Let n grow
Why: The factorial beats the power.
\[ |R_n(x)| \to 0 \quad \text{for every } x \]
Check far from the centre
Why: At x equal to 3 the degree-15 polynomial gives 0.1411197 against sin 3, which is 0.1411200: convergence even three units out.
\[ p_{15}(3) = 0.1411197 \approx 0.1411200 = \sin 3 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 576 — Example 6.16b
Follow the same two steps. The ratio test for the sine's series compares terms two powers apart, so the ratio has x squared on top and two consecutive whole numbers below. That tends to zero for every x.
For the remainder, sine is even easier than the exponential. Every derivative of sine is one of sine, cosine, minus sine or minus cosine, and all four are between minus one and one everywhere. So M is one on any interval, and the bound is the power of the distance over the factorial, which you know tends to zero.
The check at 3 is a strong one. Three is far from the centre, the polynomials were visibly wrong there on the slider for small degrees, and yet the degree-fifteen polynomial matches sin 3 to six decimal places. The series really does converge to sine, not just near zero but everywhere.
Worked example
Write the series
Why: From Example 6.12(c).
\[ \cos x = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \]
Ratio test
Why: Two new factors in the factorial each step.
\[ \frac{|x|^{2n+2}}{(2n+2)!}\cdot\frac{(2n)!}{|x|^{2n}} = \frac{x^2}{(2n+2)(2n+1)} \to 0 \]
Bound the remainder
Why: Every derivative of cosine is bounded by 1.
\[ |R_n(x)| \le \frac{|x|^{n+1}}{(n+1)!} \to 0 \]
Check by differentiating the sine's series
Why: Term by term, the sine's series differentiates into exactly this one, as the derivative of sine is cosine.
\[ \frac{d}{dx}\left(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots\right) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 576 — Checkpoint 6.15
This is the same argument as for sine, and you should be able to write it yourself. The ratio of consecutive terms has x squared over two consecutive whole numbers, which tends to zero, so the cosine's series converges everywhere.
Every derivative of cosine is bounded by one in size, so the remainder is at most the power of the distance over the factorial, and it tends to zero. The series converges to cosine for every real x.
The check uses term-by-term differentiation, the tool from the warm-up. Differentiate the sine's series and each odd power becomes an even power with the factorial reduced by one: x cubed over three factorial becomes x squared over two factorial. The result is exactly the cosine's series, as it must be because the derivative of sine is cosine.
Counterexample
Figure (svg): The curve y equals e to the minus one over x squared for x from minus 3 to 3, together with the line y equals 0, which is its Maclaurin series. The curve is extremely flat near the origin, then rises toward the horizontal asymptote y equals 1; it is 0.018 at x equals plus or minus 0.5 and 0.368 at x equals plus or minus 1.
Discussion prompt
The function below has derivatives of every order, and every one of them is zero at x = 0. What is its Maclaurin series, where does the series converge, and where does it equal f?
Look at the graph first. The function is positive everywhere except at zero, but near zero it is extraordinarily flat: at x equal to one half it is under two hundredths, and at x equal to one tenth it is about ten to the minus forty-four.
That flatness is so extreme that every derivative at zero is exactly zero. Proving it takes l'Hospital's rule repeatedly, and you may take it on trust here. So every Maclaurin coefficient is zero, and the Maclaurin series is the zero series.
The zero series converges for every x, as easily as a series can. But it converges to zero, and the function is not zero anywhere except the origin. Its remainder is the function itself, which does not shrink as n grows. This is the example to quote whenever someone assumes that a convergent Taylor series must equal its function.
Comparison
Comparison matrix
| series and question | tool | verdict |
|---|---|---|
| eˣ: where does it converge? | ratio test | every real x |
| eˣ: does it equal f? | remainder bound | yes |
| 1/x at 1: where does it converge? | ratio test and endpoints | (0, 2) |
| exp(−1/x²): where does it converge? | every coefficient is 0 | everywhere |
| exp(−1/x²): does it equal f? | remainder | only at x = 0 |
Fill in the blanks, keeping the two questions strictly apart. Where a series converges is answered by the ratio test, together with separate endpoint checks. Whether it converges to the function is answered only by the remainder.
The rows for the exponential show the two tools agreeing: the ratio test says everywhere, and the remainder bound confirms the sum is e to the x everywhere. The row for one over x reminds you that the ratio test gives an open interval and the endpoints must be tested on their own.
The last two rows are the counterexample. The ratio test is satisfied everywhere, trivially, since every coefficient is zero. The remainder, however, is the whole function, so the series equals f only at the single point zero. If you only ever ran the ratio test, you would never notice anything was wrong.
Section
Part 5
Concept
| function | Maclaurin series | converges to f for |
|---|---|---|
| eˣ | 1 + x + x²/2! + x³/3! + ⋯ | every real x |
| sin x | x − x³/3! + x⁵/5! − ⋯ | every real x |
| cos x | 1 − x²/2! + x⁴/4! − ⋯ | every real x |
| 1/(1 − x) | 1 + x + x² + x³ + ⋯ | −1 < x < 1 |
| ln(1 + x) | x − x²/2 + x³/3 − ⋯ | −1 < x ≤ 1 |
\[ e^x = \sum_{n=0}^{\infty}\frac{x^n}{n!}, \quad \sin x = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n+1}}{(2n+1)!}, \quad \cos x = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n}}{(2n)!} \]
The first three have bounded derivatives on any interval, so the factorial always wins and they hold for every x. The last two come from the geometric series, and inherit its radius of one.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, pp. 575-576 — Example 6.16 and Checkpoint 6.15; the last two rows from §6.1-6.2
These five series come up so often that deriving them every time would waste your effort. Learn them the way you learned the derivatives of sine and cosine, and learn the interval with each one, because the interval is part of the fact.
Look for the family resemblances. The exponential has every power over its factorial. Sine keeps the odd ones and cosine the even ones, both with alternating signs; together they split the exponential's terms between them. The geometric series has no factorials at all, and the logarithm has one over n, which is what the geometric series becomes when you integrate it.
The right-hand column tells you where each one is safe. The first three have infinite radius because their derivatives are bounded and the factorial always wins. The last two are tied to the geometric series and stop at distance one from the centre. The logarithm's series happens to converge at x equal to 1 as well, giving the alternating harmonic series for the logarithm of two.
Worked example
Differentiate and spot the pattern
Why: After the first derivative this is one over one plus x, handled in Checkpoint 6.11.
\[ f = \ln(1+x), \quad f' = (1+x)^{-1}, \quad f'' = -(1+x)^{-2}, \quad f''' = 2(1+x)^{-3} \]
Evaluate at zero
Why: The sizes are one factorial behind.
\[ f(0) = 0, \qquad f^{(n)}(0) = (-1)^{n+1}(n-1)! \quad (n \ge 1) \]
Divide by n factorial
Why: Since n factorial is n times (n minus 1) factorial, only one over n is left.
\[ c_n = \frac{(-1)^{n+1}(n-1)!}{n!} = \frac{(-1)^{n+1}}{n} \]
Write the series
Why: No factorials survive, which is why the radius is finite.
\[ \ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^n}{n} \]
Check at x = 0.5
Why: Ten terms give 0.405435; the logarithm of 1.5 is 0.405465. The gap, 0.00003, is under the next term, 0.5 to the eleventh over 11, which is 0.00004.
\[ p_{10}(0.5) = 0.405435 \approx 0.405465 = \ln 1.5 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 579 — Exercise 154, in the form centred at 0
This derivation shows why the logarithm behaves so differently from the exponential. After the first derivative you are differentiating one over one plus x, which you did in Checkpoint 6.11, so the derivatives at zero are factorials with alternating signs, one step behind.
Divide by n factorial and almost everything cancels, leaving one over n. That is the crucial difference. The exponential's coefficients have a full factorial in the denominator; the logarithm's have only n. With so little in the denominator, the powers of x win as soon as x is bigger than one, and the series diverges.
The check at one half uses ten terms and misses the true logarithm of 1.5 by three hundred-thousandths. Because the series alternates with shrinking terms, the error is smaller than the first omitted term, and the check confirms that too. You could also have reached this series by integrating the geometric series, as in Section 6.2; uniqueness says the two routes must agree, and they do.
Picture it
Figure (svg): The curve y equals ln of 1 plus x for x from minus 0.9 to 2, with its Maclaurin polynomials of degree 5 and 10. For x between minus 0.5 and 1 all three nearly coincide; past x equals 1 the polynomials fly off in opposite directions.
The logarithm keeps going smoothly past x equal to 1, but its series cannot follow. The polynomials of degree 5 and 10 agree with it on the left of the dashed line and fly apart on the right.
The logarithm of one plus x is a perfectly smooth function for every x bigger than minus one. Nothing special happens to it at x equal to 1. So why should its series stop there?
Because a power series converges on an interval symmetric about its centre. The logarithm blows up at minus one, distance one to the left of the centre, so the radius can be at most one, and the series fails at the same distance to the right as well, even though the function is fine there.
In the figure, the degree-five and degree-ten polynomials lie almost exactly on the logarithm to the left of the dashed line. To the right of it they separate, one upward and one downward, and higher degrees separate faster. The radius is a property of the series, not only of the function you can see.
Edge cases
Parameter explorer
The curve is the Maclaurin polynomial of ln(1 + x) of degree n, on −1 to 2. Raise n. Watch x = 0.5 and x = 1.5: which point settles down, and which one gets worse?
\[ p_{{n}}(x) = x - \frac{x^2}{2} + \cdots + \frac{(-1)^{{n}+1}x^{{n}}}{{n}} \]
Use the slider to feel the difference between inside and outside the radius. Fix your eye on x equal to 0.5 first and raise n: the curve there settles and stops moving, at the logarithm of 1.5, about 0.405.
Now watch x equal to 1.5. As n rises, the value there flips up and down with a growing swing, because the terms 1.5 to the n over n grow without bound. No choice of n gives a good approximation there.
Right at x equal to 1 the behaviour is in between: the values wobble but slowly settle on the logarithm of 2, because the alternating harmonic series converges, though very slowly. This is exactly the endpoint behaviour you tested by hand in Section 6.1, now visible on the screen.
Trap
Computing the logarithm of 3 from the logarithm series:
\[ \ln 3 = \ln(1+2) = 2 - \frac{4}{2} + \frac{8}{3} - \cdots \]
Wrong. The partial sums run 2, 0, 2.67, minus 1.33, 5.07: no limit.
The series equals the logarithm only for x between minus 1 and 1. At x equal to 2 its terms, 2 to the n over n, grow, so it diverges. Rewrite first so the input is small.
\[ \ln 3 = \ln 2 - \ln\tfrac23 \]
\[ = \ln(1+1) - \ln\left(1 - \tfrac13\right) \]
This mistake comes from memorising the series but not its interval. The algebra looks innocent: ln 3 is ln of one plus two, so substitute 2 for x.
But the partial sums, 2, 0, 2.67, minus 1.33, 5.07, do not settle anywhere, and they never will. The terms 2 to the n over n grow without bound, so the series diverges at 2, and no number of terms will give ln 3.
The fix is to rewrite the quantity so that every input is inside the interval. Logarithm rules let you write ln 3 as ln 2 minus the logarithm of two thirds, which uses the series at 1 and at minus one third. Calculators do this kind of range reduction before they ever use a series.
Prediction
\[ \sum_{n=0}^{\infty}\frac{(-1)^n(2\pi)^{2n}}{(2n)!} \]
Predict first
This sum is a standard Maclaurin series evaluated at one point. What is its value?
Correct: cos 2π = 1
Why: Alternating signs, even powers and even factorials are the cosine's fingerprint, and the power being raised is 2 pi. The cosine series converges for every x, so the sum is cos 2 pi, which is 1. Eleven terms give 1.000301: still off in the fourth decimal, because 2 pi is far from the centre.
\[ S_{10} = \sum_{n=0}^{10}\frac{(-1)^n(2\pi)^{2n}}{(2n)!} = 1.000301 \approx \cos 2\pi = 1 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 579 — Exercise 162
Recognising a series as a known function evaluated at a point is a skill you will use a lot in the next section. Look for the fingerprints: the signs, which powers appear, and which factorial sits in the denominator.
Here the signs alternate, only even powers appear, and the denominator is the factorial of the same even number. That is the cosine's series, evaluated at 2 pi. Since the cosine's series converges to cosine everywhere, the sum is cos 2 pi, which is 1.
The partial sum is instructive. Eleven terms give 1.000301, still wrong in the fourth decimal place, even though eleven terms gave six-decimal accuracy near zero. Two pi is far from the centre, so the early terms are huge before the factorial takes control. Convergence everywhere does not mean fast convergence everywhere.
Worked example
\[ \lim_{x\to 0}\frac{\cos x - 1}{x^2} \]
Replace cosine by its series
Why: Valid for every x.
\[ \cos x - 1 = -\frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots \]
Divide by x squared
Why: Every power drops by two.
\[ \frac{\cos x - 1}{x^2} = -\frac{1}{2} + \frac{x^2}{24} - \frac{x^4}{720} + \cdots \]
Let x go to zero
Why: Every term but the constant vanishes.
\[ \lim_{x\to 0}\frac{\cos x - 1}{x^2} = -\frac12 \]
Check numerically
Why: At x equal to 0.1 the quotient is minus 0.4995835, and at 0.01 minus 0.4999958.
\[ \frac{\cos 0.01 - 1}{0.0001} = -0.4999958 \approx -0.5 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 580 — Exercise 170
Limits of the form zero over zero were a job for l'Hospital's rule in Calculus One. Series give you another method that is often faster and shows you more.
Replace the cosine by its series. The constant 1 cancels, leaving a series that starts with minus x squared over two. Divide by x squared and every exponent drops by two, so the series now starts with the constant minus one half, followed by terms that all contain x.
As x goes to zero every term with an x vanishes, and the limit is minus one half. The series tells you more than the limit: it says the quotient is about minus one half plus x squared over 24 for small x. The numerical check at 0.1 and 0.01 shows the quotient creeping toward minus one half from above, just as that extra positive term predicts.
Worked example
The function e to the minus x squared has no elementary antiderivative, but its series integrates term by term.
Substitute into the exponential's polynomial
Why: Put minus x squared where x was, up to the sixth power.
\[ e^{-x^2} \approx 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \cdots + \frac{x^{12}}{6!} \]
Integrate each term from 0 to 1
Why: Each power x to the 2k integrates to one over 2k plus 1.
\[ \int_0^1 e^{-x^2}\,dx \approx \sum_{k=0}^{6}\frac{(-1)^k}{k!\,(2k+1)} \]
Add the seven terms
Why: One, minus a third, plus a tenth, and so on.
\[ 1 - 0.333333 + 0.1 - 0.023810 + 0.004630 - 0.000758 + 0.000107 = 0.746836 \]
Check against a numerical integral
Why: Simpson's rule gives 0.746824. The difference, 0.000012, is less than the first omitted term, one over 7 factorial times 15, which is 0.000013.
\[ |0.746836 - 0.746824| = 0.000012 < \frac{1}{7!\cdot 15} \approx 0.000013 \]
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 578 — Exercise 131
The bell-shaped function e to the minus x squared is central to probability, and it has no antiderivative you can write with elementary functions. Series give you a way around that.
Substitute minus x squared into the exponential's polynomial. Each power of x doubles, and the signs alternate. Then integrate each power from 0 to 1, which is easy: x to the 2k integrates to one over 2k plus 1. Seven terms of a simple alternating sum approximate the integral.
The check compares with a numerical integral from Simpson's rule, 0.746824. The series answer is 0.746836, off by twelve millionths, and that gap is less than the first term left out, as it must be for an alternating series with shrinking terms. In the next section you will do this systematically.
Fill the middle
\[ |R_n(x)| \le \frac{M}{(n+1)!}|x-a|^{n+1} \]
Fill in the blanks
For the exponential, sine and cosine the bound M does not grow with n, and the factorial in the denominator eventually grows faster than any fixed power of the distance, so the remainder tends to zero and each series equals its function for every real x.
Why: Bounded derivatives plus a factorial in the denominator: that pair is exactly why these three series have infinite radius and converge to their functions everywhere.
Fill in both blanks, then read the whole sentence as an argument. It is the reason three of the five standard expansions converge to their functions everywhere.
The argument has two parts. First, the derivatives of the exponential on a fixed interval, and of the sine and cosine anywhere, are bounded by a number that does not depend on n. Second, the factorial in the denominator eventually grows faster than any fixed power of the distance, as the bar chart showed.
Together they force the remainder bound to zero, and Theorem 6.8 turns that into equality between the function and its series. If either part fails, for instance derivatives that grow like factorials as the logarithm's do, the argument breaks, and the radius may be finite.
Real world
Figure (svg): The line y equals theta and the curve y equals sin theta for theta from 0 to 1 radian, with the thin gap between them shaded. At theta equals 0.2 (about 11.5 degrees) the gap is 0.0013.
Discussion prompt
Physics replaces the sine of an angle by the angle itself when solving the pendulum equation. Use Taylor's theorem to bound the error at 0.2 radians, and say how many percent that is.
OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series §6.3, p. 578 — Exercise 137, sin x approximated by x
In physics you will be told to replace the sine of a small angle by the angle itself when solving the pendulum equation. It is usually presented as a convention. Taylor's theorem makes it a calculation with a guaranteed error.
The first-degree polynomial of sine is theta, and it equals the second-degree one, so you may use the remainder after degree two. The third derivative of sine is minus cosine, bounded by one, giving an error of at most theta cubed over six.
At 0.2 radians, about eleven and a half degrees, the bound is 0.00133, less than seven tenths of a percent of the sine itself. The figure shows the gap between the line and the curve, invisible at small angles and obvious by one radian. Now when someone says small angle, you can ask how small and answer with a number.
Section
Part 6
Pattern
Figure (svg): A flow diagram in two rows. Top row: differentiate f repeatedly, evaluate each derivative at a, divide the nth by n factorial, and assemble the polynomial p sub n. An arrow drops to the bottom row: bound the next derivative by M on the interval, compute the remainder bound, and then either stop with a guaranteed error, or let n grow and ask whether the bound goes to zero.
The diagram is the whole lesson as one process. The top row builds the approximation: derivatives, evaluated at the centre, divided by factorials, assembled into a polynomial. The bottom row prices it: bound the next derivative, compute the remainder bound, and decide.
The two exits at the bottom correspond to the two uses you have seen. For a fixed degree, the bound is a guaranteed error, and if you have a tolerance you raise the degree until the bound meets it. For the whole series, you ask whether the bound tends to zero as the degree grows, which is how you prove the series equals the function.
When you face a new problem, place yourself in the diagram first. Most exam questions start at one box and ask you to get to another.
Ranking
Put in order
Order the steps for bounding the error of the nth Taylor polynomial at a point x.
Why: The derivative comes first because M is a statement about it. The maximum has to be taken over the whole stretch between a and x because the unknown c could be anywhere there. Only then is the formula a guarantee.
Put the steps in order, then check your ordering against the reasoning in the explanation. The order is not arbitrary: each step needs the one before.
The most common failure is to skip the second step and simply plug the centre, or the point x, into the derivative. The maximum has to be taken over the whole stretch between them, because that is where the unknown c lives.
The last step is also easy to skip. The number you compute is a statement about where the true value lies, and saying so explicitly, the true value is within this distance of the estimate, is what makes the calculation useful to someone else. An error bound with no statement attached is just a number; with the statement it is a guarantee.
Check
Check your understanding
The function f has f(2) = 3, f′(2) = −1, f″(2) = 4 and f‴(2) = 12. What is the coefficient of (x − 2)³ in its Taylor series at 2?
Answer: C
Why: The coefficient of the cube is the third derivative at the centre divided by three factorial: 12 over 6, which is 2.
Answer before you reveal. The question gives you all four derivatives at the centre, but only one of them matters for the coefficient of the cube, and it has to be divided by the right factorial.
Each wrong option corresponds to a real slip: forgetting the factorial altogether, dividing by the degree instead of its factorial, or using the factorial of the wrong degree. If you chose one of them, go back to the fourth-power figure and the idea that n differentiations bring down n factorial.
A quick self-test for next time: the coefficient of the square would be 4 over two factorial, which is 2, and the constant term is just f of 2, which is 3. Every coefficient comes from the same recipe: the derivative of that order at the centre, divided by the factorial of that order. The derivatives of other orders play no part in it.
Check
Check your understanding
Using p₃ for eˣ at x = 0.5 (centre 0), which is a valid Taylor bound on the error, given that eˣ < 2 on the interval from 0 to 0.5?
Answer: A
Why: The remainder after degree three uses the fourth derivative, which is the exponential, at most 2 on the interval, over four factorial, times 0.5 to the fourth: about 0.0052. The actual error is 0.0029.
Work this out on paper before choosing. Two decisions matter: which derivative controls the error of a cubic, and how large that derivative can be on the interval.
A cubic's error is controlled by the fourth derivative, and for the exponential that is the exponential again, which is at most e to the one half on the interval from 0 to one half. Since that is less than 2, 2 is a safe M. The option with M equal to 1 is the classic mistake of evaluating only at the centre.
The actual error, about 0.0029, is under the correct bound, 0.0052. A bound bigger than the actual error is fine; a bound smaller than it would be wrong. Choosing M a little too large, as 2 is here, costs you only a slightly looser guarantee.
Check
Check your understanding
Which statement about a Taylor series is correct?
Answer: B
Why: That is Theorem 6.8: the partial sums are the Taylor polynomials, and they approach f of x exactly when the remainder approaches zero.
This question separates the two ideas of part four. Read each option and ask whether the flat function, e to the minus one over x squared, breaks it.
It breaks three of them. Its Maclaurin series converges, everywhere, but not to the function; it has all its derivatives, but does not equal its series near zero; and the ratio test is perfectly happy with it. Only the statement about the remainder survives, because it is exactly Theorem 6.8.
If you picked the first option, you have merged the two questions of part four into one. Keep them apart: the ratio test says where the series settles, and only the remainder says what it settles on. A single counterexample is enough to sink a general claim, and the flat function is the one to reach for.
Explain it to yourself
Discussion prompt
Taylor's theorem gives the remainder exactly, yet you can never use that exact formula to compute the error. Explain why, and explain why the theorem is still useful.
Write your explanation before you read the model answer. It is the kind of question that shows whether you understand Taylor's theorem or only its formula.
The key idea is that the theorem trades an unknown number for a known interval. You do not know c, and finding it would be as hard as finding the exact error. But you do know that c lies between a and x, and bounding the derivative over that interval turns the exact formula into a bound you can compute.
Compare this with the Mean Value Theorem, which has the same kind of unknown point. You have used that theorem for years without ever finding its c, for exactly the same reason. It is enough to know where c lives.
Exit ticket
\[ f(x) = e^{-x}, \quad a = 0 \]
Discussion prompt
Write the Maclaurin polynomial p₃ for e to the minus x, use it to estimate e to the minus 0.2, and bound the error.
Do this without looking back. It uses every step of the lesson once: derivatives at the centre, the polynomial, an evaluation, and an error bound.
The derivatives of e to the minus x alternate in sign, so the polynomial alternates too. For the bound, the fourth derivative is e to the minus x again, which on the interval from 0 to 0.2 is largest at 0, where it equals 1. That is why M is 1 here, not something larger: this derivative decreases.
The answer checks itself: the estimate 0.818667 and the true value 0.818731 differ by 0.000064, just inside the bound of 0.0000667. If your bound was smaller than the actual error, look again at which derivative and which M you used.
Recap
| idea | formula | what it is for |
|---|---|---|
| Taylor coefficient | cₙ = f⁽ⁿ⁾(a)/n! | matches the nth derivative at a |
| Taylor polynomial | pₙ = partial sum up to degree n | local approximation |
| Taylor's theorem | Rₙ = f⁽ⁿ⁺¹⁾(c)(x − a)ⁿ⁺¹/(n + 1)! | exact error, unknown c |
| error bound | |Rₙ| ≤ M|x − a|ⁿ⁺¹/(n + 1)! | accuracy and choosing n |
| Theorem 6.8 | series = f ⇔ Rₙ → 0 | converging to f, not just converging |
\[ f(x) = \sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x-a)^n \quad\text{whenever}\quad R_n(x) \to 0 \]
Next, Section 6.4 puts these expansions to work: new series from old by substitution, multiplication and integration, and limits and integrals no other method can reach.
Stewart, Calculus: Early Transcendentals 8e, §11.10 Taylor and Maclaurin Series §11.10, pp. 759-773 — the same material in Stewart
The table is the lesson in five lines. Taylor coefficients come from matching derivatives, which is where the factorial comes from. Taylor polynomials are the partial sums and the practical approximations. Taylor's theorem writes the error exactly with an unknown point, and the bound turns that into a number you can use.
The last row is the conceptual one. A Taylor series equals its function exactly where the remainder goes to zero. Convergence alone is not enough, as the flat function showed.
In the next section you will stop differentiating. With the five standard expansions in hand, you can build new series by substituting, multiplying and integrating, and use them to evaluate limits and integrals that no other method reaches.
Want this taught 1-on-1? Alexander tutors Calculus II — $55/session, free consultation.