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
- Differentiate f again and again.
- Put x = 0 into each derivative.
- Divide the r-th value by r! and multiply by xʳ.
- 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
- eˣ = 1 + x + x²/2! + x³/3! + … + xʳ/r! + …
- sin x = x − x³/3! + x⁵/5! − … + (−1)ʳ x²ʳ⁺¹/(2r+1)! + …
- cos x = 1 − x²/2! + x⁴/4! − … + (−1)ʳ x²ʳ/(2r)! + …
- ln(1 + x) = x − x²/2 + x³/3 − … + (−1)ʳ⁺¹ xʳ/r + …
- (1 + x)ⁿ = 1 + nx + n(n−1)x²/2! + n(n−1)(n−2)x³/3! + …
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).
- eˣ, sin x, cos x: valid for all real x.
- ln(1 + x): valid for −1 < x ≤ 1.
- (1 + x)ⁿ: valid for −1 < x < 1 when n is not a positive whole number. If n is a positive whole number the series stops and is true for every x.
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
- Maclaurin: f(x) = Σ f⁽ʳ⁾(0) xʳ / r!
- Taylor about a: f(x) = Σ f⁽ʳ⁾(a) (x − a)ʳ / r!
- eˣ = Σ xʳ/r!, all x
- sin x = Σ (−1)ʳ x²ʳ⁺¹/(2r+1)!, all x
- cos x = Σ (−1)ʳ x²ʳ/(2r)!, all x
- ln(1+x) = Σ (−1)ʳ⁺¹ xʳ/r, −1 < x ≤ 1
- (1+x)ⁿ = 1 + nx + n(n−1)x²/2! + …, |x| < 1
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
- Using degrees in sin x or cos x series. The series only work with x in radians.
- Forgetting the range of validity, or not changing it after a substitution (ln(1 + 3x) needs −1/3 < x ≤ 1/3).
- Forgetting the factorials: the x³ term of eˣ is x³/6, not x³/3.
- Using the quotient rule in l'Hôpital's rule. Differentiate the top and the bottom separately.