Maclaurin Series Calculator

Interactive visualization of Maclaurin series approximations. Choose a function, adjust polynomial degree, evaluate at any x, and see the series terms. Understand convergence and error analysis.

? eˣ example
? sin(x) at x=π/2
? cos(x) series
? ln(1+x) (|x|<1)
⚡ arctan(x) series
Privacy first: All calculations and graphing happen locally in your browser — no data leaves your device.

What is a Maclaurin Series?

A Maclaurin series is a Taylor series expansion of a function about 0. Formally, for an infinitely differentiable function f(x), its Maclaurin series is:

f(x) = Σn=0 f(n)(0) · xn / n!

It represents the function as an infinite sum of terms calculated from its derivatives at zero. This tool computes the N-th degree Maclaurin polynomial PN(x) and compares it with the exact function, providing deep insight into approximation theory, convergence, and error bounds (Lagrange remainder).

Why Use This Interactive Tool?

  • Pedagogical Power: Visualize how higher-degree polynomials improve accuracy near x=0 and the radius of convergence.
  • Engineering & Physics: Approximate transcendental functions in simulations, control systems, or signal processing.
  • Instant Error Analysis: See absolute and relative errors for any chosen x and degree.
  • Series Term Explorer: Examine each coefficient and power term to understand the pattern.

Mathematical Foundation

For common functions, closed-form Maclaurin expansions are known:

FunctionMaclaurin Series (convergence)Radius
Σn=0 xⁿ/n!
sin(x)Σn=0 (-1)ⁿ x2n+1/(2n+1)!
cos(x)Σn=0 (-1)ⁿ x2n/(2n)!
ln(1+x)Σn=1 (-1)n+1 xⁿ/n|x| < 1
arctan(x)Σn=0 (-1)ⁿ x2n+1/(2n+1)|x| ≤ 1
Real-world: Approximating eˣ in Scientific Computing

When implementing exponential functions on embedded systems, hardware often uses Maclaurin polynomials of degree 6–8 for double-precision accuracy in limited range. For instance, eˣ ≈ 1 + x + x²/2! + x³/3! + x⁴/4! yields error < 10⁻⁶ for |x|<0.5. Our calculator shows how adding terms reduces error drastically. Engineers rely on such approximations for real-time DSP.

Step-by-Step: How the Calculator Works

  1. Select function (eˣ, sin, cos, ln(1+x), arctan).
  2. Set polynomial degree N (0 to 12).
  3. Provide evaluation x (real number). The tool checks convergence domain warnings for ln(1+x) and arctan.
  4. It computes Maclaurin coefficients using exact derivative formulas, builds polynomial value via Horner, and shows each term.
  5. Canvas plots both exact function and polynomial approximation over an adaptive range around evaluation point, highlighting the approximation.

Error Analysis & Lagrange Remainder

The difference between f(x) and its N-th degree Maclaurin polynomial is given by the remainder: RN(x) = f(N+1)(ξ)·xN+1/(N+1)! for some ξ between 0 and x. This tool computes absolute error in real-time, helping you understand convergence rates. For analytic functions, as N increases, error decreases rapidly within the radius of convergence.

Historical Significance

Named after Colin Maclaurin (1698–1746), though the series was known to Taylor and even earlier to Madhava of Sangamagrama. Maclaurin used these series extensively in his "Treatise of Fluxions". Today they form the backbone of asymptotic analysis and numerical methods.

Frequently Asked Questions

Maclaurin series is a special case of Taylor series centered at 0. While Taylor series can be expanded around any point a, Maclaurin is fixed at a=0.

The Maclaurin series for ln(1+x) converges only for |x|<1 (and conditionally at x=1). Outside this interval, the polynomial approximation diverges; our tool alerts you.

It depends on x and the function. For small |x| < 1, degree 5–6 often gives high accuracy. For large x and entire functions like eˣ, degree 10+ yields excellent results. Our graph helps you see the fit.

Using direct summation with precomputed coefficients (factorials and signs). It's numerically stable up to degree 12.

Currently we support the five major elementary functions. For custom series, see our upcoming advanced Taylor polynomial tool.
References: Stewart, J. "Calculus: Early Transcendentals"; MathWorld – Maclaurin Series; Weisstein, E.W. "Maclaurin Series." Rigorously tested against known expansions.