# Taylor Series and Maclaurin Series: Formula, Examples, Error Bound

> Learn the Taylor and Maclaurin series formulas, memorize the big four series, build new series from old ones and bound the error of a Taylor polynomial.

Source: https://practicecalculus.com/blog/taylor-series
Updated: 2026-09-04

## Key takeaways

- The Taylor series of $f$ at $a$ is $\sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n$, and a Maclaurin series is the special case $a = 0$.
- Memorize four series: $e^x$, $\sin x$, $\cos x$ and $\frac{1}{1-x}$. Most other series are built from them by substitution, multiplication, differentiation or integration.
- A Taylor polynomial of degree $n$ matches the value and first $n$ derivatives of $f$ at the center, so it is most accurate near the center.
- The Taylor remainder bound $|R_n(x)| \le \frac{M}{(n+1)!}|x-a|^{n+1}$ tells you how large the error can possibly be.

Your calculator gives you $\sin(0.5)$ instantly, but $\sin$ is not something you can compute with plus, minus, times and divide. Taylor series are how you turn a function like $\sin x$, $e^x$ or $\ln x$ into a polynomial you can actually evaluate, and they show up everywhere from physics to the inside of that calculator.

This guide gives you the Taylor and Maclaurin formulas, the four series worth memorizing, how to build new series without taking derivatives, and how to bound the error when you stop after a few terms.

## What is a Taylor series?

A **Taylor series** rewrites a function as an infinite polynomial centered at a point $a$. The coefficients come from the derivatives of $f$ 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 + \frac{f'''(a)}{3!}(x-a)^3 + \cdots$$

A **Maclaurin series** is the special case $a = 0$:

$$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \cdots$$

The idea is simple. The first term matches the value of $f$ at $a$. Adding the second term matches the slope too, which gives the tangent line from [linear approximation](/blog/linear-approximation). The third term matches the concavity, and so on. Each new term copies one more derivative.

If you stop after the $(x-a)^n$ term, you get the **Taylor polynomial of degree $n$**, written $T_n(x)$.

## How to find a Taylor series step by step

1. Compute $f(a), f'(a), f''(a), f'''(a), \dots$ until you see a pattern.
2. Divide the $n$th derivative value by $n!$ to get the coefficient $c_n$.
3. Write the series $\sum c_n (x-a)^n$, using the pattern for a general term.
4. If asked, find the interval of convergence with the ratio test, as in our [power series](/blog/power-series) guide.

## Worked example 1: the Maclaurin series of e^x

**Step 1. Take derivatives.** Every derivative of $e^x$ is $e^x$, so $f^{(n)}(0) = e^0 = 1$ for every $n$.

**Step 2. Build the coefficients.** $c_n = \frac{1}{n!}$.

**Step 3. Write the series.**

$$e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + \cdots$$

The ratio test gives $\frac{|x|}{n+1} \to 0$, so this works for every real $x$. Plug in $x = 1$ and you get a fast way to compute $e = 1 + 1 + \frac{1}{2} + \frac{1}{6} + \frac{1}{24} + \cdots \approx 2.718$.

## Worked example 2: the Maclaurin series of sin x

**Step 1. Take derivatives and evaluate at 0.**

| $n$ | $f^{(n)}(x)$ | $f^{(n)}(0)$ |
| --- | --- | --- |
| 0 | $\sin x$ | $0$ |
| 1 | $\cos x$ | $1$ |
| 2 | $-\sin x$ | $0$ |
| 3 | $-\cos x$ | $-1$ |
| 4 | $\sin x$ | $0$ |

The values cycle $0, 1, 0, -1$ forever.

**Step 2. Keep only the nonzero terms.** The even powers vanish. The odd powers alternate in sign, with $n!$ underneath.

**Step 3. Write the series.**

$$\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}$$

The same steps for $\cos x$ give the even powers instead:

$$\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!}$$

A quick sanity check: $\sin x$ is odd and its series has only odd powers. $\cos x$ is even and its series has only even powers.

Here is what the Taylor polynomials of $\sin x$ look like. Each extra term hugs the curve over a wider stretch.

```graph
title: 'The graph of sin x with its Taylor polynomials of degree 1, 3 and 5 centered at 0'
caption: 'Near $x = 0$ all three polynomials match $\sin x$. Higher degree polynomials stay close over a wider interval before peeling away.'
x: [-6.5, 6.5]
y: [-3, 3]
functions:
    - expr: sin(x)
      label: y = sin x
    - expr: x
      label: degree 1, y = x
      dashed: true
    - expr: x - x^3/6
      label: degree 3
      dashed: true
    - expr: x - x^3/6 + x^5/120
      label: degree 5
      dashed: true
```

## Worked example 3: a Taylor series centered at a = 1

Find the Taylor series of $f(x) = \ln x$ centered at $a = 1$.

**Step 1. Take derivatives.**

$$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}$$

The pattern for $n \ge 1$ is $f^{(n)}(x) = \frac{(-1)^{n-1}(n-1)!}{x^n}$.

**Step 2. Evaluate at $a = 1$.** $f(1) = 0$ and $f^{(n)}(1) = (-1)^{n-1}(n-1)!$ for $n \ge 1$.

**Step 3. Divide by $n!$.** Since $\frac{(n-1)!}{n!} = \frac{1}{n}$, the coefficient is $c_n = \frac{(-1)^{n-1}}{n}$.

**Step 4. Write the series.**

$$\ln x = (x-1) - \frac{(x-1)^2}{2} + \frac{(x-1)^3}{3} - \cdots = \sum_{n=1}^{\infty} \frac{(-1)^{n-1}(x-1)^n}{n}$$

It converges for $0 < x \le 2$.

## The big four Maclaurin series to memorize

| Function | Maclaurin series | Valid for |
| --- | --- | --- |
| $e^x$ | $\sum \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$ | all $x$ |
| $\sin x$ | $\sum \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots$ | all $x$ |
| $\cos x$ | $\sum \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots$ | all $x$ |
| $\frac{1}{1-x}$ | $\sum x^n = 1 + x + x^2 + x^3 + \cdots$ | $-1 < x < 1$ |

With these four in your pocket you can skip the derivatives for most exam questions.

## Worked example 4: building new series from the big four

You can substitute, multiply, differentiate and integrate series term by term, inside their interval of convergence.

**Substitute.** For $e^{-x^2}$, replace $x$ with $-x^2$ in the series for $e^x$:

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

**Multiply.** For $x\cos x$, multiply every term of the cosine series by $x$:

$$x\cos x = x - \frac{x^3}{2!} + \frac{x^5}{4!} - \cdots$$

**Integrate.** Replace $x$ with $-x^2$ in $\frac{1}{1-x}$ to get

$$\frac{1}{1+x^2} = 1 - x^2 + x^4 - x^6 + \cdots, \quad |x| < 1$$

Since $\int_0^x \frac{dt}{1+t^2} = \arctan x$, integrate term by term:

$$\arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \cdots$$

Each of these would have taken many derivatives to get directly.

## Taylor polynomials as approximations

You rarely need the whole infinite series. A few terms already give an excellent approximation near the center, which is why physicists replace $\sin\theta$ with $\theta$ for a small pendulum swing and $\cos\theta$ with $1 - \frac{\theta^2}{2}$.

For example, $T_2$ for $\cos x$ at $0$ gives $\cos(0.2) \approx 1 - \frac{0.04}{2} = 0.98$. The true value is $0.980067$, so two terms are already correct to four decimal places. The farther you move from the center, the more terms you need for the same accuracy, and the remainder bound below tells you exactly how many.

## The Taylor remainder: how big is the error?

When you replace $f$ with $T_n$, the error is the **remainder** $R_n(x) = f(x) - T_n(x)$. Taylor's inequality bounds it:

$$|R_n(x)| \le \frac{M}{(n+1)!}\,|x-a|^{n+1}$$

where $M$ is any number with $|f^{(n+1)}(t)| \le M$ for all $t$ between $a$ and $x$.

Read it as: the error is controlled by the next derivative, the next factorial and how far you are from the center. Being close to $a$ and using more terms both shrink it.

## Worked example 5: estimating sin(0.5) with an error bound

Estimate $\sin(0.5)$ with $T_3$ and bound the error.

**Step 1. Evaluate the polynomial.**

$$T_3(0.5) = 0.5 - \frac{(0.5)^3}{6} = 0.5 - 0.0208\overline{3} = 0.4791\overline{6}$$

**Step 2. Find $M$.** The fourth derivative of $\sin x$ is $\sin x$, and $|\sin t| \le 1$, so $M = 1$.

**Step 3. Apply the bound with $n = 3$.**

$$|R_3(0.5)| \le \frac{1}{4!}(0.5)^4 = \frac{0.0625}{24} \approx 0.0026$$

So $\sin(0.5)$ is within $0.0026$ of $0.47917$. The true value is $0.47943$, and the actual error is about $0.00026$, comfortably inside the bound.

> **Tip:** for $\sin x$ the $x^4$ coefficient is 0, so $T_3 = T_4$. Using $n = 4$ in the bound gives $\frac{(0.5)^5}{5!} \approx 0.00026$, a much sharper estimate.

Because this series alternates with decreasing terms, the alternating series estimate gives the same sharp answer: the error is at most the first term you dropped, $\frac{(0.5)^5}{120}$.

## Common mistakes with Taylor series

1. **Forgetting the factorial.** The coefficient is $\frac{f^{(n)}(a)}{n!}$, not just $f^{(n)}(a)$.
2. **Using powers of $x$ when $a \ne 0$.** A series centered at 1 is in powers of $(x - 1)$.
3. **Mixing up sine and cosine.** Sine is odd and starts with $x$. Cosine is even and starts with 1.
4. **Taking derivatives when substitution works.** For $e^{3x}$ just replace $x$ with $3x$ in the series for $e^x$.
5. **Ignoring the interval of convergence.** The series for $\frac{1}{1-x}$ is useless at $x = 2$.
6. **Using the wrong derivative in the error bound.** The bound for $T_n$ needs a bound on $f^{(n+1)}$, one derivative past the last term you kept.

## Practice turns formulas into instinct

Once the big four are memorized and you have built a few series by substitution, Taylor series stop feeling like a wall of factorials. The interactive lesson below gives you series to build and approximations to check, with instant feedback on each coefficient so you see exactly which term went wrong.

## Frequently asked questions

### What is the difference between a Taylor series and a Maclaurin series?

A Maclaurin series is a Taylor series centered at $a = 0$. The formula is the same, you just evaluate the derivatives at 0 and use powers of $x$ instead of powers of $(x - a)$.

### What is a Taylor polynomial?

A Taylor polynomial is a Taylor series cut off after a finite number of terms. The degree $n$ Taylor polynomial $T_n(x)$ keeps the terms up to $(x-a)^n$. It approximates $f$ well near the center, and the approximation usually improves as $n$ grows.

### How do you find the error of a Taylor polynomial?

Use the Taylor remainder bound: if $|f^{(n+1)}| \le M$ between $a$ and $x$, then $|f(x) - T_n(x)| \le \frac{M}{(n+1)!}|x-a|^{n+1}$. For an alternating series with decreasing terms you can also bound the error by the first omitted term.

### Does a Taylor series always equal the function?

Not always. The series has to converge, which only happens inside its interval of convergence, and even then it must converge to $f$. For $e^x$, $\sin x$ and $\cos x$ it equals the function for every $x$, while for $\frac{1}{1-x}$ it only works for $|x| < 1$.

### Why do Taylor series use factorials?

The $n$th derivative of $(x-a)^n$ is $n!$. Dividing by $n!$ cancels that, so the $n$th derivative of the series at $a$ comes out to exactly $f^{(n)}(a)$, which is what makes the series match the function.
