Taylor Series Calculator
Build the Taylor (or Maclaurin) polynomial of eˣ, sin x, cos x, ln(1 + x), √(1 + x) or 1/(1 − x) about any center, evaluate it, and see the error and radius of convergence.
How it works
Pₙ(x) = Σₖ₌₀ⁿ f⁽ᵏ⁾(a)/k! · (x − a)ᵏ · Maclaurin series: a = 0 · error Rₙ = f⁽ⁿ⁺¹⁾(ξ)/(n+1)! · (x − a)ⁿ⁺¹
A Taylor polynomial matches a function and its first n derivatives at the center a, so it approximates the function well near a. Each coefficient is the k-th derivative at a divided by k!. A Maclaurin series is simply the Taylor series about a = 0. The series only converges to the function within the radius of convergence: infinite for eˣ, sin x and cos x, and 1 + a for ln(1 + x) and √(1 + x) (distance to the singularity at x = −1).
Worked example
For eˣ about a = 0 with n = 5, every derivative at 0 is 1, so P₅(x) = 1 + x + x²/2 + x³/6 + x⁴/24 + x⁵/120. At x = 1 this gives 1 + 1 + 0.5 + 0.166667 + 0.041667 + 0.008333 = 2.716666667, while e = 2.718281828 — an error of 0.001615162.
Sources: Taylor and Maclaurin Series — OpenStax Calculus Volume 2, 6.3 · Taylor series — Wikipedia
Frequently asked questions
What is the difference between a Taylor series and a Maclaurin series?
A Maclaurin series is a Taylor series centered at a = 0. For example, the Maclaurin series of eˣ is 1 + x + x²/2! + x³/3! + …
How many terms do I need?
Enough that the next term is smaller than the accuracy you need. Close to the center few terms suffice; farther away (or near the edge of the radius of convergence) you need many more.
Why does the approximation fail for some x?
Outside the radius of convergence the series diverges: for ln(1 + x) about 0 the terms grow without bound once |x| > 1, no matter how many you add.
Are the trig functions in radians?
Yes. The Taylor series of sin x and cos x only work with x in radians.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.