Maclaurin Series
Every derivative at x=0 hands you one more coefficient of a power-series expansion — giving a systematic way to build infinite series for almost any function.
Maclaurin series
Provided $f(0),f'(0),f''(0),\ldots$ all exist and are finite, a function can be expanded as an infinite series in ascending powers of $x$:
$$f(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^2+\frac{f'''(0)}{3!}x^3+\cdots+\frac{f^{(r)}(0)}{r!}x^r+\cdots$$
$$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots, \; x\in\mathbb{R}$$
$$\frac1{1-x}=1+x+x^2+x^3+\cdots, \; |x|<1$$
$$\sqrt{1+x}=1+\frac x2-\frac{x^2}8+\frac{x^3}{16}-\cdots, \; |x|<1$$
The restriction $|x|<1$ (or similar) on the second and third series reflects that the underlying function has a singularity or isn't real-valued outside that range; $e^x$, by contrast, is well-behaved for every real $x$, so its series converges everywhere.
$f(x)=\ln(1+x)$, so $f(0)=\ln1=0$.
$f'(x)=(1+x)^{-1}$, so $f'(0)=1$.
$f''(x)=-(1+x)^{-2}$, so $f''(0)=-1$.
$f'''(x)=2(1+x)^{-3}$, so $f'''(0)=2$.
$f^{(4)}(x)=-6(1+x)^{-4}$, so $f^{(4)}(0)=-6$.
Substituting into the Maclaurin formula: $\ln(1+x)=0+1\cdot x+\dfrac{-1}{2!}x^2+\dfrac{2}{3!}x^3+\dfrac{-6}{4!}x^4+\cdots=x-\dfrac{x^2}2+\dfrac{x^3}3-\dfrac{x^4}4+\cdots$
Not every function has a Maclaurin series: it requires $f(0),f'(0),f''(0),\ldots$ to all exist and be finite. For example $f(x)=\ln x$ fails immediately, since $f(0)=\ln0$ is undefined — there is no Maclaurin expansion of $\ln x$ itself (though $\ln(1+x)$, expanded around $x=0$, works fine, as above).
Exam-style questions
Question 1 7 marks
Find the Maclaurin series for $f(x)=e^{2x}\sin x$ up to and including the term in $x^3$.
$f(0)=1\times0=0$. $f'(x)=2e^{2x}\sin x+e^{2x}\cos x$, so $f'(0)=0+1=1$. (M1, A1)
$f''(x)=4e^{2x}\sin x+2e^{2x}\cos x+2e^{2x}\cos x-e^{2x}\sin x=3e^{2x}\sin x+4e^{2x}\cos x$, so $f''(0)=0+4=4$. (M1, A1)
$f'''(x)=6e^{2x}\sin x+3e^{2x}\cos x+8e^{2x}\cos x-4e^{2x}\sin x=2e^{2x}\sin x+11e^{2x}\cos x$, so $f'''(0)=0+11=11$. (M1)
$f(x)=0+1\cdot x+\dfrac4{2!}x^2+\dfrac{11}{3!}x^3+\cdots=x+2x^2+\dfrac{11}6x^3+\cdots$ (A1)
Question 2 7 marks
Find the Maclaurin series for $f(x)=\ln(1-2x)$ up to and including the term in $x^3$.
$f(0)=\ln1=0$ (B1)
$f'(x)=\dfrac{-2}{1-2x}$, so $f'(0)=-2$ (M1, A1)
$f''(x)=\dfrac{-4}{(1-2x)^2}$, so $f''(0)=-4$ (M1, A1)
$f'''(x)=\dfrac{-16}{(1-2x)^3}$, so $f'''(0)=-16$ (A1)
$f(x)=0+(-2)x+\dfrac{-4}{2!}x^2+\dfrac{-16}{3!}x^3+\cdots=-2x-2x^2-\dfrac83x^3+\cdots$ (A1)