Taylor Series Calculator
A Taylor series approximates a function near a point using a polynomial built from its derivatives at that point. When the centre is 0 it is called a Maclaurin series. This calculator differentiates the function repeatedly, builds the polynomial with exact coefficients, and graphs it against the original function.
How to use the taylor series calculator
- Type the function, such as sin(x) or e^x.
- Enter the centre a and the order (1 to 8).
- Press Calculate to see the polynomial and the comparison graph.
Formula
Worked example: sin x, order 5
- f(x) =: sin(x)
- Centre a: 0
- Order (1–8): 5
✓ Answer checked
- Error at x = 0.5
Step-by-step working (3 steps)
Taylor formula Taylor series
Each term uses a derivative of f at the centre, divided by a factorial.
Derivatives at the centre
Differentiate repeatedly and substitute x = a.
Build the polynomial
Divide each derivative by k! and attach (x − a)ᵏ.
Formulas used
How this was checked
- ✓ Halving the distance from the centre shrinks the error from 2.53e-16 to 1.73e-18, as a correct order-5 polynomial should.
Frequently asked questions
What is the Maclaurin series of sin x?
x − x³/3! + x⁵/5! − …, so to order 5 it is x − x³/6 + x⁵/120.
Why does the approximation get worse further away?
The polynomial is built to match the function's derivatives at the centre, so it is most accurate near that point.
How is the answer checked?
The error is measured at two distances from the centre; for a correct polynomial it shrinks quickly as you move closer.
