next up previous
Next: Finding when Power Series Up: Series and Function Approximation Previous: Geometric Series

Taylor's Theorem

There are three major meanings for the derivative f'(a):

1.
instantaneous rate of change of f at a
2.
the slope of the tangent line to y=f(x) at (a,f(a))
3.
means to get the best linear approximation to a function f near aThis best has a particular meaning: the function

t(x)=f(a)+f'(a)(x-a)

gives an approximation to f(x) such that

\begin{displaymath}\lim_{x\to a} \frac{f(x)-(f(a)+f'(a)(x-a))}{x-a} = 0\end{displaymath}

Thus the error in using the tangent line as an approximation is (asymptotically) much smaller than the distance away from a where you are trying to use it.

This view of the derivative as giving the best approximation becomes the view which generalizes to higher dimensions. It also suggests a generalization which gives a reason for finding derivatives of higher order: perhaps using a second derivative we can get a best quadratic approximation, using a third derivative we can get a best cubic approximation, ..., using derivatives up to the nth we can get a best nth degree polynomial approximating f.

The best linear approximation is gotten by matching both t(a) with f(a) and t'(a) with f'(a).

Life will get somewhat simpler if we restrict to the specific case where we are looking for approximations near a=0.

Consider a polynomial

p(x) =a0 + a1 x + a2 x2 + a3 x3 +...+an xn

then

\begin{eqnarray*}p'(x)& =& a_1 + 2a_2 x + 3 a_3 x^2 + ... n a_n x^{n-1}\\
p''(x...
... 3\cdot 4\cdot 5 x^2 + ... (n-2)(n-1)n a_n x^{n-3}\\
\mbox{etc.}\end{eqnarray*}


This tells us that p'(0)=1! a1, p''(0)= 2! a2, p'''(0)=3! a3, and in general p(n)(0)=n!an (that's the nth derivative of p evaluated at 0).

This suggests that if we want the first n derivatives of p(x) at 0 to match the first n derivatives of f(x) at 0, we should let

\begin{displaymath}a_k = \frac{f^{(k)}(0)}{k!}\end{displaymath}

for k=1 to n and let a0=f(0). This gives the nth degree Taylor Polynomial for f.

Definition 3.1   The nth degree Taylor Polynomial (expanded around 0) for f is

\begin{displaymath}p_n(x) = f(0) + f'(0)x + \frac{f''(0)}{2!} x^2 + ... + \frac{f^{(n)}(0)}{n!} x^n.\end{displaymath}

Taylor's theorem then tells us that if f has enough derivatives (typically we ask for n+1 continuous derivatives near 0) then the error involved in using pn(x) instead of f(x) is asymptotically small even compared to xn. (note that we are working near x=0, so xn is much smaller than x).

Lagrange gave a proof for an approximate form of the error which is easy to remember since it looks rather a lot like the next term:

Theorem 3.1   If f is n+1 times continuously differentiable on an interval containing both x and 0, then

\begin{displaymath}f(x)-p_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}x^n\end{displaymath}

for some c between x and 0.

As with most Mean Value Theorem arguments this involves constructing a rather artificial looking function to which we apply the MVT to get the desired result.

An integral form will give Taylor's Theorem with an exact value for the error:

Theorem 3.2   If f is n+1 times continuously differentiable, then

\begin{displaymath}f(x)-p_n(x) = \int_0^x (x-t)^n \frac{f^{(n+1)}(t)}{n!} dt.\end{displaymath}

PROOF:

We use induction and integration by parts: If n=0 this says

\begin{displaymath}f(x)-f(0)=\int_0^x f'(t)dt\end{displaymath}

which is just the Fundamental Theorem of Integral Calculus.

If we assume that

\begin{displaymath}f(x)-p_k(x) = \int_0^x (x-t)^k \frac{f^{(k+1)}(t)}{k!} dt\end{displaymath}

then use integration by parts with u=f(k+1)(t) and $dv=\frac{(x-t)^k}{k!} dt$ we will get du=f(k+2)(t) dt and $v = -\frac{(x-t)^{k+1}}{(k+1)!}$. Thus

\begin{displaymath}f(x)-p_k(x) = -\frac{(x-t)^{k+1}}{(k+1)!} f^{(k+1)}(t)\left\v...
...\right. -
\int_0^x -\frac{(x-t)^{k+1}}{(k+1)!} f^{(k+2)}(t) dt\end{displaymath}

simplifying gives

\begin{displaymath}f(x)-p_k(x) = \frac{x^{k+1}}{(k+1)!} f^{(k+1)}(0) +
\int_0^x \frac{(x-t)^{k+1}}{(k+1)!} f^{(k+2)}(t) dt\end{displaymath}

so

\begin{displaymath}f(x)-p_{k+1}(x) = \int_0^x \frac{(x-t)^{k+1}}{(k+1)!} f^{(k+2)}(t) dt\end{displaymath}

as needed for the induction.

For cases where a general form for the derivatives of f can be found, Taylor's Theorem gives a means of getting a series representation.




Example:

A series representation for f(x)=ex is easy to obtain since

f(n)(x) = ex

for all n, so all of the derivatives at 0 are 1. This gives

\begin{displaymath}e^x =\sum_{n=0}^\infty \frac1{n!}x^n\end{displaymath}

Now for any x and any n Taylor's theorem tells us that

\begin{displaymath}e^x-p_n(x)=\frac{e^c}{(n+1)!}x^n\end{displaymath}

for some c between x and 0. If we fix x and let $n\to \infty$ this error term always goes to 0. Thus the Taylor series for ex converges to ex for every x.




Exercises: While this is the easiest example, several other functions also have Taylor series which can be found by calculating derivatives and then showing that the error term goes to 0. Try the following examples:

1.
$f(x) = \sin(x)$
2.
$f(x) = \cos(x)$
3.
$f(x) = \frac{1}{1-x}$
4.
$f(x) = \ln(1-x)$
5.
$f(x) = \cosh(x)$


next up previous
Next: Finding when Power Series Up: Series and Function Approximation Previous: Geometric Series
Larry Stout
1999-11-14