Taylor and Maclaurin Series
Textbook Reference
| Primary source | OpenStax Calculus Volume 2, Section 6.3: “Taylor and Maclaurin Series” |
| Direct link | https://openstax.org/books/calculus-volume-2/pages/6-3-taylor-and-maclaurin-series |
| Textbook used in class | Stewart, Calculus, Section 11.10: “Taylor and Maclaurin Series” (Examples 1, 2, 3, 4) |
Opening Scenario
If a function $f$ has a power series representation $f(x) = \sum c_n(x-a)^n$, what must the coefficients $c_n$ be? Differentiating the series $n$ times at $x = a$ shows that $c_n = f^{(n)}(a)/n!$. This forces a unique formula for the coefficients -- the Taylor series -- and explains why functions like $e^x$, $\sin x$, and $\cos x$ can be written as infinite polynomials with those exact coefficients.
Quick Reference
Taylor series of $f$ centered at $a$: \[ f(x) = \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: Taylor series with $a = 0$.
Standard Maclaurin series (memorize these):
| Function | Maclaurin series | Interval |
|---|---|---|
| $e^x$ | $\displaystyle\sum_{n=0}^\infty \dfrac{x^n}{n!}$ | $(-\infty,\infty)$ |
| $\sin x$ | $\displaystyle\sum_{n=0}^\infty \dfrac{(-1)^n x^{2n+1}}{(2n+1)!}$ | $(-\infty,\infty)$ |
| $\cos x$ | $\displaystyle\sum_{n=0}^\infty \dfrac{(-1)^n x^{2n}}{(2n)!}$ | $(-\infty,\infty)$ |
| $\dfrac{1}{1-x}$ | $\displaystyle\sum_{n=0}^\infty x^n$ | $(-1,1)$ |
| $\ln(1+x)$ | $\displaystyle\sum_{n=1}^\infty \dfrac{(-1)^{n-1}x^n}{n}$ | $(-1,1]$ |
| $\arctan x$ | $\displaystyle\sum_{n=0}^\infty \dfrac{(-1)^n x^{2n+1}}{2n+1}$ | $[-1,1]$ |
Key Concepts
1. Where the Formula Comes From
Suppose $f(x) = c_0 + c_1(x-a) + c_2(x-a)^2 + c_3(x-a)^3 + \cdots$.
At $x = a$: $f(a) = c_0$. Differentiate: $f'(x) = c_1 + 2c_2(x-a) + 3c_3(x-a)^2 + \cdots$; at $x = a$: $f'(a) = c_1$. Differentiate again: $f''(a) = 2c_2$, so $c_2 = f''(a)/2!$. After $n$ differentiations: $f^{(n)}(a) = n!\, c_n$, so $c_n = f^{(n)}(a)/n!$.
This derivation shows that if $f$ has a power series, the coefficients must be $f^{(n)}(a)/n!$. Whether $f$ actually equals its Taylor series at a given $x$ requires the remainder estimate (Taylor’s Inequality).
2. Computing a Taylor Series From Derivatives
Example 1. Find the Maclaurin series for $e^x$ and its radius of convergence. (Stewart 11.10, Example 1.)
All derivatives of $e^x$ are $e^x$. At $a = 0$: $f^{(n)}(0) = e^0 = 1$.
\[ e^x = \sum_{n=0}^{\infty} \frac{1}{n!} x^n = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots \]
Apply the Ratio Test: $|a_{n+1}/a_n| = |x|/(n+1) \to 0$ for every $x$. Radius $R = \infty$.
Example 2. Find the Maclaurin series for $\sin x$. (Stewart 11.10, Example 2.)
Derivatives cycle: $\sin x \to \cos x \to -\sin x \to -\cos x \to \sin x$. At $x = 0$: $f^{(n)}(0)$ is $0, 1, 0, -1, 0, 1, \ldots$ (zero for even $n$, alternating $\pm 1$ for odd $n$).
Only odd powers survive: \[ \sin x = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n+1)!} x^{2n+1} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots \]
Example 3. Find the Maclaurin series for $\cos x$.
Either differentiate the $\sin x$ series term by term, or compute directly ($\cos 0 = 1$, $\cos'(0) = -\sin 0 = 0$, etc.). Only even powers survive: \[ \cos x = \sum_{n=0}^{\infty} \frac{(-1)^n}{(2n)!} x^{2n} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \]
3. Using Known Series Instead of Computing From Scratch
Once you know the standard series, build new ones by substitution, multiplication, or differentiation -- no new derivative computations needed.
Example 4. Find the Maclaurin series for $e^{-x^2}$.
Substitute $u = -x^2$ into $e^u = \sum u^n/n!$: \[ e^{-x^2} = \sum_{n=0}^{\infty} \frac{(-x^2)^n}{n!} = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{n!}. \]
Radius $R = \infty$ (same as $e^u$). This series is the only way to write this function as a power series; $e^{-x^2}$ has no elementary antiderivative.
thinking a Taylor series always converges to $f(x)$. A function can have a Taylor series that converges but does not converge to $f(x)$. The classic example is $f(x) = e^{-1/x^2}$ (defined to be $0$ at $x = 0$): all derivatives at $x = 0$ are $0$, so the Maclaurin series is the zero series, which converges to $0$, not to $f(x)$ for $x \neq 0$. Taylor’s Inequality (the remainder estimate) is the tool that confirms a Taylor series actually converges to $f$.
Common Errors Summary
| Error | Correction |
|---|---|
| Writing $c_n = f^{(n)}(a)$ without dividing by $n!$ | The coefficient is $f^{(n)}(a)/n!$; the $n!$ comes from differentiating the power $(x-a)^n$ $n$ times |
| Forgetting that $e^x$ series uses $1/n!$, not $1/n$ | Each coefficient is $1/n!$; do not confuse with the $\ln(1+x)$ series which uses $1/n$ |
| Using the wrong sign pattern for $\sin$ vs. $\cos$ | $\sin$: odd powers, starts with $+x$; $\cos$: even powers, starts with $+1$ |
Leveled Practice
Problem 1. Write the first four nonzero terms of the Maclaurin series for $\cos(x^2)$.
Show answer
Substitute $u = x^2$ into $\cos u = 1 - u^2/2! + u^4/4! - \cdots$: \[ \cos(x^2) = 1 - \frac{x^4}{2!} + \frac{x^8}{4!} - \frac{x^{12}}{6!} + \cdots \]
Problem 2. Find the Maclaurin series for $xe^x$ using the known series for $e^x$.
Show answer
Multiply $e^x = \sum_{n=0}^\infty x^n/n!$ by $x$: \[ xe^x = \sum_{n=0}^\infty \frac{x^{n+1}}{n!} = x + x^2 + \frac{x^3}{2!} + \frac{x^4}{3!} + \cdots \]