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.
By the PracticeCalculus team Published 7 min read
On this page
- What is a Taylor series?
- How to find a Taylor series step by step
- Worked example 1: the Maclaurin series of e^x
- Worked example 2: the Maclaurin series of sin x
- Worked example 3: a Taylor series centered at a = 1
- The big four Maclaurin series to memorize
- Worked example 4: building new series from the big four
- Taylor polynomials as approximations
- The Taylor remainder: how big is the error?
- Worked example 5: estimating sin(0.5) with an error bound
- Common mistakes with Taylor series
- Practice turns formulas into instinct
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:
A Maclaurin series is the special case a = 0:
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. 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
- Compute f(a), f'(a), f''(a), f'''(a), \dots until you see a pattern.
- Divide the nth derivative value by n! to get the coefficient c_n.
- Write the series \sum c_n (x-a)^n, using the pattern for a general term.
- If asked, find the interval of convergence with the ratio test, as in our 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.
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.
The same steps for \cos x give the even powers instead:
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.
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.
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.
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:
Multiply. For x\cos x, multiply every term of the cosine series by x:
Integrate. Replace x with -x^2 in \frac{1}{1-x} to get
Since \int_0^x \frac{dt}{1+t^2} = \arctan x, integrate term by term:
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:
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.
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.
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
- Forgetting the factorial. The coefficient is \frac{f^{(n)}(a)}{n!}, not just f^{(n)}(a).
- Using powers of x when a \ne 0. A series centered at 1 is in powers of (x - 1).
- Mixing up sine and cosine. Sine is odd and starts with x. Cosine is even and starts with 1.
- Taking derivatives when substitution works. For e^{3x} just replace x with 3x in the series for e^x.
- Ignoring the interval of convergence. The series for \frac{1}{1-x} is useless at x = 2.
- 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.
Practice it now
Common Maclaurin series
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson