Taylor and Maclaurin Series Calculator (Free)

CalculusFreeNo sign-up

The Taylor polynomial of order n about x = a is Pn(x) = Σ f⁽ᵏ⁾(a)(x − a)ᵏ/k! for k = 0 to n. For sin x about a = 0 with n = 5, it is x − x³/6 + x⁵/120, so sin 1 ≈ 0.841667 (true value 0.841471). The Taylor series calculator below builds the polynomial, the derivative table and the error bound for you.

Taylor and Maclaurin series calculator
Reads asReads asf(x) = sin(x)
Center a = 0 gives the Maclaurin polynomial. Type e^x, sin(x), ln(x), 1/(1-x), sqrt(x), arctan(x); the center can be exact, such as pi/4. Enter an x-value to see the approximation, the true error and the Lagrange error bound.
Try:
Maclaurin polynomial of order 5
P₅(x) =x − x36 + x5120
General term (n = 0 to ∞)(−1)ⁿ x²ⁿ⁺¹ / (2n + 1)!
Series converges forall real x
P₅(1)≈ 0.84166667
f(1)≈ 0.84147098
Actual error |f − P₅|≈ 0.0001957
Lagrange error bound≤ 0.001169
−2−112−1−0.50.51
f(x) = sin(x)P₅(x), order 5
Derivative table (k = 0 to 5)
k f⁽ᵏ⁾(x) f⁽ᵏ⁾(0) cₖ = f⁽ᵏ⁾(a)/k!
0 sin(x) 0 0
1 cos(x) 1 1
2 −sin(x) 0 0
3 −cos(x) −1 −16
4 sin(x) 0 0
5 cos(x) 1 1120
Show steps (10 steps)
  1. FormulaP₅(x) = Σ f⁽ᵏ⁾(a)/k! · (x − a)ᵏ for k = 0 to 5, with a = 0 (a Maclaurin polynomial).
  2. k = 0f(x) = sin(x); f(0) = 0, so c₀ = 0.
  3. k = 1f′(x) = cos(x); f′(0) = 1, so c₁ = 1.
  4. k = 2f″(x) = −sin(x); f″(0) = 0, so c₂ = f″(0)/2! = 0.
  5. k = 3f‴(x) = −cos(x); f‴(0) = −1, so c₃ = f‴(0)/3! = −1/6.
  6. k = 4f⁽⁴⁾(x) = sin(x); f⁽⁴⁾(0) = 0, so c₄ = f⁽⁴⁾(0)/4! = 0.
  7. k = 5f⁽⁵⁾(x) = cos(x); f⁽⁵⁾(0) = 1, so c₅ = f⁽⁵⁾(0)/5! = 1/120.
  8. AssembleMultiply each cₖ by (x − a)ᵏ and add, leaving out zero terms: P₅(x) = x − x³/6 + x⁵/120.
  9. ApproximateP₅(1) ≈ 0.8416666667, while f(1) ≈ 0.8414709848. The actual error is about 0.0001957.
  10. Lagrange error bound|R₅(x)| ≤ M·|x − a|⁶/(6)!, where M is the largest value of |f⁽⁶⁾| between a and x. Here M ≈ 0.841471 (at x ≈ 1), so the error is at most 0.841471 × 1⁶ / 720 ≈ 0.001169.

Next: see each derivative with rules · limit calculator · summation calculator

Taylor and Maclaurin Series Calculator (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the Taylor series calculator

  1. Type the function, for example e^x, sin(x), ln(x), 1/(1-x) or sqrt(x). Any combination works: x sin(x), e^(-x^2), tan(x).
  2. Enter the center a. Use 0 for a Maclaurin polynomial. Exact centers such as pi/4 are kept exact in the coefficients.
  3. Choose the order n, from 0 to 12. The polynomial includes every power of (x − a) up to the nth.
  4. Optionally enter an x-value. You get Pn(x), the true value f(x), the actual error and the Lagrange error bound.
  5. Read the derivative table, then open Show steps to see how each coefficient f⁽ᵏ⁾(a)/k! was found.

Taylor series formula

A Taylor series writes a function as an infinite sum of powers of (x − a), built from the function’s derivatives at one point:

f(x) = f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + f‴(a)(x − a)³/3! + …

Here a is the center, f⁽ᵏ⁾(a) is the kth derivative evaluated at a, and k! is k factorial. Stopping after the (x − a)ⁿ term gives the Taylor polynomial Pn(x) of order n. The order-1 polynomial is the tangent line, and each extra term matches one more derivative of f at a, so the polynomial hugs the curve over a wider stretch.

Taylor vs Maclaurin series

A Maclaurin series is a Taylor series centered at a = 0, so the powers are plain xᵏ. For sin x the Maclaurin series is x − x³/3! + x⁵/5! − …. A Taylor series can use any center. Choose a center close to the x-values you care about, and where f and its derivatives are easy to evaluate. ln x has no Maclaurin series, because ln 0 is undefined, so it is usually expanded about a = 1.

How to find a Taylor polynomial by hand

  1. Differentiate f repeatedly, up to the nth derivative.
  2. Evaluate f and each derivative at the center a.
  3. Divide the kth value by k! to get the coefficient ck.
  4. Write Pn(x) = c0 + c1(x − a) + c2(x − a)² + … + cn(x − a)ⁿ, leaving out zero terms.

The calculator’s derivative table follows exactly these columns: k, f⁽ᵏ⁾(x), f⁽ᵏ⁾(a) and ck.

Worked examples

Example 1: Maclaurin polynomial of eˣ

Every derivative of eˣ is eˣ, and e⁰ = 1, so every coefficient is 1/k!. The order-4 polynomial is 1 + x + x²/2 + x³/6 + x⁴/24. At x = 0.5 it gives 1.6484375, while e0.5 ≈ 1.6487213, an error of about 0.00028.

Example 2: ln x about a = 1

The derivatives are 1/x, −1/x², 2/x³ and −6/x⁴, which equal 1, −1, 2 and −6 at x = 1. Dividing by k! gives (x − 1) − (x − 1)²/2 + (x − 1)³/3 − (x − 1)⁴/4. At x = 1.2 this is 0.182267, and ln 1.2 ≈ 0.182322.

Example 3: √x about a = 4

f(4) = 2, f′(x) = 1/(2√x) gives 1/4, and f″(x) = −1/(4x3/2) gives −1/32, so c2 = −1/64. The order-2 polynomial is 2 + (x − 4)/4 − (x − 4)²/64, and √4.2 ≈ 2 + 0.05 − 0.000625 = 2.049375 (true value 2.0493902).

Common Maclaurin series

Function Series General term Converges for
eˣ 1 + x + x²/2! + x³/3! + … xⁿ/n! all x
sin x x − x³/3! + x⁵/5! − … (−1)ⁿx²ⁿ⁺¹/(2n + 1)! all x
cos x 1 − x²/2! + x⁴/4! − … (−1)ⁿx²ⁿ/(2n)! all x
1/(1 − x) 1 + x + x² + x³ + … xⁿ −1 < x < 1
ln(1 + x) x − x²/2 + x³/3 − … (−1)ⁿ⁺¹xⁿ/n −1 < x ≤ 1
arctan x x − x³/3 + x⁵/5 − … (−1)ⁿx²ⁿ⁺¹/(2n + 1) −1 ≤ x ≤ 1

When your function matches one of these, the calculator shows the general term and the interval of convergence, and shades that interval on the graph.

Taylor remainder and error bound

The error of the approximation is the remainder Rn(x) = f(x) − Pn(x). Lagrange’s form of the remainder gives a bound you can compute without knowing f(x):

|Rn(x)| ≤ M·|x − a|ⁿ⁺¹/(n + 1)!

where M is the largest value of |f⁽ⁿ⁺¹⁾| between a and x. For eˣ ≈ 1 + x + x²/2 at x = 0.1, the third derivative is eˣ, which stays below 1.2 on [0, 0.1]. So the error is at most 1.2 × 0.1³/3! = 0.0002. The actual error is e0.1 − 1.105 ≈ 0.00017, inside the bound. The calculator finds M numerically on the interval, so its bound is a little tighter than a hand estimate.

Common mistakes

Mistake How to avoid it
Forgetting to divide by k! The coefficient is f⁽ᵏ⁾(a)/k!, not f⁽ᵏ⁾(a). The x³ term of eˣ is x³/6, not x³.
Writing xᵏ instead of (x − a)ᵏ Only a Maclaurin series uses plain powers of x. About a = 1, the terms are powers of (x − 1).
Mixing up “order n” and “n nonzero terms” Order 5 for sin x has only three nonzero terms, because the even derivatives are 0 at 0.
Using the series outside its interval 1 + x + x² + … does not approach 1/(1 − x) at x = 2, however many terms you add.

Taylor Series practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the Maclaurin polynomial of order 3 for eˣ?

Found a mistake? Let us know!

2. What is the coefficient of x³ in the Maclaurin series of sin x?

Found a mistake? Let us know!

3. A Maclaurin series is a Taylor series centered at which point?

Found a mistake? Let us know!

4. What is the order-2 Taylor polynomial of ln x about a = 1?

Found a mistake? Let us know!

5. Using P₂(x) = 1 + x + x²/2 for eˣ, what is the estimate of e^0.2?

Found a mistake? Let us know!

6. For which x does 1 + x + x² + x³ + … converge to 1/(1 − x)?

Found a mistake? Let us know!

7. What is the order-1 Taylor polynomial of √x about a = 9?

Found a mistake? Let us know!

8. The Lagrange bound for Pₙ uses which derivative of f?

Found a mistake? Let us know!

9. What is the coefficient of x⁴ in the Maclaurin series of cos x?

Found a mistake? Let us know!

10. What is the Maclaurin polynomial of order 4 for 1/(1 + x)?

Found a mistake? Let us know!

Frequently asked questions

What is a Taylor series?

It is an infinite sum of powers of (x − a) whose coefficients come from the derivatives of a function at a. For eˣ about 0, every derivative equals 1 there, so eˣ = 1 + x + x²/2! + x³/3! + ….

What is the formula for a Taylor series?

f(x) = Σ f⁽ⁿ⁾(a)(x − a)ⁿ/n! for n = 0, 1, 2, …. For ln x about a = 1 this gives (x − 1) − (x − 1)²/2 + (x − 1)³/3 − ….

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

A Maclaurin series is the special case centered at 0. sin x = x − x³/3! + … is a Maclaurin series; expanding sin x about π gives a Taylor series in powers of (x − π). Pick the center closest to where you need accurate values.

Is Taylor series Calc 2 or Calc BC?

In college it is usually taught in Calculus 2. In AP Calculus it is a BC-only topic, together with the Lagrange error bound and intervals of convergence.

How is the error of a Taylor polynomial calculated?

Use the Lagrange bound M|x − a|ⁿ⁺¹/(n + 1)!, where M bounds the next derivative between a and x. For eˣ ≈ 1 + x + x²/2 at x = 0.1, M < 1.2 gives an error below 0.0002; the actual error is about 0.00017.

Is a Taylor series a power series?

Yes. A Taylor series is a power series, and a convergent power series is the Taylor series of the function it sums to. For example, 1 + x + x² + … is the Maclaurin series of 1/(1 − x) and converges for |x| < 1.

Related calculators

More calculus calculators

Browse all 541 calculators

Related to This Article

What people say about "Taylor Series Calculator: Taylor & Maclaurin, With Steps"?

No one replied yet.

Leave a Reply