📘 CodingMarble Learn

Maclaurin and Taylor Series

A Maclaurin series writes a function as an endless polynomial: f(x) = f(0) + f′(0)x + f″(0)x²/2! + … . Near x = 0 a few terms copy the curve very well. The standard series for eˣ, sin x, cos x, ln(1+x) and (1+x)ⁿ must be known with their ranges of validity. A Taylor series does the same around any point a. Series also make hard limits easy: replace each function by its first terms.

🎬 Step-by-step story

  1. Near x = 0 the curve y = sin x looks like the straight line y = x. So for small x, sin x ≈ x.
  2. Add the next term, −x³/3!. The copy now bends like sin x and stays close for longer.
  3. Keep adding terms up to x⁷. Each new term makes the copy fit over a wider stretch of the curve.
  4. Build eˣ the same way: 1 + x + x²/2! + x³/3! + … At x = 1 the sum creeps up to e ≈ 2.718.
  5. Some series only work in a range. ln(1+x) works only when −1 < x ≤ 1. Outside, more terms make it worse.
  6. Your turn: pick a function and change the number of terms. See where the copy fits and where it fails.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why does sin x ≈ x only work for small x?

The line y = x and the curve touch at 0 and then drift apart. Near 0 the gap is tiny. Step 1 shows them peeling away as x grows.

Why do we divide by factorials?

Differentiating xʳ r times gives r!. Dividing by r! makes the r-th derivative of the copy equal f⁽ʳ⁾(0). That is why the copy bends like the curve (step 2).

Will a few terms ever be exact?

Only for polynomials. For sin x or eˣ every extra term pushes the good fit further out, as in step 3, but a finite copy always drifts away somewhere.

How does a series give the number e?

Put x = 1 in eˣ: 1 + 1 + 1/2 + 1/6 + 1/24 + … = 2.718… Watch the readout in step 4.

Why is ln(1+x) not valid for x = 2?

The terms 2ʳ/r grow instead of shrinking, so the sum runs away. The green band in step 5 is the only safe zone.

Is a Taylor series different from a Maclaurin series?

A Maclaurin series is a Taylor series centred at 0. Taylor can be centred at any a. Try picking functions in the free play to see fits around 0.

What is a Maclaurin series?

A polynomial is a sum like 3 + 2x − x². It is easy to work with. The big idea: many functions can be written as a polynomial that never ends.

We want a polynomial that matches f(x) at x = 0. We make its value match, its slope match, its bending match, and so on. That gives the Maclaurin series:

f(x) = f(0) + f′(0)x + f″(0)x²/2! + f‴(0)x³/3! + … + f⁽ʳ⁾(0)xʳ/r! + …

The part f⁽ʳ⁾(0)xʳ/r! is the general term (the r-th term). The ! means factorial: 4! = 4 × 3 × 2 × 1 = 24.

How to derive one

  1. Differentiate f again and again.
  2. Put x = 0 into each derivative.
  3. Divide the r-th value by r! and multiply by xʳ.
  4. Spot the pattern and write the general term.

Example: f(x) = eˣ. Every derivative is eˣ, and e⁰ = 1. So every coefficient is 1/r!, and eˣ = 1 + x + x²/2! + x³/3! + … with general term xʳ/r!.

The standard series you must know

Notice: sin x has only odd powers (it is an odd function) and cos x has only even powers (it is even). In sin and cos, x must be in radians.

Making new series from old ones

Replace x by something else: e^(2x) = 1 + 2x + 4x²/2! + … ; ln(1 − x) = −x − x²/2 − x³/3 − … . You can also multiply two series, or differentiate/integrate a series term by term.

When is each series valid?

A series is valid for an x when adding more and more terms settles on the true value (the series converges).

After a substitution, the range changes too. ln(1 + 3x) is valid when −1 < 3x ≤ 1, i.e. −1/3 < x ≤ 1/3. In the 3D (step 5) the green band shows the valid range of ln(1+x): outside it, extra terms push the copy further away.

Taylor series about any point

A Maclaurin series is built at x = 0. A Taylor series is built at any point x = a:

f(x) = f(a) + f′(a)(x − a) + f″(a)(x − a)²/2! + …

Use it when 0 is a bad centre, for example ln x (ln 0 does not exist), or when you need accuracy near a point like x = 1. Writing x = a + h gives the same idea: f(a + h) = f(a) + h f′(a) + h² f″(a)/2! + … .

Using series to find limits

Some limits look like 0/0. Series fix this. Replace each function by its first few terms, cancel, then let x → 0.

Example: lim (x→0) (sin x)/x. Write sin x = x − x³/6 + … . Then (sin x)/x = 1 − x²/6 + … → 1.

Example: lim (x→0) (1 − cos x)/x². Here 1 − cos x = x²/2 − x⁴/24 + … , so the fraction = 1/2 − x²/24 + … → 1/2.

L'Hôpital's rule

If f(a) = g(a) = 0 (or both are infinite), then lim f(x)/g(x) = lim f′(x)/g′(x), if that limit exists. Differentiate top and bottom separately (not the quotient rule). You may need to use it more than once.

Try it: approximate with a few terms

Take a calculator in radian mode. Work out 0.2 − 0.2³/6. Now press sin 0.2. Compare. Then try x = 1 and x = 3. Predict first: will two terms still be good at x = 3? Check in the 3D free play by choosing sin x and n = 3.

Key formulas and definitions

Worked examples

1. Write the first three non-zero terms of e^(3x).

Put 3x in place of x: 1 + 3x + (3x)²/2! = 1 + 3x + 9x²/2.

2. Find cos 0.1 to 6 decimal places using the series.

cos 0.1 ≈ 1 − 0.01/2 + 0.0001/24 = 1 − 0.005 + 0.0000041667 = 0.995004.

3. Find the Maclaurin series of ln(1 + 2x) up to x³ and state the validity.

Replace x by 2x: 2x − (2x)²/2 + (2x)³/3 = 2x − 2x² + 8x³/3. Valid when −1 < 2x ≤ 1, i.e. −1/2 < x ≤ 1/2.

4. Derive the Maclaurin series of f(x) = cos x up to x⁴ from derivatives.

f = cos x → f(0) = 1; f′ = −sin x → 0; f″ = −cos x → −1; f‴ = sin x → 0; f⁗ = cos x → 1. So cos x = 1 + 0·x − x²/2! + 0·x³ + x⁴/4! = 1 − x²/2 + x⁴/24.

5. Expand eˣ sin x up to x³.

(1 + x + x²/2 + x³/6)(x − x³/6). Keep powers ≤ 3: x + x² + x³/2 − x³/6 = x + x² + x³/3.

6. Find lim (x→0) (eˣ − 1 − x)/x².

eˣ − 1 − x = x²/2 + x³/6 + … . Divide by x²: 1/2 + x/6 + … → 1/2.

7. Find the Taylor series of ln x about x = 1 up to the (x − 1)³ term.

f = ln x → f(1) = 0; f′ = 1/x → 1; f″ = −1/x² → −1; f‴ = 2/x³ → 2. So ln x ≈ (x − 1) − (x − 1)²/2 + 2(x − 1)³/6 = (x − 1) − (x − 1)²/2 + (x − 1)³/3.

Common mistakes

Practice quiz

1. The Maclaurin series of eˣ is:
2. For which x is the series for ln(1+x) valid?
3. The coefficient of x² in the Maclaurin series of f(x) is:
4. lim (x→0) (sin x)/x equals:
5. Which series contains only even powers of x?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is the difference between Taylor and Maclaurin series?

A Maclaurin series is the special Taylor series centred at x = 0. A Taylor series can be centred at any point a and uses powers of (x − a).

Why must x be in radians?

The derivative of sin x is cos x only when x is in radians. The series is built from those derivatives, so it only works in radians.

How are Maclaurin series used in exams?

Typical questions: derive a series from derivatives, expand composite or product functions, state the range of validity, approximate a value, and find limits of 0/0 type.

Where this is taught

England (GCSE, A level)Year 12D Further algebra and functions (part 1)
England (GCSE, A level)Year 13D Further algebra and functions (part 2)

Learn first

Learn next

Related lessons

All Maths lessons