Taylor's Theorem
Suppose we're working with a function $f(x)$ that is continuous and
has $n+1$ continuous derivatives on an interval about $x=0$. We can
approximate $f$ near $0$ by a polynomial $P_n(x)$ of degree $n$:
 For $n=0$, the best constant approximation near $0$ is
\[P_0(x)=f(0)\]
which matches $f$ at $0$.
 For $n=1$, the best linear approximation near $0$ is
\[P_1(x)=f(0)+f'(0)x.\]
Note that $P_1$ matches $f$ at $0$ and $P_1'$ matches $f'$ at $0$.
 For $n=2$, the best quadratic approximation near $0$ is
\[P_2(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^2.\]
Note that $P_2$, $P_2'$, and $P_2''$ match $f$, $f'$, and $f''$,
respectively, at $0$.
Continuing this process,
\[P_n(x)=f(0)+f'(0)x+\frac{f''(x)}{2!}x^2+\ldots
+\frac{f^{(n)}(0)}{n!}x^n.\]
This is the Taylor polynomial of degree $n$ about $0$ (also called the
Maclaurin series of degree $n$). More generally, if $f$ has $n+1$
continuous derivatives at $x=a$, the Taylor series of degree $n$ about $a$ is
\[\sum_{k=0}^n
\frac{f^{(k)}(a)}{k!}(xa)^k=f(a)+f'(a)(xa)+\frac{f''(a)}{2!}(xa)^2+\ldots
+ \frac{f^{(n)}(a)}{n!}(xa)^n.\]
This formula approximates $f(x)$ near $a$. Taylor's Theorem gives
bounds for the error in this approximation:
Taylor's Theorem
Suppose $f$ has $n+1$ continuous derivatives on an open interval
containing $a$. Then for each $x$ in the interval,
\[f(x)=\left[\sum_{k=0}^n
\frac{f^{(k)}(a)}{k!}(xa)^k\right]+R_{n+1}(x)\]
where the error term $R_{n+1}(x)$ satisfies $\displaystyle
R_{n+1}(x)=\frac{f^{(n+1)}(c)}{(n+1)!}(xa)^{n+1}$ for some $c$
between $a$ and $x$.
This form for the error $R_{n+1}(x)$, derived in 1797 by Joseph
Lagrange, is called the Lagrange formula for the remainder. The
infinite Taylor series converges to $f$,
\[f(x)=\sum_{k=0}^{\infty}\frac{f^{(k)}(a)}{k!}(xa)^k,\]
if and only if $\displaystyle \lim_{n\to\infty} R_n(x)=0$.
Examples of Taylor Series about $0$
 For $f(x)=e^x$,
\[f^{(k)}(x)=e^x \quad\Longrightarrow\quad f^{(k)}(0)=1.\]
So
\begin{eqnarray*}
e^x&=&1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\ldots\\
&=&\sum_{k=0}^{\infty}\frac{x^k}{k!}
\end{eqnarray*}
which converges for all $x$ since $\displaystyle\lim_{n\to\infty}
R_n(x)=\lim_{n\to\infty} \frac{e^cx^{(n+1)}}{(n+1)!}=0$ for all $c$
between $0$ and $x$.
 For $f(x)=\ln (1+x)$,
\begin{eqnarray*}
\left.\begin{array}{l}
f(x)=\ln(1+x)\\
f'(x)=\frac{1}{1+x}\\
f''(x)=\frac{1}{(1+x)^2}\\
f'''(x)=\frac{2}{(1+x)^3}\\
f^{(4)}(x)=\frac{3\cdot 2}{(1+x)^4}\\
\vdots
\end{array}\right\}\qquad\Longrightarrow\qquad
\left\{ \begin{array}{l}
f(0)=0\\
f'(0)=1\\
f''(0)=1\\
f'''(0)=2\\
f^{(4)}(x)=6\\
\vdots
\end{array} \right.
\end{eqnarray*}
So
\begin{eqnarray*}
\ln (1+x)&=&x\frac{x^2}{2}+\frac{x^3}{3}\frac{x^4}{4}+\ldots\\
&=&\sum_{k=0}^\infty (1)^k\frac{x^{k+1}}{k+1}
\end{eqnarray*}
which converges only for $1
The Taylor Series in $(xa)$ is the unique power series in
$(xa)$ converging to $f(x)$ on an interval containing $a$. For this
reason,
 By Example 1,
\[e^{2x}=12x+2x^2\frac{4}{3}x^3+\ldots\]
where we have substituted $2x$ for $x$.
 By Example 2, since $\displaystyle \frac{d}{dx}[\ln
(1+x)]=\frac{1}{1+x}$, we can differentiate the Taylor series for $\ln
(1+x)$ to obtain
\[\frac{1}{1+x}=1x+x^2x^3+\ldots.\]
Substituting $x$ for $x$,
\[\frac{1}{1x}=1+x+x^2+x^3+\ldots.\]
In the Exploration, compare the graphs of various functions with their
first through fourth degree Taylor polynomials.
Exploration
Key Concepts
Taylor's Theorem
Suppose $f$ has $n+1$ continuous derivatives on an open interval containing $a$.
Then for each $x$ in the interval,
\[f(x) = \left[\sum_{k=0}^n \frac{f^{(k)}(a)}{k!} (xa)^k\right]+ R_{n+1}(x)\]
where the error term $R_{n+1}(x)$ satisfies $R_{n+1}(x) =
\left[\frac{f^{(n+1)}(c)}{(n+1)!}\right] (xa)^{n+1}$ for some $c$ between $a$ and $x$.
