Section 9: Taylor Series
The Taylor series for $f(x)$, centered at $a$, is $$f(a) + f'(a)(x-a) + f''(a)\frac{(x-a)^2}{2!} + f'''(a)\frac{(x-a)^3}{3!} + \ldots = \sum_{n=0}^\infty \frac{f^{(n)}(a)(x-a)^n}{n!}.$$
A Maclaurin series is simply a Taylor series centered at $a = 0$. The formula then becomes $$f(0) + f'(0)x + f''(0)\frac{x^2}{2!} + f'''(0)\frac{x^3}{3!} + \ldots = \sum_{n=0}^\infty \frac{f^{(n)}(0)x^n}{n!}.$$
If $f$ has a power series, the coefficients must be those specified by the formula in its Taylor series. Below is a list of important Maclaurin series to remember:
\begin{align*} e^x &= \sum_{n=0}^\infty \dfrac{x^n}{n!}, &-\infty < x < \infty \\ \sin{x} &= \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n+1}}{(2n+1)!}, &-\infty < x < \infty \\ \cos{x} &= \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n}}{(2n)!}, &-\infty < x < \infty \\ \arctan{x} &= \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n+1}}{2n+1}, &-1 \leq x \leq 1 \\ \ln{(1-x)} &= -\sum_{n=1}^\infty \dfrac{x^n}{n}, & -1 \leq x < 1 \\ \frac{1}{1-x} &= \sum_{n=0}^\infty x^n, &-1 < x < 1 \end{align*}
The series for $\arctan{x}$, $\ln{(1-x)}$, and $1/(1-x)$ were derived in previous sections. For $e^x$, we use the Taylor series formulas:
$f(x) = e^x, f'(x) = e^x, f''(x) = e^x$, and so on. Thus, $f(0) = f'(0) = f''(0) = \ldots = 1$. So $\sum_{n=0}^\infty \frac{f^{(n)}(0)x^n}{n!} = \sum_{n=0}^\infty \frac{x^n}{n!}$. To find the radius of convergence, apply the ratio test: the ratio is $|x|/(n+1) \to 0$ as $n \to \infty$, so the series converges everywhere.
Mini-Quiz: Do similar computations with $\sin{x}$ to derive the formula for the Maclaurin series for $\sin{x}$ given above.
Example: Once we know that $\sin{x} = \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n+1}}{(2n+1)!}$, we can simply differentiate this equation to obtain $\cos{x} = \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n}}{(2n)!}$.
Example: Let's find the Maclaurin series for $e^{-x^2}$. Instead of taking derivatives (which will involve the chain and product rules), just plug in $-x^2$ into the series for $e^x$: $$e^{-x^2} = \sum_{n=0}^\infty \dfrac{(-x^2)^n}{n!} = \sum_{n=0}^\infty \dfrac{(-1)^nx^{2n}}{n!}.$$
Mini-Quiz: Find a series for $\int_0^1 e^{-x^2}\;dx$. Compare this series to the series for $e^x$.
Taylor's Inequality: If $|f^{(N+1)}(x)| \leq M$ for $|x - a| \leq r$, then the remainder $|R_N(x)|$ is $\leq \dfrac{M}{(N+1)!}|x - a|^{N+1}$ for $|x - a| \leq r$.
This inequality can be used to show that a function is equal to its Taylor series. For example, we know the Maclaurin series for $e^x$ is $\sum_{n=0}^\infty \dfrac{x^n}{n!}$. We know that $f^{(N+1)}(x) = e^x$. On the interval $|x| < r$ (i.e., $(-r, r)$), $e^x \leq e^r$. So Taylor's inequality tells us that the remainder term is $\leq \dfrac{e^r|x|^{N+1}}{(N+1)!}$. Letting $N \to \infty$, this expression tends to 0. What this means is that the remainder term approaches 0, so $e^x$ is equal to its Maclaurin series.
Mini-Quiz: Given your computation of $\sin{x}$'s Maclaurin series above, use Taylor's theorem to show that $\sin{x}$ is equal to its Maclaurin series.
Technical Point: The term remainder is a bit misleading, and perhaps the word error should be used instead. Saying remainder is based on the intuition that Taylor series approximate a given function, which is frequently true. However, this need not be the case. It can be shown, for example, that the Maclaurin series for $e^{-1/x^2}$ is $\sum_{n=0}^\infty 0x^n = 0$, whereas $e^{-1/x^2}$ is clearly a nonzero function. It's Taylor's Inequality that lets us show that a Taylor series converges to what it "should" converge to.
These series are useful because we can use them for numerical approximations like $e^{0.1}, \sin{0.07}, \cos{-0.34}, \ln{1.12},$ etc., which are difficult to compute exactly. In Calculus I, you were able to do this using linear approximation (i.e., a tangent line approximation). You are now able to do so using higher degree approximations.
Example: Let's approximate $\ln{1.12}$ with a 3rd-order Taylor polynomial. $\ln{(1-x)} = -\sum_{n=1}^\infty \dfrac{x^n}{n}$, so the 3rd-order polynomial is $\ln{(1-x)} \approx p_3(x) = -x - x^2/2 - x^3/3$. To get $1 - x = 1.12$ requires $x = -0.12$. So $p_3(-0.12) = 0.12 - \frac{0.12^2}{2} + \frac{0.12^3}{3} = 0.113376$. Sticking $\ln{1.12}$ into a calculator yields $0.1133286853$, so this approximation is quite good.