This note covers Maclaurin series: a way of writing a function as a polynomial-like series in powers of \(x\). You will build series from derivatives, use the standard series for common functions, and combine them by substitution, multiplication, differentiation and integration. They give accurate approximations and let you find limits and integrals that are hard to do directly.
Key ideas
If a function \(f(x)\) can be differentiated as many times as needed at \(x=0\), its Maclaurin series is
\[f(x)=f(0)+f'(0)\,x+\frac{f''(0)}{2!}x^{2}+\frac{f'''(0)}{3!}x^{3}+\cdots\]
The general term is \(\tfrac{f^{(n)}(0)}{n!}x^{n}\). Cutting the series after the \(x^{n}\) term gives a polynomial approximation that is very accurate for \(x\) close to 0 and gets worse as \(|x|\) grows. Each extra term usually improves the approximation.
Standard series (learn these, and know when they are valid):
- \(e^{x}=1+x+\tfrac{x^{2}}{2!}+\tfrac{x^{3}}{3!}+\cdots\), valid for all \(x\).
- \(\sin x=x-\tfrac{x^{3}}{3!}+\tfrac{x^{5}}{5!}-\cdots\), valid for all \(x\). Only odd powers appear.
- \(\cos x=1-\tfrac{x^{2}}{2!}+\tfrac{x^{4}}{4!}-\cdots\), valid for all \(x\). Only even powers appear.
- \(\ln(1+x)=x-\tfrac{x^{2}}{2}+\tfrac{x^{3}}{3}-\cdots\), valid for \(-1\lt x\le 1\).
- \((1+x)^{p}=1+px+\tfrac{p(p-1)}{2!}x^{2}+\tfrac{p(p-1)(p-2)}{3!}x^{3}+\cdots\), valid for \(|x|\lt 1\) when \(p\) is a rational number that is not a non-negative integer.
Building new series.
- Substitution: replace \(x\) by \(2x\), \(-x^{2}\), and so on. The validity condition changes too. For \(\ln(1+3x)\) it becomes \(-\tfrac13\lt x\le\tfrac13\).
- Multiplication: multiply two series and collect terms of the same power. Stop at the order you need.
- Differentiation and integration: these can be done term by term, which gives new series.
- From a differential equation: if you know \(y(0)\) and \(\tfrac{dy}{dx}\) in terms of \(x\) and \(y\), differentiate repeatedly to find \(y'(0), y''(0),\dots\). For example, if \(y'=x+y\) with \(y(0)=1\), then \(y'(0)=1\), \(y''=1+y'\) gives \(y''(0)=2\), and \(y'''=y''\) gives \(y'''(0)=2\). So \(y=1+x+x^{2}+\tfrac{x^{3}}{3}+\cdots\).
Limits. Replacing each function by its first few series terms often removes a \(\tfrac00\) form, so a limit as \(x\to0\) can be read off directly.
Choosing a method. Use derivatives when the function is unusual or the question says "find the Maclaurin series of". Use standard series and substitution when the function is built from familiar ones, since this is much quicker and less error-prone.
How good is the approximation? For \(\sin x\) with \(x=0.5\), the one-term estimate \(x\) is 0.5, while \(x-\tfrac{x^{3}}{6}\) gives 0.4792, which is already close to the true value 0.4794. The error is smaller each time you add a term, provided \(x\) is inside the valid range.
Even and odd functions. If \(f\) is even, such as \(\cos x\), only even powers appear. If \(f\) is odd, such as \(\sin x\), only odd powers appear. Spotting this saves effort and works as a check.
Definitions and formulae
| Term or formula | Meaning / when to use |
|---|---|
| \(\sum \tfrac{f^{(n)}(0)}{n!}x^{n}\) | Maclaurin series of \(f\), built from derivatives at \(x=0\). |
| \(e^{x}\), \(\sin x\), \(\cos x\) | Standard series, valid for every real \(x\). |
| \(\ln(1+x)\) | Valid for \(-1\lt x\le1\). |
| \((1+x)^{p}\) | Binomial-type series for rational \(p\), valid for \(|x|\lt1\) (non-integer \(p\)). |
| Polynomial approximation | The series cut off at a chosen power. Best near \(x=0\). |
| Term-by-term calculus | Differentiate or integrate each term to get a new series. |
Worked examples
Example 1 Find the Maclaurin series of \(f(x)=e^{\sin x}\) up to and including the term in \(x^{3}\).
\(f(0)=e^{0}=1\).
\(f'(x)=\cos x\,e^{\sin x}\), so \(f'(0)=1\).
\(f''(x)=-\sin x\,e^{\sin x}+\cos^{2}x\,e^{\sin x}=(\cos^{2}x-\sin x)e^{\sin x}\), so \(f''(0)=1\).
\(f'''(x)=(-2\cos x\sin x-\cos x)e^{\sin x}+(\cos^{2}x-\sin x)\cos x\,e^{\sin x}\). At \(x=0\): \((0-1)(1)+(1)(1)(1)=0\).
\[e^{\sin x}=1+x+\frac{1}{2}x^{2}+\frac{0}{6}x^{3}+\cdots\]
Answer: \(1+x+\tfrac12x^{2}\) (the \(x^{3}\) term is zero).
Example 2 (a) Write down the series for \(\ln(1+3x)\) up to the \(x^{3}\) term and state when it is valid. (b) Use it with \(x=0.1\) to estimate \(\ln 1.3\).
(a) Replace \(x\) by \(3x\) in \(\ln(1+x)=x-\tfrac{x^{2}}{2}+\tfrac{x^{3}}{3}-\cdots\):
\[\ln(1+3x)=3x-\frac{9x^{2}}{2}+\frac{27x^{3}}{3}-\cdots=3x-\frac92x^{2}+9x^{3}-\cdots\]
The original needs \(-1\lt 3x\le1\), so it is valid for \(-\tfrac13\lt x\le\tfrac13\).
(b) With \(x=0.1\), \(1+3x=1.3\). Then \(3x=0.3\), \(\tfrac92x^{2}=0.045\), \(9x^{3}=0.009\).
\(\ln1.3\approx0.3-0.045+0.009=0.264\).
Answer: (a) \(3x-\tfrac92x^{2}+9x^{3}\), for \(-\tfrac13\lt x\le\tfrac13\). (b) \(\ln1.3\approx0.264\) (the true value is 0.262 to 3 s.f.).
Example 3 Use the series for \(e^{x}\) to find the first three non-zero terms of the series for \(e^{-x^{2}}\). Hence estimate \(\int_{0}^{0.5}e^{-x^{2}}\,dx\).
Replace \(x\) by \(-x^{2}\) in \(e^{x}=1+x+\tfrac{x^{2}}{2}+\cdots\):
\[e^{-x^{2}}=1-x^{2}+\frac{x^{4}}{2}-\cdots\]
Integrate term by term:
\[\int_{0}^{0.5}\left(1-x^{2}+\tfrac{x^{4}}{2}\right)dx=\left[x-\frac{x^{3}}{3}+\frac{x^{5}}{10}\right]_{0}^{0.5}\]
\(=0.5-\tfrac{0.125}{3}+\tfrac{0.03125}{10}=0.5-0.041667+0.003125=0.461458\ldots\)
Answer: \(1-x^{2}+\tfrac{x^{4}}{2}\); the integral is approximately \(0.461\).
Common errors
- Common error: Forgetting the factorial. The coefficient of \(x^{n}\) is \(\tfrac{f^{(n)}(0)}{n!}\), not just \(f^{(n)}(0)\).
- Common error: When substituting, changing only the \(x\) and not the powers. In \(\cos 2x\), the \(x^{2}\) term becomes \(\tfrac{(2x)^{2}}{2!}=2x^{2}\), not \(\tfrac{2x^{2}}{2!}\).
- Common error: Using \(\ln x\) instead of \(\ln(1+x)\). There is no Maclaurin series for \(\ln x\), because \(\ln 0\) is undefined.
- Common error: Using a series far from \(x=0\), or outside its valid range, and trusting the result.
- Common error: Sign slips in alternating series such as \(\sin x\) and \(\cos x\), and dropping zero terms when counting "the first three non-zero terms".
Exam tip: If the question says "hence" or gives a standard function, use the standard series with substitution rather than differentiating from scratch. Keep terms only up to the power requested.
Check yourself
- Find the series for \(\cos 2x\) up to and including the \(x^{4}\) term.
Answer
\(\cos u=1-\tfrac{u^{2}}{2}+\tfrac{u^{4}}{24}\) with \(u=2x\): \(1-\tfrac{4x^{2}}{2}+\tfrac{16x^{4}}{24}=1-2x^{2}+\tfrac23x^{4}\). - Use the series for \((1+x)^{1/2}\) up to the \(x^{2}\) term, with \(x=0.04\), to estimate \(\sqrt{1.04}\).
Answer
\((1+x)^{1/2}=1+\tfrac12x+\tfrac{\frac12(-\frac12)}{2}x^{2}=1+\tfrac x2-\tfrac{x^{2}}{8}\). With \(x=0.04\): \(1+0.02-0.0002=1.0198\). - Find \(\displaystyle\lim_{x\to0}\frac{\sin x-x\cos x}{x^{3}}\).
Answer
\(\sin x=x-\tfrac{x^{3}}{6}+\cdots\) and \(x\cos x=x-\tfrac{x^{3}}{2}+\cdots\). The difference is \(\tfrac{x^{3}}{3}+\cdots\). Dividing by \(x^{3}\) gives \(\tfrac13+\cdots\), so the limit is \(\tfrac13\). - Write down the series for \(\tfrac{1}{1+x^{2}}\) up to the \(x^{4}\) term, then integrate to find the series for \(\arctan x\) up to the \(x^{5}\) term.
Answer
\((1+u)^{-1}=1-u+u^{2}-\cdots\) with \(u=x^{2}\) gives \(1-x^{2}+x^{4}\). Since \(\tfrac{d}{dx}\arctan x=\tfrac{1}{1+x^{2}}\) and \(\arctan0=0\), integrating gives \(\arctan x=x-\tfrac{x^{3}}{3}+\tfrac{x^{5}}{5}-\cdots\).