Taylor Series Explorer

local approximation with degree and center controls

Loading interactive simulation...

why Taylor is local, not global 🖖

A Taylor polynomial is built from derivatives at one point, so it captures the function's local geometry there. Farther away, the same coefficients can stop describing the function well: the error depends on smoothness, degree, and radius of convergence.

Matching a curve one derivative at a time 🖖

This tool rebuilds a curvy function using nothing but additions, multiplications, and powers β€” the arithmetic a processor can actually do. The degree-0 term matches the function's height at the center, degree 1 matches its slope, degree 2 its bend, and each higher term pins down one more derivative. Raise the degree n and watch the dashed polynomial peel closer to the solid curve near the center point a.

When smoothness still isn't enough 🖖

You might expect that an infinitely smooth function is always captured by a high-enough-degree Taylor polynomial β€” but it isn't guaranteed. The classic counterexample is f(x)=eβˆ’1/xΒ² (with f(0)=0): every derivative at 0 equals zero, so its Taylor polynomial around 0 is just 0 at every degree, yet the function is positive everywhere else. Adding terms never helps. Being 'smooth' (all derivatives exist) is weaker than being 'analytic' (actually equal to your own series).

TAYLOR SERIES β€” HOW FAR FROM THE CENTRE YOU CAN STILL TRUST IT

Which Taylor Case Are You In?

A Taylor polynomial matches a function's value and its first n derivatives at one point, and then drifts away as you move off. Two things decide how fast: how quickly the coefficients shrink, and whether the function has a singularity nearby. Adding terms helps inside the radius of convergence and does nothing at all outside it β€” and moving the centre is often worth more than adding terms.

Good near the centre, useless far from it ε ∝ (x − a)n+1
Factorials win β€” the series converges everywhere xn/n! → 0, R = ∞
A radius of convergence β€” beyond it, more terms do not help ln(1 + x): R = 1
Move the centre β€” cheaper than adding terms Δa ≠ 0, Δn = 0

01

Good near the centre, useless far from it

What you know: A low-degree expansion of a well-behaved function. Accurate close to the centre, and the error grows fast as you move away.

Series: ε ∝ (x − a)n+1

Worked example: sin x β‰ˆ x βˆ’ xΒ³/6 at x = 1 gives 0.8333 against the true 0.8415 β€” an error of 0.008. At x = 3 it gives βˆ’1.5 against 0.141

Open this case: sin near 0
Good near the centre, useless far from it. The cubic tracks the sine for about a radian, then leaves in the wrong direction entirely. A low-degree expansion of a well-behaved function. Accurate close to the centre, and the error grows fast as you move away.
The cubic tracks the sine for about a radian, then leaves in the wrong direction entirely.

02

Factorials win β€” the series converges everywhere

What you know: The coefficients carry a factorial in the denominator, so they shrink faster than any power grows. The radius of convergence is infinite.

Series: xn/n! → 0, R = ∞

Worked example: eΛ£ β‰ˆ 1 + x + xΒ²/2 + xΒ³/6 + x⁴/24 + x⁡/120 at x = 1 gives 2.71667 against e = 2.71828 β€” five terms, four correct digits

Open this case: exp fast
Factorials win β€” the series converges everywhere. Five terms already trace the exponential across the whole visible range. The coefficients carry a factorial in the denominator, so they shrink faster than any power grows. The radius of convergence is infinite.
Five terms already trace the exponential across the whole visible range.

03

A radius of convergence β€” beyond it, more terms do not help

What you know: The function has a singularity a finite distance from the centre. Inside that distance the series converges; outside it, it diverges no matter how many terms you take.

Series: ln(1 + x): R = 1

Worked example: ln(1 + x) with six terms at x = 0.8 gives 0.5701 against 0.5878 β€” still converging, slowly. At x = 1.2 the terms grow and the sum runs away

Open this case: ln edge
A radius of convergence β€” beyond it, more terms do not help. Inside the radius the polynomial tracks the curve; past it, it leaves and never comes back. The function has a singularity a finite distance from the centre. Inside that distance the series converges; outside it, it diverges no matter how many terms you take.
Inside the radius the polynomial tracks the curve; past it, it leaves and never comes back.

04

Move the centre β€” cheaper than adding terms

What you know: You need accuracy at some point far from where the series is centred. Re-expanding around a nearer point costs nothing extra in degree.

Series: Δa ≠ 0, Δn = 0

Worked example: Degree 4 for cos x at x = 2: centred at 0 it gives βˆ’0.333 against βˆ’0.416, centred at 1 it gives βˆ’0.4086 β€” an error eleven times smaller

Open this case: shifted center
Move the centre β€” cheaper than adding terms. Same degree, different centre: the expansion around 1 hugs the curve at x = 2. You need accuracy at some point far from where the series is centred. Re-expanding around a nearer point costs nothing extra in degree.
Same degree, different centre: the expansion around 1 hugs the curve at x = 2.

Problem solved in full

  1. Approximating sin 1 with the degree-3 Maclaurin polynomial and bounding the error 5 steps

    Approximate sin 1 with the degree-3 Maclaurin polynomial, and bound the error before looking up the true value. An error bound you can only compute once you know the answer is worth nothing.

    1. Maclaurin needs the derivatives at 0, and sine cycles through them with period four. Two of the first four are zero, which is why the polynomial ends up so short.

    2. So P₃ has two terms, and the xΒ³/6 is the whole correction. It moves 1 down to 0.83333 β€” a cut of nearly 17%, which is already a hint that the next term will not be negligible either.

    3. This is the step that earns the section. The series for sine alternates with terms that shrink, so the truncation error is smaller than the first term left out. That term is x⁡/120, and computing it requires knowing nothing whatsoever about sin 1.

    4. Now check the promise. The true value is 0.84147, so the actual error is 0.0081377 β€” and it does sit under the 0.0083333 that was guaranteed in advance.

    5. The bound is tight, and you can see why. The error is the entire omitted tail, and the tail alternates as well: 1/5! overshoots, subtracting 1/7! overshoots the other way, and 1/9! brings it home. Three terms already reproduce the printed error digit for digit.

    Answer

    P₃(1) = 0.83333 against a true 0.84147, an error of 0.0081377 β€” all three on the panel above. What the panel cannot show is the order the numbers arrived in. 1/120 = 0.0083333 was available before sin 1 was, and it overshot the real error by only 2.4%. That is the difference between an approximation and a guess: an approximation comes with a certificate. Raise the degree to 5 and the same argument hands you 1/5040 β€” three decimal places guaranteed before a single digit of the answer is computed.

Learning path

Why everything looks straight up close

Leads to More than one direction the same construction past the first term, and a remainder you can bound rather than hope about.

References (1)

Example problems

  • sin near 0 - Low-degree sin expansion is accurate near x=0.
  • exp fast - Exponential Taylor series converges quickly around 0.
  • ln edge - Logarithm series loses accuracy near radius edge.
  • shifted center - Changing expansion center improves local fit elsewhere.