Skip to content
Brainlag Get Plus

Theme

Colour

Study display

Turn these off for a calmer page with less to look at while you study.

← All simulations

Taylor and Maclaurin series

A Taylor polynomial copies a function's value and its first n derivatives at one point. Add terms and it hugs the curve further out, but only as far as the radius of convergence.

Error at x₀ against degree n (log scale)

What's happening

Near x = a a smooth function looks like its tangent line, and it looks even more like a polynomial that matches its value and its first n derivatives there: Pₙ(x) = Σ f⁽ᵏ⁾(a)(x − a)ᵏ/k!. Expanding about a = 0 gives the Maclaurin series. For eˣ, sin x and cos x the polynomials get better everywhere as n grows, because the k! in the denominator eventually beats any power of x.

For ln(1 + x), 1/(1 − x), √(1 + x) and arctan x they only improve inside the interval of convergence, a distance R from a. Outside it the error grows with n, however many terms you add.

R is the distance from a to the nearest point where the function breaks down, and for arctan that point is not on the real line at all: it is ±i, where 1/(1 + x²) blows up. The Lagrange form of the remainder bounds the error without knowing the answer: |f(x) − Pₙ(x)| ≤ M|x − a|ⁿ⁺¹/(n + 1)!, where M is the largest size of f⁽ⁿ⁺¹⁾ between a and x.

  • Taylor polynomialPₙ(x) = Σ f⁽ᵏ⁾(a)(x − a)ᵏ / k!
  • Exponential serieseˣ = 1 + x + x²/2! + x³/3! + ...
  • Logarithm seriesln(1 + x) = x − x²/2 + x³/3 − ..., −1 < x ≤ 1
  • Remainder bound|Rₙ(x)| ≤ M|x − a|ⁿ⁺¹ / (n + 1)!

On the syllabus

  • A-Level Further Maths AQA, Edexcel, OCR, OCR MEIMaclaurin series of standard functions and their validity
  • First-year university calculusTaylor's theorem, the Lagrange remainder and radius of convergence

Challenge

Predict first: with f = sin x about a = 0, what degree n do you need before Pₙ(3) is within 0.001 of sin 3? Use the Lagrange bound 3ⁿ⁺¹/(n + 1)!, then set x₀ = 3 and step n up.

Learn this properly

Lessons from GCSE Maths on this topic: worked steps, then exam-style questions with new numbers every time.

See the whole courseThe full course, topic tests and mock papers come with Plus. See Plus

FAQ

What is the difference between a Taylor and a Maclaurin series?

None in kind: a Maclaurin series is a Taylor series expanded about a = 0. A Taylor series about a uses powers of (x − a) and the derivatives at a.

Why does the series for ln(1 + x) only work for −1 < x ≤ 1?

ln(1 + x) is undefined at x = −1, and a power series about 0 converges on a disc that cannot contain that point, so the radius is 1. At x = 1 the series becomes 1 − 1/2 + 1/3 − ..., which converges (to ln 2); at x = −1 it is minus the harmonic series, which diverges.

Why does arctan x have radius of convergence 1 when it is defined everywhere?

Its derivative 1/(1 + x²) blows up at the complex numbers x = ±i, which are a distance 1 from 0. A power series converges on a disc in the complex plane, and that disc stops at the nearest trouble, even when the trouble is not on the real line.

How do I use the Lagrange remainder?

Find the (n + 1)th derivative, bound its size by M on the interval between a and x, and then |f(x) − Pₙ(x)| ≤ M|x − a|ⁿ⁺¹/(n + 1)!. For sin x you can always take M = 1.

How many terms of a Taylor series do I need for a given accuracy?

Use the Lagrange remainder |Rₙ| ≤ max|f⁽ⁿ⁺¹⁾| |x − a|ⁿ⁺¹/(n + 1)! and find the first n that makes it small enough. For eˣ about 0 at x = 1 with an error below 0.0001: n = 6 gives e/7! = 0.00054, too big, and n = 7 gives e/8! = 0.000067, so n = 7. Smallest n for an accuracy under Solve for runs this search.