Calculatorism

Taylor & Maclaurin Series Expander

Expand sin, cos, eˣ, ln(1+x), 1/(1−x) and polynomials about center a into the first n terms, with coefficients and a sample comparison.

Input Data

Function to expand.
Expansion center (a=0 = Maclaurin).
Number of terms.
x to compare series vs exact.
Constant term (poly).
x coeff (poly).
x² coeff (poly).
x³ coeff (poly).
x⁴ coeff (poly).

Results

First n Taylor/Maclaurin terms.
0 + (x-a) + 0(x-a)² − 0.166667(x-a)³ + 0(x-a)^4 + 0.008333(x-a)^5
Series approximation at x.
0.479427
Exact function at x.
0.479426
Convergence and error note.
Sample x=0.5: series value 0.479427, exact value 0.479426.

At a glance:The Taylor series writes a function as a power series about center a: f(x)=Σ_{k=0}^∞ f⁽ᵏ⁾(a)/k!·(x−a)ᵏ; at a=0 it is the Maclaurin series. This tool gives exact coefficients for common functions and compares the series value with the exact value at a sample point to observe convergence.

Formula

General: f(x) ≈ Σ_{k=0}^{n−1} [f⁽ᵏ⁾(a)/k!] (x−a)ᵏ.

eˣ = 1 + x + x²/2! + x³/3! + …

sin x = x − x³/3! + x⁵/5! − …

cos x = 1 − x²/2! + x⁴/4! − …

ln(1+x) = x − x²/2 + x³/3 − … (|x|<1)

1/(1−x) = 1 + x + x² + x³ + … (|x|<1)

$$f(x) = \sum_{k=0}^{\infty} \frac{f^{(k)}(a)}{k!}(x-a)^k$$
$$e^x = \sum_{k=0}^{\infty} \frac{x^k}{k!}$$

How to Use

  1. Pick a function (sin/cos/eˣ/ln(1+x)/1/(1−x) or a custom polynomial).
  2. Enter center a (a=0 = Maclaurin) and term count n.
  3. Enter a sample x to compare series vs exact.
  4. In polynomial mode enter coefficients c₀–c₄.

Common Maclaurin series (a=0)

Common Maclaurin series (a=0)
FunctionSeriesConverges
Σ xᵏ/k!all x
sin xΣ (−1)ᵏ x^{2k+1}/(2k+1)!all x
cos xΣ (−1)ᵏ x^{2k}/(2k)!all x
ln(1+x)Σ (−1)^{k−1} xᵏ/k|x|<1
1/(1−x)Σ xᵏ|x|<1

More terms → better approximation, but ln(1+x) and 1/(1−x) converge only for |x|<1.

Case Studies

sin x at a=0, 5 terms

= x − x³/6 + x⁵/120 − x⁷/5040 + x⁹/362880.

x=0.5: series ≈ 0.479427, exact sin0.5 ≈ 0.479426 (match).

eˣ at a=0, 6 terms

= 1 + x + x²/2 + x³/6 + x⁴/24 + x⁵/120.

x=1: series ≈ 2.716667, exact e ≈ 2.718282.

cos x at a=0, 5 terms

= 1 − x²/2 + x⁴/24 − x⁶/720 + x⁸/40320.

ln(1+x) at a=0, 5 terms

= x − x²/2 + x³/3 − x⁴/4 + x⁵/5 (converges |x|<1).

x=0.5: series ≈ 0.407292, exact ln1.5 ≈ 0.405465.

1/(1−x) at a=0, 5 terms

= 1 + x + x² + x³ + x⁴ (geometric, |x|<1).

eˣ at a=1 (Taylor, not Maclaurin)

= e·[1 + (x−1) + (x−1)²/2 + (x−1)³/6 + …].

Centered at a=1; radius of convergence still ∞.

FAQ

Taylor vs Maclaurin?

The Maclaurin series is the Taylor series at center a=0. Same form, different expansion center.

Why does ln(1+x) converge only for |x|<1?

ln(1+x) has a singularity at x=−1, so the radius of convergence is 1; for x≥1 or x≤−1 the series diverges.

More terms always better?

Within the convergence domain, yes. Near the boundary (x close to 1) convergence is slow and needs many terms.

Where do coefficients f⁽ᵏ⁾(a)/k! come from?

They make the series match the function's derivatives up to order k at a. This tool gives closed forms directly, no step-by-step differentiation needed.

Is polynomial expansion meaningful?

Yes. A polynomial is itself a finite Taylor series (higher coefficients 0); expanding about a shows the shifted form.

Series for 1/(1−x)?

The geometric series Σ xᵏ = 1 + x + x² + …, convergent for |x|<1; it underlies many expansions.

Can a ≠ 0?

Yes. The Taylor series uses (x−a); this tool supports any center a, e.g. eˣ expanded at a=1.

Series far from exact?

If the sample is outside the convergence domain (e.g. ln at x>1) or n is too small, the gap is large; increase n or pick x inside the domain.

Related Tools

References

Content review: Calculatorism Science Team. Taylor coefficients for sin/cos/eˣ/ln/1/(1−x) and polynomials verified. Results are for reference only.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Taylor & Maclaurin Series Expander/math/taylor-maclaurin)。