Taylor and Maclaurin Series
The Taylor series of \(f\) about \(a\) is \(\sum \frac{f^{(n)}(a)}{n!}(x-a)^n\) — a power series whose coefficients are read straight off \(f\)'s derivatives at the center. Center it at \(a = 0\) and it's called a Maclaurin series.
By the end you'll be able to build a Taylor or Maclaurin series by evaluating successive derivatives at the center, and say where the series actually converges to \(f\) — namely, wherever the remainder tends to 0.
Predict: add more terms — does the fit widen outward from the center a, or improve everywhere at once? Slide n to check.
The dashed curve is \(T_n\), the degree-\(n\) Taylor polynomial of \(\sin x\) about the center \(a\). The shaded band marks where \(T_n\) stays within 0.05 of the true curve. Drag a to move the center and watch the band travel with it. (Small surprise at \(a = 0\): stepping \(n = 3 \to 4\) changes nothing — sine's even-order derivatives vanish there, so the added term is zero.)
T3 stays within 0.05 of sin x on x ∈ [−1.44, 1.44] — a window of width 2.88 around a = 0.00.
A Taylor series is built, not guessed: differentiate \(f\) again and again, evaluate each derivative at the center \(a\), divide by \(n!\), and attach \((x-a)^n\). The result equals \(f\) exactly where the leftover error — the remainder — dies out.
Two ways to see it
Each new term forces one more kind of agreement at the center: \(T_0\) matches \(f\)'s value at \(a\), \(T_1\) also matches its slope, \(T_2\) its bend, and so on — \(T_n\) is the unique degree-\(n\) polynomial matching \(f\) and its first \(n\) derivatives at \(x = a\). That's why, in the demo above, the dashed \(T_n\) hugs \(\sin x\) tightest at the center and the good-fit band widens outward from \(a\) as \(n\) grows — the polynomial earns accuracy from the center out.
If \(f\) has derivatives of every order at \(x = a\), its Taylor series about \(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$$ — the Maclaurin series when \(a = 0\). Having a formal series is not the same as the series equaling \(f(x)\). Write \(f(x) = T_n(x) + R_n(x)\) — Taylor polynomial plus remainder. The series converges to \(f(x)\) at a given \(x\) exactly when \(\lim_{n\to\infty} R_n(x) = 0\).
The construction, step by step
Building a Taylor series is a mechanical, repeatable process — you'll use it the same way every time:
- Compute \(f(a), f'(a), f''(a), f'''(a), \ldots\) — successive derivatives evaluated at the center \(a\).
- Look for a pattern in \(f^{(n)}(a)\) as a function of \(n\) (sign, factorial, power) so you can write the general term in closed form.
- Form \(c_n = \dfrac{f^{(n)}(a)}{n!}\) and assemble \(\sum c_n (x-a)^n\).
Find the Maclaurin series for \(f(x) = \cos x\). Differentiate repeatedly: \(\cos x,\; -\sin x,\; -\cos x,\; \sin x,\; \cos x, \ldots\) — the pattern repeats with period 4. Evaluate at \(a = 0\): \(1,\; 0,\; -1,\; 0,\; 1, \ldots\) — odd-order derivatives are always 0, even-order ones alternate \(1, -1, 1, -1, \ldots\). Only even powers survive; writing \(n = 2k\), the coefficient of \(x^{2k}\) is \(\dfrac{(-1)^k}{(2k)!}\), so $$\cos x = \sum_{k=0}^{\infty}\frac{(-1)^k}{(2k)!}x^{2k} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \cdots$$ Because \(|R_n(x)| \to 0\) for every real \(x\) (the remainder is bounded using \(|\cos x|, |\sin x| \le 1\)), this series converges to \(\cos x\) for all \(x \in (-\infty, \infty)\).
Same recipe, the demo's function: build the Maclaurin series of \(f(x) = \sin x\). The derivatives cycle \(\sin x,\; \cos x,\; -\sin x,\; -\cos x, \ldots\); at \(a = 0\) they evaluate to \(0,\; 1,\; 0,\; -1,\; 0,\; 1, \ldots\) — this time the even-order derivatives vanish and the odd ones alternate. So \(c_1 = 1\), \(c_2 = 0\), and \(c_3 = f'''(0)/3! = \) ____. Finish the coefficient and write the first two nonzero terms.
Reveal the answer
\(c_3 = \dfrac{-1}{3!} = -\dfrac{1}{6}\), so \(\sin x = x - \dfrac{x^3}{6} + \cdots\) — exactly the \(T_3\) the demo starts with. In general \(\sin x = \sum_{k=0}^{\infty} \dfrac{(-1)^k}{(2k+1)!} x^{2k+1}\): only odd powers, signs alternating. Set \(n = 3\), \(a = 0\) on the sliders above and you're looking at \(x - x^3/6\) hugging the sine curve.
More info — two routes to the same series
The previous lesson showed you can differentiate a known power series term by term inside its interval of convergence. That gives a second route to Taylor series: instead of grinding out derivatives of \(\sin x\) from scratch, differentiate the cosine series from the worked example term by term and (after a sign flip) you land on the very same sine series the derivative construction builds. When both routes are available, they must agree — a power series representation of \(f\) about \(a\) is unique, and its coefficients are forced to be \(f^{(n)}(a)/n!\). The OpenStax section in Dive deeper below develops this uniqueness and the remainder-based convergence argument in full.
Check your understanding
Using the Maclaurin construction, what is the coefficient of \(x^3\) in the Maclaurin series of \(f(x) = e^{2x}\)?
A function \(f\) has a Maclaurin series that converges for every real \(x\). Does the series necessarily equal \(f(x)\) everywhere?
Suppose \(f(2) = 5\), \(f'(2) = -3\), and \(f''(2) = 8\). What are the first three terms of the Taylor series of \(f\) about \(a = 2\)?
You already know \(\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots\). Differentiating it term by term (valid inside the interval of convergence) gives \(-x + \frac{x^3}{3!} - \frac{x^5}{5!} + \cdots\). Which function is this the Maclaurin series of?
Recap
- Taylor series of \(f\) about \(a\): \(\sum_{n=0}^{\infty} \dfrac{f^{(n)}(a)}{n!}(x-a)^n\) — called a Maclaurin series when \(a = 0\).
- Construction: evaluate successive derivatives at the center, spot the pattern in \(f^{(n)}(a)\), then form \(c_n = f^{(n)}(a)/n!\).
- \(T_n\) (the degree-\(n\) partial sum) matches \(f\) and its first \(n\) derivatives at \(a\) — accuracy spreads outward from the center as \(n\) grows.
- The series converges to \(f(x)\) exactly where the remainder \(R_n(x) \to 0\) — series convergence alone doesn't guarantee equality with \(f\).
- \(\cos x = \sum_{k=0}^{\infty} \dfrac{(-1)^k}{(2k)!} x^{2k}\), converging to \(\cos x\) for all real \(x\).
Dive deeper
- Paul's Online Math Notes — Taylor Series Walk through the derivative-pattern construction of Taylor/Maclaurin series.
- OpenStax Calculus Volume 2, §6.3 Taylor and Maclaurin Series Give formal definitions and discuss remainder/convergence.
Sources
- Taylor and Maclaurin Series