∫Yoboa Math
Home / Guides / Taylor and Maclaurin Series

Taylor and Maclaurin Series

A Taylor series writes a function as an infinite polynomial built from its derivatives at one point. Truncating it gives a polynomial that approximates the function near that point.

The formula

\[f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(a)}{n!}(x-a)^n = f(a) + f'(a)(x-a) + \frac{f^{\prime\prime}(a)}{2!}(x-a)^2 + \cdots\]

When \(a = 0\) it's called a Maclaurin series.

The series to memorize

FunctionMaclaurin seriesConverges for
\(e^x\)\(\sum \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \cdots\)all \(x\)
\(\sin x\)\(x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots\)all \(x\)
\(\cos x\)\(1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots\)all \(x\)
\(\frac{1}{1-x}\)\(1 + x + x^2 + x^3 + \cdots\)\(|x|<1\)
\(\ln(1+x)\)\(x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots\)\(-1 < x \le 1\)
\(\arctan x\)\(x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots\)\(|x|\le1\)

Build new series from known ones

You rarely need to compute derivatives. Substitute into a known series instead:

\[e^{-x^2} = \sum_{n=0}^\infty\frac{(-x^2)^n}{n!} = 1 - x^2 + \frac{x^4}{2} - \frac{x^6}{6} + \cdots\]

Integrating that term by term gives a series for \(\int e^{-x^2}\,dx\), an integral with no elementary antiderivative.

Example: Taylor series of \(\ln x\) at \(a = 1\)

\(f(1) = 0\), \(f'(1) = 1\), \(f^{\prime\prime}(1) = -1\), \(f^{\prime\prime\prime}(1) = 2\), so

\[\ln x = (x-1) - \frac{(x-1)^2}{2} + \frac{(x-1)^3}{3} - \cdots\]

How good is the approximation?

For alternating series, the error is at most the first term you left out. Approximating \(\sin(0.1)\) with \(x - \frac{x^3}{6}\):

\[\sin(0.1)\approx 0.1 - \frac{0.001}{6} = 0.0998333\ldots,\quad |\text{error}| \le \frac{(0.1)^5}{120}\approx 8.3\times10^{-8}\]

In general, Taylor's inequality bounds the error by \(\frac{M}{(n+1)!}|x-a|^{n+1}\), where \(M\) bounds \(|f^{(n+1)}|\) on the interval.

Want to see it? The Taylor example on the graphing calculator plots \(\sin x\) with its first three Taylor polynomials.

Try your own

Paste any integral into the integral calculator to get the full step-by-step solution and a graph.

More techniques