Open the editor

calculus · university · explainer

Taylor Series: Approximating Functions with Polynomials

The Tracé team · · 2 min read

A Taylor series rewrites a function as a polynomial that matches it more and more closely: eˣ = 1 + x + x²/2 + x³/6 + x⁴/24 + …. Each new term fixes the error left by the previous ones. Five terms already give e¹ to within 0.4%.

The idea

Near x = 0, choose a polynomial with the same value, the same slope, the same curvature, and so on, as the function. The term in xn has coefficient f(n)(0)/n!. For eˣ every derivative at 0 is 1, which gives the 1/n! coefficients.

1 + x + x²/2 + x³/6 + x⁴/24 next to the curve of eˣ
Each click adds a term, and the polynomial hugs eˣ over a wider range.

How good are a few terms?

Terms used for e¹ValueError
1 + 120.718
+ 1/22.50.218
+ 1/62.6670.052
+ 1/242.7080.010
+ 1/1202.7170.002

The true value is e ≈ 2.71828. Close to 0 the approximation is excellent; far from 0 you need many more terms.

Sine and the small-angle approximation

For sine, only odd powers appear, with alternating signs: sin x = x − x³/6 + x⁵/120 − …. Keeping only the first term gives sin x ≈ x for small angles in radians. At x = 0.5, two terms give 0.47917 against the true 0.47943.

That approximation is what makes the pendulum formula T = 2π√(L/g) work: it is exact only for small swings.

Common mistakes to watch for

  • Degrees instead of radians. sin x ≈ x only works with x in radians.
  • Forgetting the factorials. The x³ term of eˣ is x³/6, not x³/3.
  • Trusting it far from the centre. A few terms of a series around 0 can be badly wrong at x = 5.

Building it in Tracé

  1. Add a graph and set Curve to Fourier or Taylor series, then choose Taylor: eˣ (or sin x, cos x).
  2. Tick Show the exact curve, dashed.
  3. Animate Number of terms on clicks: 1, 2, 3, 4, 5. Each click adds a term and the curve bends towards the exact one.

Questions

What is the difference between Taylor and Maclaurin series?

A Maclaurin series is a Taylor series centred at 0. Taylor series can be centred at any point a, using powers of (x − a).

Do calculators use Taylor series?

Related ideas, yes: calculators and computers evaluate functions like sin and eˣ with carefully chosen polynomial or rational approximations, plus tricks to keep x small.

When is this taught?

In first-year university calculus, and in some final-year high school courses (AP Calculus BC, A-level Further Maths).

Make this slide yourselfFree to start, in your browser, no code. Present it, share a link or export a video.
Open the editor

More: Animated math slides for teachers · How to create math slides, step by step

New free slides by emailWhen new free slides and lessons come out. No spam, and one click to unsubscribe.