5.19 · AHL · HL onlyPaper 1Paper 2Paper 3

Maclaurin series and deriving expansions

In a minute

A writes a function as a polynomial that never ends, built from its derivatives at x=0x = 0. Its first few terms give a very good approximation near x=0x = 0. You learn six standard series, build new ones from them, and find series for the solutions of differential equations.

You'll be able to

  • Build the Maclaurin series of a function from its derivatives at x=0x = 0.
  • Use the standard series for ex\mathrm{e}^{x}, sin⁡x\sin x, cos⁡x\cos x, arctan⁡x\arctan x, ln⁡(1+x)\ln(1+x) and (1+x)p(1+x)^{p}, and use them to estimate values.
  • Get new series by substitution and by multiplying series together.
  • Differentiate and integrate a series term by term to get new series and to estimate integrals.
  • Find the series for the solution of a differential equation from its derivatives at x=0x = 0.
Before you start2 quick questions on what this builds on
Check yourself
Differentiate e−4x\mathrm{e}^{-4x}.
Check yourself
Find f′′′(x)f'''(x) when f(x)=x5f(x) = x^{5}.

Revise first: 5.6 Differentiation rules and standard functions and 5.12 Continuity, limits and higher derivatives

Building a Maclaurin series

Polynomials are easy to work with: you can add, multiply, differentiate and integrate them in a line. Functions like ex\mathrm{e}^{x} and cos⁡x\cos x are harder. So look for a polynomial that behaves like the function near x=0x = 0.

Make the polynomial match the function at x=0x = 0: the same value, the same gradient, the same second derivative, and so on. Each extra match makes the fit closer. Carry on forever and you get the function's .

Where do the factorials come from? Differentiate anxna_{n}x^{n} nn times and you get n! ann!\,a_{n}, where n!=1×2×⋯×nn! = 1 \times 2 \times \cdots \times n. So to match the nnth f(n)(0)f^{(n)}(0), the coefficient of xnx^{n} must be f(n)(0)n!\dfrac{f^{(n)}(0)}{n!}.

In the formula booklet
f(x)=f(0)+xf′(0)+x22!f′′(0)+…f(x) = f(0) + x f'(0) + \frac{x^{2}}{2!} f''(0) + \ldots

This is in the formula booklet.

1. Differentiate ff as many times as the question needs.

2. Put x=0x = 0 into ff and into each derivative.

3. Divide the nnth derivative's value by n!n! and multiply by xnx^{n}.

Worked exampleUse the Maclaurin formula to find the series for cos⁡x\cos x up to the term in x4x^{4}.

Try it first, then reveal one step at a time.

  1. Differentiate four times: f(x)=cos⁡xf(x) = \cos x, f′(x)=−sin⁡xf'(x) = -\sin x, f′′(x)=−cos⁡xf''(x) = -\cos x, f′′′(x)=sin⁡xf'''(x) = \sin x, f(4)(x)=cos⁡xf^{(4)}(x) = \cos x.

Try it below. With three terms, the dashed polynomial 1−12x2+124x41 - \tfrac{1}{2}x^{2} + \tfrac{1}{24}x^{4} sits on cos⁡x\cos x near 00 and drifts away further out. Add terms and watch the close stretch grow.

Maclaurin partial sumsPick a function and drag the sliders
−6−4−2246−22f(x) = cos x (solid)P3 (dashed)

3
1.5

P₃(x) = 1 − x²/2 + x⁴/24

Converges for all real x

P₃(1.5) = 0.08594, f(1.5) = 0.07074, error |f − P₃| = 0.01520

The Maclaurin series adds more terms of f(0), f′(0)x, f″(0)x²/2!, … Each extra term hugs f more tightly near x = 0, and the error grows as x moves away from 0.
Worked exampleFind the Maclaurin series for f(x)=esin⁡xf(x) = \mathrm{e}^{\sin x} up to the term in x2x^{2}.

Try it first, then reveal one step at a time.

  1. Value: f(0)=esin⁡0=e0=1f(0) = \mathrm{e}^{\sin 0} = \mathrm{e}^{0} = 1.
Check yourself
A function has f(0)=2f(0) = 2, f′(0)=−1f'(0) = -1, f′′(0)=6f''(0) = 6 and f′′′(0)=12f'''(0) = 12. Which is its Maclaurin series up to the term in x3x^{3}?

The standard series

Work the formula through for each standard function and you get series you'll use again and again. These five are in the formula booklet:

In the formula booklet
ex=1+x+x22!+…\mathrm{e}^{x} = 1 + x + \frac{x^{2}}{2!} + \ldots
In the formula booklet
ln⁡(1+x)=x−x22+x33−…\ln(1 + x) = x - \frac{x^{2}}{2} + \frac{x^{3}}{3} - \ldots
In the formula booklet
sin⁡x=x−x33!+x55!−…\sin x = x - \frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \ldots
In the formula booklet
cos⁡x=1−x22!+x44!−…\cos x = 1 - \frac{x^{2}}{2!} + \frac{x^{4}}{4!} - \ldots
In the formula booklet
arctan⁡x=x−x33+x55−…\arctan x = x - \frac{x^{3}}{3} + \frac{x^{5}}{5} - \ldots

Learn the pattern of each one, so you can write more terms than the booklet shows: the next term of ex\mathrm{e}^{x} is x33!\dfrac{x^{3}}{3!}.

The sixth is the binomial series. The booklet gives it for (a+b)n(a+b)^{n} with nn rational:

In the formula booklet
(a+b)n=an(1+n(ba)+n(n−1)2!(ba)2+…)(a+b)^{n} = a^{n}\left(1 + n\left(\frac{b}{a}\right) + \frac{n(n-1)}{2!}\left(\frac{b}{a}\right)^{2} + \ldots\right)

Put a=1a = 1 and b=xb = x, and call the power pp. You get the series for (1+x)p(1+x)^{p}, for any rational pp, fractions and negatives included. If pp is a positive whole number the series stops; otherwise it goes on forever.

Learn this
(1+x)p=1+px+p(p−1)2!x2+p(p−1)(p−2)3!x3+…(1+x)^{p} = 1 + px + \frac{p(p-1)}{2!}x^{2} + \frac{p(p-1)(p-2)}{3!}x^{3} + \ldots

A series only equals its function where it is . The series for ex\mathrm{e}^{x}, sin⁡x\sin x and cos⁡x\cos x work for every xx. The series for ln⁡(1+x)\ln(1+x) needs −1<x≤1-1 < x \le 1, arctan⁡x\arctan x needs −1≤x≤1-1 \le x \le 1, and (1+x)p(1+x)^{p} needs −1<x<1-1 < x < 1.

Worked exampleFind the series for 1+x3\sqrt[3]{1+x} up to the term in x3x^{3}.

Try it first, then reveal one step at a time.

  1. Write it as a power: 1+x3=(1+x)13\sqrt[3]{1+x} = (1+x)^{\frac{1}{3}}, so p=13p = \tfrac{1}{3}.
Check yourself
Which is the series for (1+x)−2(1+x)^{-2} up to the term in x2x^{2}?

Put a small number in for xx and the first few terms give an estimate. The closer xx is to 00, the fewer terms you need.

Worked exampleUse the first four terms of the series for ex\mathrm{e}^{x} to find an approximation for e\sqrt{\mathrm{e}} as a fraction.

Try it first, then reveal one step at a time.

  1. Write e=e12\sqrt{\mathrm{e}} = \mathrm{e}^{\frac{1}{2}}, so put x=12x = \tfrac{1}{2}.
Check yourself
Use the first three terms of the series for ln⁡(1+x)\ln(1+x) to estimate ln⁡1.4\ln 1.4. Give your answer to 3 s.f.

Substitution and products

You rarely need to differentiate from scratch. Start from a standard series and change it.

Substitution: replace every xx in a standard series by something else, such as 3x3x, −x-x or x2x^{2}. Put brackets round it first, so the whole thing is raised to the power: (3x)2=9x2(3x)^{2} = 9x^{2}, not 3x23x^{2}.

The range of validity moves with it. If the series in uu needs −1<u≤1-1 < u \le 1, then with u=3xu = 3x you need −1<3x≤1-1 < 3x \le 1.

Worked exampleFind the series for ln⁡(1+3x)\ln(1+3x) up to the term in x3x^{3}. For which values of xx is it valid?

Try it first, then reveal one step at a time.

  1. Start from ln⁡(1+u)=u−u22+u33−…\ln(1+u) = u - \dfrac{u^{2}}{2} + \dfrac{u^{3}}{3} - \ldots and put u=3xu = 3x.
Check yourself
Which is the series for e−3x\mathrm{e}^{-3x} up to the term in x3x^{3}?

Products: to expand f(x) g(x)f(x)\,g(x), write the series of each factor and multiply out. For each power you want, collect every pair of terms whose powers add up to it. Ignore anything higher.

Worked exampleFind the for ln⁡(1+x)1+x\dfrac{\ln(1+x)}{1+x} up to the term in x3x^{3}.

Try it first, then reveal one step at a time.

  1. Write it as a product: ln⁡(1+x)×(1+x)−1\ln(1+x) \times (1+x)^{-1}.
Check yourself
Find the series for 1+x cos⁡x\sqrt{1+x}\,\cos x up to the term in x2x^{2}.

You can even substitute a whole series. Put u=sin⁡x=x−…u = \sin x = x - \ldots into eu=1+u+12u2+…\mathrm{e}^{u} = 1 + u + \tfrac{1}{2}u^{2} + \ldots. Up to x2x^{2} this gives esin⁡x=1+x+12x2+…\mathrm{e}^{\sin x} = 1 + x + \tfrac{1}{2}x^{2} + \ldots, the same as the first section.

Check yourself
Use series to find lim⁡x→0ln⁡(1+2x)−2xx2\displaystyle\lim_{x \to 0}\frac{\ln(1+2x) - 2x}{x^{2}}.

Differentiating and integrating a series

Inside its range of validity, a series can be differentiated or integrated term by term, like a polynomial. The result is the series of the derivative, or of the integral.

When you integrate, a appears. Find it by putting x=0x = 0 into both sides.

Worked exampleDifferentiate the series for ln⁡(1+x)\ln(1+x) to find the series for 11+x\dfrac{1}{1+x}.

Try it first, then reveal one step at a time.

  1. Differentiate the function: ddxln⁡(1+x)=11+x\dfrac{\mathrm{d}}{\mathrm{d}x}\ln(1+x) = \dfrac{1}{1+x}.
Check yourself
Given 11−x=1+x+x2+x3+…\dfrac{1}{1-x} = 1 + x + x^{2} + x^{3} + \ldots, differentiate to find the series for 1(1−x)2\dfrac{1}{(1-x)^{2}} up to the term in x2x^{2}.
Worked exampleUse the series for (1+x)p(1+x)^{p} and integration to find the series for arcsin⁡x\arcsin x up to the term in x5x^{5}.

Try it first, then reveal one step at a time.

  1. From 5.15, ddxarcsin⁡x=11−x2=(1−x2)−12\dfrac{\mathrm{d}}{\mathrm{d}x}\arcsin x = \dfrac{1}{\sqrt{1-x^{2}}} = \left(1 - x^{2}\right)^{-\frac{1}{2}}.

Integrating a series also estimates integrals you can't find exactly, such as ∫e−x3 dx\int \mathrm{e}^{-x^{3}}\,\mathrm{d}x. On Paper 2 your calculator can then tell you how good the estimate is.

Worked example(a) Find the series for e−x3\mathrm{e}^{-x^{3}} up to the term in x6x^{6}. (b) Hence estimate ∫00.5e−x3 dx\displaystyle\int_{0}^{0.5} \mathrm{e}^{-x^{3}}\,\mathrm{d}x to 5 significant figures, and compare it with your calculator's value.

Try it first, then reveal one step at a time.

  1. (a) Put u=−x3u = -x^{3} into eu=1+u+u22!+…\mathrm{e}^{u} = 1 + u + \dfrac{u^{2}}{2!} + \ldots to get e−x3=1−x3+12x6−…\mathrm{e}^{-x^{3}} = 1 - x^{3} + \tfrac{1}{2}x^{6} - \ldots
Check yourself
Use the series for ln⁡(1+x2)\ln(1+x^{2}) up to the term in x4x^{4} to estimate ∫00.4ln⁡(1+x2) dx\displaystyle\int_{0}^{0.4} \ln(1+x^{2})\,\mathrm{d}x. Give your answer to 3 s.f.

Series from a differential equation

Suppose you know dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} in terms of xx and yy, and the value of yy at x=0x = 0. You may not be able to solve this differential equation (see 5.18). You can still find the of its solution, because the equation gives you every derivative at x=0x = 0.

Write y(0)y(0) for the value of yy at x=0x = 0, y′(0)y'(0) for the value of dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} there, and so on. Then:

1. Put x=0x = 0 and y(0)y(0) into the equation to get y′(0)y'(0).

2. Differentiate the whole equation with respect to xx to get d2ydx2\dfrac{\mathrm{d}^{2}y}{\mathrm{d}x^{2}}. A term in yy needs the , as in : ddx(y2)=2ydydx\dfrac{\mathrm{d}}{\mathrm{d}x}\left(y^{2}\right) = 2y\dfrac{\mathrm{d}y}{\mathrm{d}x}.

3. Put in x=0x = 0 and the values you already have, to get y′′(0)y''(0). Repeat for y′′′(0)y'''(0).

4. Substitute the values into the Maclaurin formula.

Worked exampledydx=y−x2\dfrac{\mathrm{d}y}{\mathrm{d}x} = y - x^{2}, and y=1y = 1 when x=0x = 0. Find the Maclaurin series for yy up to the term in x3x^{3}.

Try it first, then reveal one step at a time.

  1. At x=0x = 0: y′(0)=y(0)−02=1y'(0) = y(0) - 0^{2} = 1.
Check yourself
dydx=xy+2\dfrac{\mathrm{d}y}{\mathrm{d}x} = xy + 2, and y=1y = 1 when x=0x = 0. What is the coefficient of x2x^{2} in the Maclaurin series for yy?
Worked exampledydx=ex+y2\dfrac{\mathrm{d}y}{\mathrm{d}x} = \mathrm{e}^{x} + y^{2}, and y=0y = 0 when x=0x = 0. Find the Maclaurin series for yy up to the term in x3x^{3}.

Try it first, then reveal one step at a time.

  1. At x=0x = 0: y′(0)=e0+02=1y'(0) = \mathrm{e}^{0} + 0^{2} = 1.
Check yourself
Use the series y=x+12x2+12x3y = x + \tfrac{1}{2}x^{2} + \tfrac{1}{2}x^{3} from the last example to estimate yy when x=0.2x = 0.2. Give your answer to 3 s.f.

Common mistakes

  • Dividing by nn instead of n!n!. The coefficient of x3x^{3} is f′′′(0)3!\dfrac{f'''(0)}{3!}, so f′′′(0)=12f'''(0) = 12 gives 22, not 44.
  • Substituting without brackets, or not at all. With u=3xu = 3x, the u2u^{2} term is (3x)2=9x2(3x)^{2} = 9x^{2}. For arctan⁡3x\arctan 3x, every xx in the arctan⁡x\arctan x series becomes 3x3x.
  • Multiplying series term by term and missing the cross terms. For each power you need, list every pair of terms whose powers add up to it.
  • Sign slips in binomial coefficients when pp is negative. Two negative factors give a positive: (−2)(−3)2!=3\dfrac{(-2)(-3)}{2!} = 3.
  • Leaving out the constant when you integrate a series, or not showing why it is 00. Put x=0x = 0 into both sides.
  • Forgetting the dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} factor when you differentiate y2y^{2} or y3y^{3} in a differential equation.

Exam tips

  • "Write down" a standard series: quote it from the booklet, no working needed. "Find" a new series: show the substitution line, such as (3x)−(3x)22+…(3x) - \dfrac{(3x)^{2}}{2} + \ldots, for the method mark.
  • "Up to the term in x3x^{3}" means keep every contribution to x3x^{3} and drop everything higher. Take one more term of each factor than you think you need, then discard.
  • For a "hence" estimate, put a small xx into the series and keep exact fractions on Paper 1. Check that xx is inside the range of validity; for a product, it must be inside both ranges.

Key takeaways

In bookletf(x)=f(0)+xf′(0)+x22!f′′(0)+…f(x) = f(0) + x f'(0) + \frac{x^{2}}{2!} f''(0) + \ldots
In bookletex=1+x+x22!+…\mathrm{e}^{x} = 1 + x + \frac{x^{2}}{2!} + \ldots
In bookletln⁡(1+x)=x−x22+x33−…\ln(1 + x) = x - \frac{x^{2}}{2} + \frac{x^{3}}{3} - \ldots
In bookletsin⁡x=x−x33!+x55!−…\sin x = x - \frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \ldots
In bookletcos⁡x=1−x22!+x44!−…\cos x = 1 - \frac{x^{2}}{2!} + \frac{x^{4}}{4!} - \ldots
In bookletarctan⁡x=x−x33+x55−…\arctan x = x - \frac{x^{3}}{3} + \frac{x^{5}}{5} - \ldots
Learn this(1+x)p=1+px+p(p−1)2!x2+p(p−1)(p−2)3!x3+…(1+x)^{p} = 1 + px + \frac{p(p-1)}{2!}x^{2} + \frac{p(p-1)(p-2)}{3!}x^{3} + \ldots
Learn thisThe coefficient of xnx^{n} is f(n)(0)n!\dfrac{f^{(n)}(0)}{n!}: always divide by the factorial.
Learn thisThe series for ex\mathrm{e}^{x}, sin⁡x\sin x, cos⁡x\cos x, arctan⁡x\arctan x and ln⁡(1+x)\ln(1+x) are in the booklet. Learn their patterns to write extra terms.
Learn thisValid for: ex\mathrm{e}^{x}, sin⁡x\sin x, cos⁡x\cos x all xx; ln⁡(1+x)\ln(1+x) when −1<x≤1-1 < x \le 1; arctan⁡x\arctan x when −1≤x≤1-1 \le x \le 1; (1+x)p(1+x)^{p} when −1<x<1-1 < x < 1.
Learn thisNew series: substitute with brackets, multiply and collect each power, or differentiate or integrate term by term (find CC at x=0x = 0).
Learn thisFrom dydx=f(x,y)\dfrac{\mathrm{d}y}{\mathrm{d}x} = f(x, y): find y′(0)y'(0), differentiate the equation for y′′(0)y''(0) and y′′′(0)y'''(0), then use the Maclaurin formula.

Practise this

19 past-paper questions on 5.19 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 5.19 →