Taylor Series Calculator

Build a Taylor or Maclaurin polynomial term by term. Slide the order up and watch the polynomial (pink) wrap itself around the curve.

Reads as sin⁡(x)\sin\left(x\right)
Try:

Taylor polynomial of order 5 about a = 0

P5(x)=x−16x3+1120x5P_{5}(x) = x - \frac{1}{6}x^{3} + \frac{1}{120}x^{5}

At x = 1: P = 0.84166667, f = 0.84147098, error 0.000196

-6-4-2246-3-2-1123a
  • f(x)
  • P5(x)
Derivative table (first 8 rows)
nnf(n)(x)f^{(n)}(x)f(n)(a)f^{(n)}(a)coefficient f(n)(a)n!\frac{f^{(n)}(a)}{n!}
0sin⁡(x)\sin\left(x\right)000
1cos⁡(x)\cos\left(x\right)111
2−sin⁡(x)-\sin\left(x\right)000
3−cos⁡(x)-\cos\left(x\right)-1−16-\frac{1}{6}
4sin⁡(x)\sin\left(x\right)000
5cos⁡(x)\cos\left(x\right)11120\frac{1}{120}

Still stuck? Ask the tutor

An AI tutor reads the problem and steps above and explains them in plain words. It can make mistakes, so check it against the worked steps.

How the polynomial is built

Each term makes the polynomial agree with ff in one more way at the point aa: the constant term matches the value, the linear term matches the slope (that’s the tangent line), the quadratic term matches the curvature, and so on. The coefficient of (x−a)n(x-a)^n is f(n)(a)n!\frac{f^{(n)}(a)}{n!}; dividing by n!n! undoes the factor that differentiating xnx^n nn times would produce.

Series worth knowing

  • ex=1+x+x22!+x33!+⋯e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots (all x)
  • sin⁡x=x−x33!+x55!−⋯\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots (all x)
  • cos⁡x=1−x22!+x44!−⋯\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots (all x)
  • ln⁡(1+x)=x−x22+x33−⋯\ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots (−1 < x ≤ 1)
  • 11−x=1+x+x2+x3+⋯\frac{1}{1-x} = 1 + x + x^2 + x^3 + \cdots (|x| < 1)

Try ln(1+x) with a high order: past x=1x = 1 the polynomial peels away no matter how many terms you add. That is the radius of convergence, made visible.

Questions students ask

What is a Taylor series?

A way to write a function as an infinite polynomial built from its derivatives at one point aa: f(x)=∑n=0∞f(n)(a)n!(x−a)nf(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n. Cutting it off after degree nn gives the Taylor polynomial PnP_n.

What is a Maclaurin series?

A Taylor series centred at a=0a = 0. For example ex=1+x+x22!+x33!+⋯e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots.

Why does the approximation get worse far from a?

Each term is built from information at aa only. Near aa the polynomial matches the function’s value, slope, curvature and more; far away those local facts stop being enough. Some series, like ln⁡(1+x)\ln(1+x), only converge within a certain radius.

How big is the error?

Taylor’s theorem bounds it by the next term: ∣Rn(x)∣≤M(n+1)!∣x−a∣n+1|R_n(x)| \le \frac{M}{(n+1)!}|x-a|^{n+1}, where MM bounds ∣f(n+1)∣|f^{(n+1)}| between aa and xx. The error readout below shows the actual error at a point.