molecalculator

Moles & Molar Mass

Power Series Expansion Calculator: Taylor and Maclaurin

Guide 01-3396 · Updated · Step by step

A power series expansion calculator rewrites a function as a sum of powers of a variable, usually using Taylor’s theorem around a chosen center. Entering a function and its center into a suitable symbolic calculator can produce coefficients and a truncated polynomial; this page explains the calculation and gives a hand-checkable example. There is no single numerical calculator for every function without specifying the function, center, and number of terms.

What a power series calculator calculates

A power series has the form Σ an(x − c)n, where an are coefficients and c is the center. For a function with enough derivatives at c, its Taylor series is

f(x) = Σn=0∞ [f(n)(c)/n!](x − c)n.

A calculator may return an exact formula for the coefficients, a finite polynomial using a chosen number of terms, or both. To get a meaningful result, specify:

  • the function to expand, such as ex or sin x;
  • the expansion center, such as c = 0;
  • the truncation order, meaning the highest power retained; and
  • the desired variable and, where relevant, its domain.

Symbolic algebra systems can differentiate formulas and simplify coefficients. Some online tools instead ask for sampled data or approximate a function numerically, which is a different task and may not produce an exact Taylor series.

How to use an expansion calculator

First enter the function using the calculator’s notation. Check parentheses and whether angles are interpreted in radians; standard calculus series for sine and cosine assume radians. Then select the center and order. An order of 4 keeps terms through (x − c)4, even if some coefficients in that range happen to be zero.

  1. Choose a function and a center where it is defined and sufficiently differentiable.
  2. Set the order to the number of powers you want to retain.
  3. Request a Taylor expansion, or a Maclaurin expansion if the center is zero.
  4. Inspect the output for omitted terms, assumptions, and the stated remainder or convergence interval.
  5. Substitute a test value near the center and compare the polynomial with the original function.

For example, around zero, ex has the expansion 1 + x + x2/2! + x3/3! + …. Through order 3, the polynomial is 1 + x + x2/2 + x3/6. At x = 0.1, it gives about 1.105167, close to e0.1 ≈ 1.105171. The difference is the effect of the terms omitted after the cubic term.

Taylor and Maclaurin series

A Taylor series is centered at any suitable value c. A Maclaurin series is simply the special case c = 0. The coefficient of the nth power is the nth derivative evaluated at the center, divided by n!. Factorials matter: the cubic coefficient is f‴(c)/3!, not just f‴(c).

Some useful Maclaurin expansions, valid within their stated convergence ranges, are:

  • ex = Σ xn/n!, for every real x.
  • sin x = x − x3/3! + x5/5! − …, for every real x.
  • cos x = 1 − x2/2! + x4/4! − …, for every real x.
  • 1/(1 − x) = 1 + x + x2 + …, only for |x| < 1.

The last example highlights an important distinction: a function can have derivatives at a center while its Taylor series does not represent the function everywhere. For 1/(1 − x), the series centered at zero converges only within distance 1 of the singularity at x = 1.

What the result means and how accurate it is

A finite expansion is an approximation, not automatically an exact replacement for the original function. Near the center, higher powers often become small, so a short polynomial can be useful. Farther away, omitted terms can matter substantially, and the approximation may fail outside the series’ interval of convergence.

For a Taylor polynomial of degree N, the remainder is RN(x) = f(x) − PN(x). If the derivative of order N + 1 is bounded in magnitude by M between the center and the point of interest, Taylor’s theorem gives

|RN(x)| ≤ M|x − c|N+1/(N + 1)!.

This bound is useful only when its assumptions hold and a suitable derivative bound is known. A calculator that displays a polynomial without an error estimate does not, by itself, tell you how accurate that polynomial is at a chosen input. Test the approximation in the region where you plan to use it, and use a mathematical error bound when a guaranteed tolerance is required.

Choosing a calculator and checking its output

Choose a symbolic expansion tool when you need exact coefficients, and a numerical graphing or computation tool when you need approximate values or plots. A general-purpose computer algebra system may offer both, but check whether it reports a formal series, a truncated approximation, or an expansion under extra assumptions such as x → 0.

Before relying on an answer, verify the first few coefficients by differentiating the function yourself or substituting a familiar series. Check whether the tool uses big-O notation, such as O(x5), to indicate that terms of fifth order and above were omitted. Also note that simplification can hide conditions: expressions involving logarithms, roots, or branch choices may depend on the domain or whether variables are real or complex.

Common errors and limitations

  • Confusing order with number of terms: a degree-5 polynomial can contain fewer than six nonzero terms if symmetry makes some coefficients zero.
  • Using the wrong center: a series centered at zero may be inaccurate at a point better handled by expanding around a nearby value.
  • Ignoring convergence: a formal list of coefficients is not proof that the infinite series equals the function at every input.
  • Mixing degrees and radians: calculus formulas for trigonometric series use radians.
  • Trusting displayed decimals as exact: rounded coefficients and values can obscure small errors; retain adequate precision during intermediate calculations.

Not every function is represented by its Taylor series in a neighborhood of every point. A function must be analytic there for its Taylor series to converge to the function locally. A function can be infinitely differentiable yet fail this condition, so having derivatives of every order is not enough on its own.

Frequently Asked Questions

What is a power series expansion calculator?
A tool that finds or approximates the coefficients in a sum of powers, commonly the Taylor series of a specified function around a chosen center.

How do I find a Maclaurin series?
Request a Taylor expansion centered at zero. Its coefficient for xn is f(n)(0)/n!, when the needed derivative exists.

How many terms should I use?
It depends on the required accuracy and distance from the center. Compare the approximation with the function or use a valid remainder bound; a larger degree does not guarantee accuracy outside the convergence region.

Is a Taylor polynomial exact?
Usually it is a finite approximation. It is exact only in special cases, such as when the function is itself a polynomial of no greater degree, or at particular points where omitted terms vanish.

Why does a calculator show an answer that works only near zero?
That is often the series’ convergence limit. Singularities or other complex-plane features can restrict a series even when the function looks well behaved at the real inputs being considered.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →