maclaurin expansion calculator

Maclaurin Expansion Calculator

Generate a Maclaurin polynomial Pn(x) for a common function and (optionally) evaluate the approximation at a specific value of x.

What is a Maclaurin expansion?

A Maclaurin expansion is a special case of a Taylor series centered at x = 0. It represents a function as an infinite polynomial:

f(x) = f(0) + f'(0)x + f''(0)x2/2! + ...

In practice, we usually stop after a finite number of terms (order n). That finite polynomial is called the Maclaurin approximation, and it often gives highly accurate values near zero.

How to use this calculator

  • Select a function (such as e^x, sin(x), or ln(1+x)).
  • Pick the expansion order n.
  • Optionally enter a value of x to compare approximation vs exact value.
  • Click Calculate Expansion.

The calculator returns:

  • The polynomial Pn(x)
  • Non-zero coefficients used in the expansion
  • Approximate value at your chosen x
  • Exact value and absolute error when available

Common Maclaurin series included

1) Exponential

e^x = 1 + x + x^2/2! + x^3/3! + ...

2) Sine

sin(x) = x - x^3/3! + x^5/5! - ...

3) Cosine

cos(x) = 1 - x^2/2! + x^4/4! - ...

4) Natural log

ln(1+x) = x - x^2/2 + x^3/3 - x^4/4 + ...

5) Geometric form

1/(1-x) = 1 + x + x^2 + x^3 + ...

6) Arctangent

arctan(x) = x - x^3/3 + x^5/5 - ...

Why order n matters

A larger order usually means better accuracy near x=0 because you keep more terms from the infinite series. However, bigger n also means more computation and may not help if your input is outside the convergence interval.

  • Near zero: low-order polynomials are often excellent.
  • Far from zero: you may need a higher order (or a different method).
  • Outside convergence radius: the series may fail to converge.

Applications of Maclaurin approximations

Maclaurin and Taylor approximations are used throughout mathematics, physics, economics, machine learning, signal processing, and engineering:

  • Approximating difficult functions quickly
  • Analyzing local behavior and sensitivity
  • Deriving numerical methods and algorithms
  • Simplifying differential equations in modeling
  • Building error bounds and stability checks

Quick accuracy tip

If your approximation error is too large, try one (or both) of these:

  • Increase the order n
  • Evaluate at values of x closer to 0

For many practical tasks, even a modest order (like 4 to 8) can be remarkably effective.

🔗 Related Calculators