Skip to content
AllCalcHub

Taylor Series Calculator

Expand a function as a Taylor or Maclaurin series, in one variable or two, with every derivative shown and checked and exact coefficients.

About the Taylor Series Calculator

The Taylor series of f about x = a is f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + … : a polynomial that matches f and its derivatives at a. With a = 0 it is called the Maclaurin series, for example sin x = x − x³/3! + x⁵/5! − … .

For two variables, f(x, y) ≈ f + (h f_x + k f_y) + (h² f_xx + 2hk f_xy + k² f_yy)/2! + … with h = x − a, k = y − b, everything evaluated at (a, b).

Each polynomial is checked by its error: for a degree-n polynomial the error near a is about C·hⁿ⁺¹, so halving h should cut it by about 2ⁿ⁺¹.

The formula

f(x) = Σ f⁽ᵏ⁾(a)(x − a)ᵏ/k!

Maclaurin
a = 0
Two variables
f(a + h, b + k) = Σ (h ∂/∂x + k ∂/∂y)ʳ f(a, b)/r!

Worked example

sin x about 0, up to x⁵

  1. f = sin x, f′ = cos x, f″ = −sin x, f‴ = −cos x …
  2. Values at 0: 0, 1, 0, −1, 0, 1
  3. sin x = x − x³/6 + x⁵/120 + …

Questions people ask

Why is the term for x⁴ missing?

Its coefficient is 0: sin x is odd, so only odd powers appear.

How far from a is the series accurate?

It depends on f. For sin x and e^x it converges everywhere; for ln(1 + x) only for −1 < x ≤ 1. The graph shows where the polynomial and f part company.