Calculus 2Power Series

Taylor and Maclaurin Series

cₙ = f⁽ⁿ⁾(a)/n!.

Not started Jump to practice

Not every function is a geometric series in disguise. Taylor series give a recipe for any function you can differentiate again and again: the coefficients come from its higher derivatives at the center, using term-by-term differentiation.

Why it works

Suppose $$\begin{aligned} f(x) = c_0 &+ c_1(x - a) + c_2(x - a)^{2} \\ &+ c_3(x - a)^{3} + \cdots. \end{aligned}$$ At $x = a$ every term but the first vanishes, so $c_0 = f(a)$. Differentiate once: $$\begin{aligned} f'(x) = c_1 &+ 2c_2(x - a) \\ &+ 3c_3(x - a)^{2} + \cdots, \end{aligned}$$ so $c_1 = f'(a)$. Again: $f''(x) = 2c_2 + 3\cdot 2\,c_3(x - a) + \cdots$, so $c_2 = \frac{f''(a)}{2}$. After $n$ differentiations the term $c_n(x - a)^{n}$ has become $n!\,c_n$, so $$c_n = \frac{f^{(n)}(a)}{n!}.$$

Key idea

The Taylor series of $f$ at $a$ is $\sum_{n=0}^{\infty}\frac{f^{(n)}(a)}{n!}(x - a)^{n}$; at $a = 0$ it is called a Maclaurin series. The partial sum $T_n(x)$ is the Taylor polynomial of degree $n$: the polynomial that matches $f$ and its first $n$ derivatives at $a$.

Worked example: The exponential

Find the Maclaurin series of $e^{x}$.
  1. Every derivative of $e^{x}$ is $e^{x}$, and $e^{0} = 1$.
  2. So $c_n = \frac{1}{n!}$: $e^{x} = 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \cdots = \sum\frac{x^{n}}{n!}$.
  3. The ratio test gives $R = \infty$, and (see the next topic) the series equals $e^{x}$ for every $x$.

Answer: $\sum\frac{x^{n}}{n!}$

Common mistake

Forgetting the $n!$. Writing $e^{x} \approx 1 + x + x^{2} + x^{3}$ uses $f^{(n)}(0)$ as the coefficient. At $x = 1$ that gives 4 instead of about $2.67$ (and $e \approx 2.718$). The factorial undoes the $n!$ that appears when you differentiate $(x - a)^{n}$ $n$ times. Check by differentiating your polynomial at the center: you should get back $f^{(n)}(a)$.

Worked example: Sine

Find the Maclaurin series of $\sin x$.
  1. Derivatives at 0 cycle: $\sin 0 = 0$, $\cos 0 = 1$, $-\sin 0 = 0$, $-\cos 0 = -1$, then repeat.
  2. Only odd powers survive, with alternating signs: $$\begin{aligned} \sin x &= x - \frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \cdots \\ &= \sum\frac{(-1)^{n}x^{2n+1}}{(2n + 1)!}. \end{aligned}$$

Answer: $x - \frac{x^{3}}{6} + \frac{x^{5}}{120} - \cdots$

Taylor polynomials of $\sin x$ at 0. Each new term bends the polynomial to follow the sine wave farther from the center. Move the probe point to see the error shrink.

Worked example: Away from 0

Find the Taylor polynomial $T_2$ of $\sqrt{x}$ centered at 4.
  1. $f(4) = 2$; $f'(x) = \frac{1}{2\sqrt{x}}$, so $f'(4) = \frac{1}{4}$; $f''(x) = -\frac{1}{4x^{3/2}}$, so $f''(4) = -\frac{1}{32}$.
  2. $T_2(x) = 2 + \frac{1}{4}(x - 4) - \frac{1}{64}(x - 4)^{2}$ (divide $f''(4)$ by $2!$).
  3. Check: $$\begin{aligned} &T_2(4.41) \\ &= 2 + 0.1025 - 0.00263 \\ &\approx 2.0999, \end{aligned}$$ close to $\sqrt{4.41} = 2.1$.

Answer: $2 + \frac{x - 4}{4} - \frac{(x - 4)^{2}}{64}$

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • OpenStax Calculus Volume 2, Section 6.3: Taylor and Maclaurin Series
  • Paul’s Online Math Notes (Lamar University), Calculus II: Taylor Series
@teddyrookbook GitHub