IB Diploma Mathematics AA · Calculus
Maclaurin series (HL)
1Polynomials that copy a function
A Maclaurin series writes a function as an infinite polynomial whose value and derivatives at $x = 0$ match the function's:
$$f(x) = f(0) + xf'(0) + \frac{x^2}{2!}f''(0) + \frac{x^3}{3!}f'''(0) + \ldots$$
Taking only the first few terms gives a polynomial approximation that is very good near $x = 0$.
Maclaurin approximations to sin x: each extra term fits further from 0
Building the series for eˣ
- Every derivative of $e^x$ is $e^x$, which equals 1 at $x = 0$.
- $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots$
- Approximation: $e^{0.1} \approx 1 + 0.1 + 0.005 + 0.000167 = 1.10517$. The true value is $1.105171$.
Check yourself
Near which point is a Maclaurin approximation most accurate?
Show the answer
x = 0
The series is built from derivatives at 0.
2The standard series
These are in the formula booklet:
- $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots$
- $\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \ldots$ for $-1 < x \le 1$
- $\sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \ldots$
- $\cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \ldots$
- $\arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \ldots$ for $|x| \le 1$
Notice that $\sin x$ has only odd powers and $\cos x$ only even powers. This matches $\sin$ being an odd function and $\cos$ being even.
Check yourself
Which series has only even powers of x?
Show the answer
cos x
cos x is an even function.
3Making new series from old ones
You rarely need to differentiate from scratch. Instead:
- Substitute: replace $x$ by $2x$, $-x$ or $x^2$.
- Multiply two series and keep terms up to the power you need.
- Differentiate or integrate a series term by term.
Substitution
- $e^{2x} = 1 + 2x + \frac{(2x)^2}{2!} + \frac{(2x)^3}{3!} + \ldots = 1 + 2x + 2x^2 + \frac{4}{3}x^3 + \ldots$
- $\sin(x^2) = x^2 - \frac{x^6}{6} + \ldots$
Multiplication
- $e^x\sin x$ up to $x^3$: $(1 + x + \frac{x^2}{2})(x - \frac{x^3}{6})$.
- $= x + x^2 + \frac{x^3}{2} - \frac{x^3}{6} + \ldots = x + x^2 + \frac{x^3}{3} + \ldots$
Differentiation
- Differentiate $\sin x = x - \frac{x^3}{6} + \frac{x^5}{120}$ term by term.
- $1 - \frac{x^2}{2} + \frac{x^4}{24}$, which is the series for $\cos x$, as expected.
Check yourself
What is the series for e^(−x) up to x²?
Show the answer
1 − x + x²/2
Replace x with −x in the series for eˣ.
4Series from differential equations
A differential equation can give a Maclaurin series even if you cannot solve it. Use the equation to find $y'(0)$, then differentiate the equation to find $y''(0)$, and so on.
A series solution
- $\frac{dy}{dx} = x + y$ with $y(0) = 1$.
- $y'(0) = 0 + 1 = 1$.
- Differentiate: $y'' = 1 + y'$, so $y''(0) = 2$.
- Again: $y''' = y''$, so $y'''(0) = 2$.
- $y \approx 1 + x + \frac{2}{2!}x^2 + \frac{2}{3!}x^3 = 1 + x + x^2 + \frac{x^3}{3}$.
- Check: the exact solution $2e^x - x - 1$ has exactly this series.
Series also help with limits: $\lim_{x \to 0}\frac{\sin x - x}{x^3} = \lim_{x \to 0}\frac{-\frac{x^3}{6} + \frac{x^5}{120} - \ldots}{x^3} = -\frac{1}{6}$.
Check yourself
Given dy/dx = 2y and y(0) = 3, what is y′(0)?
Show the answer
6
Substitute y(0) = 3 into the equation.
5Approximating values with series
Maclaurin series give good approximations near $x = 0$.
Approximating $e^{0.1}$
- $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$
- $e^{0.1} \approx 1 + 0.1 + 0.005 + 0.000167 = 1.105167$.
- Calculator value: $1.105171$.
- Four terms give accuracy to about 5 decimal places.
Approximations are best for small $x$; far from 0, more terms are needed.
Check yourself
Why are Maclaurin approximations most accurate for small $x$?
Show the answer
Higher powers of small $x$ are tiny, so dropped terms matter little
Small terms dropped.
6Using series to find limits
Series can make some limits easy.
$\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}$
- $e^x - 1 - x = \frac{x^2}{2} + \frac{x^3}{6} + \cdots$
- Divide by $x^2$: $\frac{1}{2} + \frac{x}{6} + \cdots$
- As $x \to 0$, the limit is $\frac{1}{2}$.
$\lim_{x \to 0} \frac{\sin x - x}{x^3}$
- $\sin x = x - \frac{x^3}{6} + \frac{x^5}{120} - \cdots$
- $\sin x - x = -\frac{x^3}{6} + \cdots$
- Limit: $-\frac{1}{6}$.
Check yourself
Using series, what is $\lim_{x \to 0} \frac{\sin x - x}{x^3}$?
Show the answer
$-\frac{1}{6}$
Leading term $-\frac{x^3}{6}$.
7Going deeper: building series by substitution, multiplication and differentiation
The Maclaurin series of $f$ is $f(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \dots$ Deriving a series from scratch is slow. Where possible, build it from the standard ones in the formula booklet.
Worked example (substitution): find the series for $e^{-x^2}$ and estimate $\int_0^{0.5} e^{-x^2}\,dx$.
- Replace $x$ with $-x^2$ in $e^x = 1 + x + \frac{x^2}{2} + \dots$: $e^{-x^2} = 1 - x^2 + \frac{x^4}{2} - \dots$
- Integrate term by term: $x - \frac{x^3}{3} + \frac{x^5}{10} - \dots$
- At $x = 0.5$: $0.5 - 0.04167 + 0.00313 = 0.4615$.
- The true value is 0.4613. Three terms give three correct figures, and this integral has no exact form in elementary functions.
Worked example (multiplication): find the series for $e^x\sin x$ up to $x^3$.
- $e^x = 1 + x + \frac{x^2}{2} + \dots$ and $\sin x = x - \frac{x^3}{6} + \dots$
- Multiply, keeping terms up to $x^3$: $x + x^2 + \frac{x^3}{2} - \frac{x^3}{6}$.
- Result: $x + x^2 + \frac{x^3}{3} + \dots$
Worked example (from derivatives): $f(x) = \ln(1 + \sin x)$, up to $x^3$.
- $f(0) = 0$.
- $f'(x) = \frac{\cos x}{1 + \sin x}$, so $f'(0) = 1$.
- $f''(x) = \frac{-\sin x(1 + \sin x) - \cos^2 x}{(1 + \sin x)^2} = \frac{-(1 + \sin x)}{(1 + \sin x)^2} = -\frac{1}{1 + \sin x}$, so $f''(0) = -1$.
- $f'''(x) = \frac{\cos x}{(1 + \sin x)^2}$, so $f'''(0) = 1$.
- Series: $x - \frac{x^2}{2} + \frac{x^3}{6} + \dots$
Worked example (a limit): $\lim_{x \to 0}\frac{\cos x - 1}{x^2}$.
- $\cos x - 1 = -\frac{x^2}{2} + \frac{x^4}{24} - \dots$
- Dividing by $x^2$ gives $-\frac{1}{2} + \frac{x^2}{24} - \dots$, which tends to $-\frac{1}{2}$.
Other techniques
- Differentiating a series gives the series of the derivative: differentiating the series for $\sin x$ gives the series for $\cos x$.
- Integrating $\frac{1}{1 + x} = 1 - x + x^2 - \dots$ gives $\ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \dots$
- Even and odd functions: $\cos x$ has only even powers; $\sin x$ has only odd powers.
Validity: the series for $e^x$, $\sin x$ and $\cos x$ hold for all $x$. The series for $\ln(1 + x)$ holds for $-1 < x \le 1$, and the binomial series $(1 + x)^p$ for $|x| < 1$.
Common mistakes
- Forgetting the factorials.
- Substituting a value outside the interval of validity.
- Keeping too few terms of each series before multiplying.
Check yourself
What is the coefficient of x³ in the Maclaurin series of e^(2x)?
Show the answer
4/3
The term is (2x)³ ÷ 3! = 8x³ ÷ 6.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera