Logo

MonoCalc

/

Taylor Series Calculator

Math

Quick examples:

About This Tool

🔢 Taylor Series Calculator – Expand Any Function into a Polynomial Approximation

The Taylor Series Calculator transforms any differentiable function into a polynomial approximation centered around a point of your choice. Whether you are a calculus student learning about infinite series, an engineer approximating a nonlinear system, or a scientist studying local function behavior, this tool makes the expansion process visual, interactive, and immediate.

What Is a Taylor Series?

A Taylor series represents a function as an infinite sum of terms derived from the function's derivatives at a single point a:

T(x) = Σ [f⁽ᵏ⁾(a) / k!] · (x − a)^k   for k = 0, 1, 2, …

Each term uses the k-th derivative of f evaluated at the center a, divided by k! (k factorial), multiplied by (x − a)^k. By truncating the series at a finite order n, you get a Taylor polynomial Tn(x) that approximates the function near the center.

Maclaurin Series – The Special Case at a = 0

When the expansion center is a = 0, the Taylor series becomes the Maclaurin series. This is the most common form encountered in calculus textbooks. Famous examples include:

  • sin(x) = x − x³/6 + x⁵/120 − …
  • e^x = 1 + x + x²/2 + x³/6 + …
  • cos(x) = 1 − x²/2 + x⁴/24 − …
  • 1/(1−x) = 1 + x + x² + x³ + …(for |x| < 1)

How This Calculator Works

The calculator uses symbolic differentiation via the mathjs library to compute each derivative of your function analytically. For a function f(x) and an expansion center a, it:

  1. Computes f(a), f′(a), f″(a), …, f⁽ⁿ⁾(a) — the function and its derivatives evaluated at the center.
  2. Divides each derivative value by the corresponding factorial to get the coefficient ck = f⁽ᵏ⁾(a) / k!.
  3. Combines the terms into the polynomial: Tn(x) = c₀ + c₁(x−a) + c₂(x−a)² + … + cn(x−a)ⁿ.
  4. Optionally evaluates the polynomial at a user-specified point and computes the absolute and relative error compared to the true function value.
  5. Generates a chart comparing the exact function curve with the Taylor polynomial over a configurable interval.

Understanding the Outputs

Polynomial Expression

The main output is the symbolic Taylor polynomial as a readable algebraic expression in powers of (x − a). Zero coefficients are automatically hidden to keep the expression clean.

Coefficient Table

The table breaks down each term showing the derivative order k, the derivative value f⁽ᵏ⁾(a), the factorial k!, and the resulting coefficient ck. This is the step-by-step derivation made explicit — ideal for homework verification or teaching.

Approximation and Error

If you supply an evaluation point x₀, the calculator computes:

  • Tn(x₀) — the polynomial's value at that point
  • f(x₀) — the exact function value
  • Absolute error = |f(x₀) − Tn(x₀)|
  • Relative error = absolute error / |f(x₀)| × 100%

Comparison Chart

The chart plots the exact function f(x) in blue against the Taylor polynomial Tn(x) in red over your chosen interval. You can visually see where the approximation is excellent (near the center) and where it diverges (far from the center or beyond the radius of convergence). Increase the order to watch the polynomial hug the function more closely.

Angles are in radians
All trigonometric functions — sin, cos, tan, asin, acos, atan — expect their arguments in radians, not degrees. For example, sin(π) = 0, not sin(180°).

Supported Functions and Syntax

You can enter any combination of these supported functions and operators:

  • Arithmetic: + − * / ^ and parentheses
  • Trigonometric: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh
  • Exponential/Log: exp(x), log(x) (natural log), log10(x), log2(x)
  • Power/Root: sqrt(x), x^0.5, cbrt(x)
  • Constants: pi, e

Order and Convergence

The order n controls how many terms are included. Higher order means better accuracy but also more computation. For smooth functions like e^x and sin(x), even order 5 or 7 gives excellent approximations near the center. Functions with singularities — like 1/(1−x) — converge only within their radius of convergence(|x − a| < R). Outside that radius, higher orders may make the approximation worse, not better.

Practical Applications

Taylor series appear throughout science and engineering:

  • Physics: Small-angle approximation sin(θ) ≈ θ for pendulum motion
  • Signal processing: Linearizing nonlinear systems around an operating point
  • Numerical computing: Efficient evaluation of transcendental functions in hardware
  • Statistics: The delta method and variance approximation use Taylor expansions
  • Relativity: Kinetic energy (1/2)mv² emerges from the Taylor expansion of the relativistic energy formula for small velocities

Tips for Best Results

  • Start with order n = 5–7 for typical smooth functions. Increase if you need better accuracy.
  • For functions like ln(x), choose a center near where you need the approximation — a = 1 is a natural choice.
  • Keep the evaluation point close to the expansion center for the most accurate polynomial approximation.
  • If you get an "undefined at a" error, the function has a singularity at your chosen center — try a nearby point instead.
  • Use the comparison chart to visually understand convergence: if the red and blue lines overlap well in your region of interest, the approximation is sufficient.

Frequently Asked Questions

Is the Taylor Series Calculator free?

Yes, Taylor Series Calculator is totally free :)

Can I use the Taylor Series Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Taylor Series Calculator?

Yes, any data related to Taylor Series Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a Taylor series and how does this calculator use it?

A Taylor series expands a function f(x) as an infinite sum of terms based on its derivatives at a single point a: T(x) = Σ [f⁽ᵏ⁾(a) / k!] · (x − a)^k. This calculator computes the finite polynomial approximation up to your chosen order n, showing each coefficient, the resulting polynomial, and how close it is to the true function value.

What is the difference between a Taylor series and a Maclaurin series?

A Maclaurin series is simply a Taylor series centered at a = 0. When you enter 0 as the expansion point, you get the Maclaurin expansion. For any other center value a, it is a general Taylor expansion. The formula is identical — Maclaurin is just the special case.

Which functions are supported?

The calculator supports common elementary functions: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, exp (e^x), log (natural log), log10, sqrt, abs, and powers. You can combine these using +, −, *, /, ^, and parentheses. All trigonometric functions expect angles in radians.

How accurate is the Taylor polynomial approximation?

Accuracy depends on the order n and the distance from the expansion center. Higher orders give better approximations near the center. Far from the center — especially beyond the radius of convergence — the polynomial may diverge. The calculator reports the absolute and relative error when you provide an evaluation point, so you can see exactly how accurate the approximation is.

What does the coefficient table show?

The coefficient table lists each term of the expansion: the power k, the k-th derivative value f⁽ᵏ⁾(a), the factorial k!, the resulting coefficient f⁽ᵏ⁾(a)/k!, and the full term cₖ · (x − a)^k. This makes it easy to follow the derivation step by step.

Why does the tool say 'undefined' for some functions at certain points?

Some functions have singularities or discontinuities at certain points — for example, ln(x) is undefined at x = 0 and log requires positive arguments, tan(x) is undefined at x = π/2. If the function or one of its derivatives is undefined at your chosen expansion center, the calculator will report the error and you should choose a different expansion point.