# Taylor’s Theorem

Page
Taylor’s Theorem – HMC Calculus Tutorial

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”(0)}{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!}(x-a)^k=f(a)+f'(a)(x-a)+\frac{f”(a)}{2!}(x-a)^2+\ldots + \frac{f^{(n)}(a)}{n!}(x-a)^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!}(x-a)^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)!}(x-a)^{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!}(x-a)^k,$ if and only if $\displaystyle \lim_{n\to\infty} R_n(x)=0$.

#### Examples of Taylor Series about $0$

1. 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$.