Chapter 6: Power Series
6.3 Taylor and Maclaurin Series
Study guide for Calculus Volume 2 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
So far the series came first and the function came second: you were handed an expression in powers of $x$ and asked what it added up to. This section reverses the arrow. You start with a function you care about, and you ask for the power series that represents it. That is the version of the question you actually want answered, because the functions worth approximating are the ones that arrived from geometry or physics, not the ones that arrived as a list of coefficients.
The surprise is how little freedom there is. If a function can be written as a power series centred at a point, the coefficients are forced. There is no choosing among competing representations. The argument is short: set $x = a$ in the series and everything but the constant term dies, so the constant term must be $f(a)$. Differentiate the series once and repeat, and the coefficient of the linear term must be $f'(a)$. Differentiate $n$ times and the surviving term carries a factor of $n!$, so the $n$th coefficient must be $f^{(n)}(a)/n!$. That single formula is the whole construction.
What the formula does not do is guarantee that the series you build actually equals the function you built it from. The coefficients only encode the derivatives at one point, and in principle a function could be described perfectly near $a$ by its derivatives there and still drift away from its own series further out. Deciding whether the series recaptures the function is a separate question, answered by controlling the leftover piece called the remainder. When the remainder tends to zero, the function equals its series; when it does not, the series is a valid object that happens to represent something else.
For the three functions you will use most - the exponential, the sine and the cosine - the remainder does tend to zero, and it does so for every real number. That is why those three series are worth memorizing. They are exact on the whole line, they are easy to write, and almost every series computation in the rest of the course is one of them with something substituted in.
Decoder
If a function can be written as a power series centred at $a$, then the coefficient of $(x-a)^n$ must be the $n$th derivative of the function at $a$ divided by $n$ factorial.
The load-bearing word is must. This is a uniqueness statement before it is an existence statement. It does not promise a function has a series; it promises that if one exists, it is this one. So there is never an ambiguity about which series to write down, and any legitimate route to a series - substitution into a known one, differentiating another - produces the same coefficients that the derivative formula would.
The factorial in the denominator is not decoration. Differentiating $(x-a)^n$ exactly $n$ times produces $n!$ and then a constant, so dividing by $n!$ is what undoes the damage and isolates $c_n$. If you are ever unsure of the formula, differentiate $c_2(x-a)^2$ twice: you get $2c_2$, and setting that equal to $f''(a)$ gives $c_2 = f''(a)/2$, which is the formula with $n = 2$.
The usual mistake is treating the Taylor series and the function as automatically the same object. They agree at the centre to every order by construction, which makes the agreement feel like a proof, and it is not one. The honest statement is that the function equals the sum of its Taylor polynomial and a remainder, and the series represents the function exactly on the set where that remainder tends to zero.
Definitions and results
Taylor series. If $f$ has derivatives of all orders at $a$, the Taylor series of $f$ centred at $a$ is
$$ \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 $$
Maclaurin series. The centre-zero case, $a = 0$:
$$ \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n $$
There is no new theory here; the name just records the most common choice of centre.
Taylor polynomial. Truncating after the $(x-a)^n$ term gives the degree $n$ Taylor polynomial $p_n(x)$. It matches $f$ and its first $n$ derivatives at $a$, and it is the best polynomial of that degree at doing so.
Uniqueness of coefficients. If $f(x) = \sum c_n (x-a)^n$ on some open interval around $a$, then $c_n = f^{(n)}(a)/n!$ for every $n$. Any two power series representations of the same function on the same interval are identical term by term.
Remainder. Define $R_n(x) = f(x) - p_n(x)$. Then $f(x)$ equals the sum of its Taylor series at a point $x$ exactly when $R_n(x) \to 0$ as $n \to \infty$ at that $x$.
Taylor’s theorem with the Lagrange form. If $f$ has $n+1$ derivatives on an interval containing $a$ and $x$, there is a point $c$ strictly between $a$ and $x$ with
$$ R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1} $$
You rarely know $c$, but you can often bound $|f^{(n+1)}|$ on the interval, and a bound is all the remainder argument needs.
The exponential series. For every real $x$,
$$ e^{x} = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots $$
The sine and cosine series. For every real $x$,
$$ \sin x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}, \qquad \cos x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} $$
Sine is odd and gets only odd powers; cosine is even and gets only even powers. Differentiating either series term by term turns it into the other, with the expected sign.
Worked examples
Building the exponential series from scratch
Let $f(x) = e^x$ and centre at $0$. Every derivative of $e^x$ is $e^x$, so $f^{(n)}(0) = 1$ for every $n$, and the coefficients are $1/n!$. That gives the series above.
To see that it really equals $e^x$, fix a number $x$ and a bound $b$ with $|x| \le b$. On the interval between $0$ and $x$, every derivative of $e^t$ is at most $e^{b}$, so the Lagrange remainder satisfies
$$ |R_n(x)| \le \frac{e^{b}\,b^{\,n+1}}{(n+1)!} $$
The factorial eventually outgrows any fixed power, so this bound tends to $0$ as $n$ grows. Since $b$ was arbitrary, the series represents $e^x$ on the whole real line.
The sine series from a cycle of derivatives
Let $f(x) = \sin x$ and centre at $0$. The derivatives cycle with period four: $\sin x$, $\cos x$, $-\sin x$, $-\cos x$, and back. At $x = 0$ those evaluate to $0, 1, 0, -1$, repeating. Every even-order derivative vanishes, so all even powers drop out, and the odd ones alternate in sign:
$$ \sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots $$
Every derivative of sine is bounded by $1$ in absolute value, so the Lagrange remainder is at most $|x|^{n+1}/(n+1)!$, which tends to zero for every $x$. The representation holds on the whole line.
Check the first few terms against a known value. At $x = \pi/6$ the true value is $0.5$. The series gives $0.5236 - 0.02392 + 0.00033 = 0.50001$ to five places, which is right to within rounding.
A series centred away from zero
The logarithm has no Maclaurin series, since $\ln 0$ is undefined, so centre at $a = 1$. With $f(x) = \ln x$:
$$ f(1) = 0, \quad f'(x) = \frac{1}{x}, \quad f''(x) = -\frac{1}{x^2}, \quad f'''(x) = \frac{2}{x^3}, \quad f^{(4)}(x) = -\frac{6}{x^4} $$
At $x = 1$ these are $0, 1, -1, 2, -6$, and in general $f^{(n)}(1) = (-1)^{n-1}(n-1)!$ for $n \ge 1$. Dividing by $n!$ leaves $(-1)^{n-1}/n$:
$$ \ln x = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n}(x-1)^n = (x-1) - \frac{(x-1)^2}{2} + \frac{(x-1)^3}{3} - \cdots $$
The ratio test gives radius $1$, so this is valid on $(0,2)$, plus the endpoint $x = 2$ where the alternating harmonic series converges.
A Taylor polynomial used as an approximation
Approximate $\sqrt{5}$ using the degree three Taylor polynomial of $f(x) = \sqrt{x}$ centred at $a = 4$, chosen because $4$ is the nearest point where the square root is exact.
$$ f(4) = 2, \quad f'(x) = \tfrac12 x^{-1/2}, \quad f''(x) = -\tfrac14 x^{-3/2}, \quad f'''(x) = \tfrac38 x^{-5/2} $$
At $x = 4$: $f' = 1/4$, $f'' = -1/32$, $f''' = 3/256$. Dividing by the factorials gives $c_1 = 1/4$, $c_2 = -1/64$, $c_3 = 1/512$, so
$$ p_3(x) = 2 + \frac{x-4}{4} - \frac{(x-4)^2}{64} + \frac{(x-4)^3}{512} $$
Evaluate at $x = 5$, where $x - 4 = 1$:
$$ p_3(5) = 2 + 0.25 - 0.015625 + 0.001953125 = 2.236328125 $$
The true value is $2.2360679\ldots$, so three terms past the constant buy four correct digits. Notice the terms are shrinking and alternating, which is the visible sign that the remainder is small here.
Practice
Both directions appear in these drills: producing a Taylor or Maclaurin series from derivatives at the centre, and recognizing a function from the series that represents it. Keep the three memorized series close at hand.
Practice
Generated problems for this section, graded instantly.
Quiz
Five items on the coefficient formula, Taylor polynomials, and the standard exponential and trigonometric series.
Quiz
5 problems with a score at the end.