Taylor Series Calculator
The Taylor (or Maclaurin) polynomial of a function about a point to any order, with each coefficient worked out, its value at x beside the true f(x), and the error.
Result…
How it's calculated
Tₙ(x) = Σₖ₌₀ⁿ f⁽ᵏ⁾(a) ÷ k! × (x − a)ᵏ Maclaurin series: a = 0 Error: Rₙ(x) = f(x) − Tₙ(x)
Builds the Taylor polynomial of f about a. Each coefficient f⁽ᵏ⁾(a) ÷ k! comes from power-series arithmetic, which applies the product, quotient, power and chain rules to the coefficients directly, so high orders of tan(x) or 1/(1 + x^2) stay fast and exact to rounding; the symbolic derivatives are shown in the working while they stay short enough to read. Coefficients that are simple fractions are shown as fractions, like x^3/6. It then evaluates the polynomial at your x, compares it with f(x), and draws both. For the derivatives on their own, see the derivative calculator.
Your numbers, step by step
About the Taylor Series calculator
This Taylor series calculator builds the Taylor polynomial of a function about a point, up to an order you choose from 0 to 15. About a = 0 it is called the Maclaurin series. Type a function such as sin(x), e^x, ln(1 + x) or 1/(1 − x), the point a, the order n and a value of x, and it returns the polynomial with simple coefficients written as fractions (like x^3/6), its value at x beside the true f(x), the error between them and the size of the next term. Calculus students use it to check homework, and engineers use it to see how far a quick approximation can be trusted. The working lists each derivative at a and each coefficient f⁽ᵏ⁾(a) ÷ k!, and a chart draws f and the polynomial together, so you can see where the two agree and where they part.
How to use it
- Type the function in “f(x) =”, using x as the variable and radians for angles.
- Enter “About the point a =”: 0 for a Maclaurin series, or another number or constant such as pi/4.
- Choose the “Order n”, the highest power of (x − a) to keep.
- Type “Evaluate at x =” to compare the polynomial with the function there, then read the error and the chart.
Worked example
For cos(x) about 0 to order 4, the derivatives at 0 are 1, 0, −1, 0 and 1, so the coefficients are 1, 0, −1/2, 0 and 1/24 and T₄(x) = 1 − x^2/2 + x^4/24. At x = 0.5 this gives 0.877604167, while cos(0.5) = 0.877582562, an error of −0.0000216.
Updated
Questions people ask
How do I find the Taylor series of a function?
Differentiate the function repeatedly, evaluate each derivative at the point a, divide the kth one by k! and multiply by (x − a)ᵏ. Adding these terms from k = 0 to n gives the Taylor polynomial of order n. For the derivatives themselves, use the derivative calculator.
What is the difference between a Taylor and a Maclaurin series?
A Maclaurin series is a Taylor series about a = 0, so its terms are powers of x. A Taylor series about another point uses powers of (x − a), which is more accurate for x values near that point.
Why does a higher order not always give a better answer?
Some series only converge for x close enough to a. For ln(1 + x) about 0 that means |x| < 1 (with x = 1 also giving a slowly converging series), so for larger x, adding terms can make the polynomial worse. Check the chart and the error before relying on a value.
Why can't I expand ln(x) or sqrt(x) about 0?
A Taylor series needs the function and all its derivatives to exist at a. ln(x) is undefined at 0 and sqrt(x) has no derivative there, so choose another point, such as a = 1.
How is the error of a Taylor polynomial estimated?
The calculator shows the true error f(x) − Tₙ(x) and the next term of the series. When the terms are shrinking quickly, the next term is a fair guide to the size of the error; the exact bound comes from the Lagrange remainder.