next up previous contents index
Next: Infinite Series Up: Differentiability Previous: (Rates of growth)   Contents   Index


Taylor's Theorem

We have so far explored the Mean Value theorem, which can be rewritten as

f (a + h) = f (a) + hf'(c)

where c is some point between a and a + h. [By writing the definition of c in this way, we have a statement that works whether h > 0 or h < 0.] We have already met the approximation

f (a + h) $\displaystyle \sim$ f (a) + hf'(a)

when we studied the Newton - Raphson method for solving an equation, and have already observed that the Mean Value Theorem provides a more accurate version of this. Now consider what happens when f is a polynomial of degree n

f (x) = a0 + a1x + a2x2 +...+ an-1xn-1 + anxn.

Note that f (0) = a0. Differentiating gives

f'(x) = a1 + 2a2x + 3a3x2...+ (n - 1)an-1xn-2 + nanxn-1,

and so f'(0) = a1. Again, we have

f''(x) = 2a2 + 3.2a3x...+ (n - 1)(n - 2)an-1xn-3 + n(n - 1)anxn-2,

and f''(0) = 2a2. After the next differentiation, we get f'''(0) = 3!a3, while after k differentiations, we get, f(k)(0) = k!ak, provided k$ \le$n. Thus we can rewrite the polynomial, using its value, and the value of its derivatives at 0, as

f (x) = f (0) + f'(0)x + $\displaystyle {\frac{{f''(0)}}{{2!}}}$x2 + $\displaystyle {\frac{{f'''(0)}}{{3!}}}$x3 +...+ $\displaystyle {\frac{{f^{(n-1)}(0)}}{{(n-1)!}}}$xn-1 + $\displaystyle {\frac{{f^{(n)}(0)}}{{n!}}}$xn.

This opens up the possibility of representing more general functions than polynomials in this way, and so getting a generalisation of the Mean Value Theorem.

Theorem 5.29 (Taylors Theorem - Lagrange form of Remainder)   Let f be continuous on [a, x], and assume that each of f', f'',..., f(n+1) is defined on [a, x]. Then we can write

f (x) = Pn(x) + Rn(x),

where Pn(x), the Taylor polynomial of degree n about a, and Rn(x), the corresponding remainder, are given by
Pn(x) = f (a) + f'(a)(x - a) + $\displaystyle {\frac{{f''(a)}}{{2!}}}$(x - a)2 + $\displaystyle {\frac{{f^{(n)}(a)}}{{n!}}}$(x - a)n,  
Rn(x) = $\displaystyle {\frac{{f^{(n+1)}(c)}}{{(n+1)!}}}$(x - a)n+1,  

where c is some point between a and x.

We make no attempt to prove this, although the proof can be done with the tools we have at our disposal. Some quick comments:

We now explore the meaning and content of the theorem with a number of examples.

Example 5.30   Find the Taylor polynomial of order n about 0 for f (x) = e$ \nolimits^{x}_{}$, and write down the corresponding remainder term.

Solution. There is no difficulty here in calculating derivatives -- clearly f(k)(x) = e$ \nolimits^{x}_{}$ for all k, and so f(k)(0) = 1. Thus by Taylor's theorem,

e$\displaystyle \nolimits^{x}_{}$ = 1 + x + $\displaystyle {\frac{{x^2}}{{2!}}}$ + $\displaystyle {\frac{{x^2}}{{2!}}}$ +...$\displaystyle {\frac{{x^n}}{{n!}}}$ + $\displaystyle {\frac{{x^{n+1}}}{{(n+1)!}}}$ e$\displaystyle \nolimits^{c}_{}$

for some point c between 0 and x. In particular,

Pn(x) = 1 + x + $\displaystyle {\frac{{x^2}}{{2!}}}$ + $\displaystyle {\frac{{x^2}}{{2!}}}$ +...$\displaystyle {\frac{{x^n}}{{n!}}}$    and    Rn(x) = $\displaystyle {\frac{{x^{n+1}}}{{(n+1)!}}}$ e$\displaystyle \nolimits^{c}_{}$.


We can actually say a little more about this example if we recall that x is fixed. We have

ex = Pn(x) + Rn(x) = Pn(x) + $\displaystyle {\frac{{x^{n+1}}}{{(n+1)!}}}$ e$\displaystyle \nolimits^{c}_{}$

We show that Rn(x)$ \to$ 0 as n$ \to$$ \infty$, so that (again for fixed x), the sequence Pn(x)$ \to$ex as n$ \to$$ \infty$. If x < 0, e$ \nolimits^{c}_{}$ < 1, while if x$ \ge$1, then since c < x, we have e$ \nolimits^{c}_{}$ < e$ \nolimits^{x}_{}$. thus

$\displaystyle \left\vert\vphantom{R_n(x)}\right.$Rn(x)$\displaystyle \left.\vphantom{R_n(x)}\right\vert$ = $\displaystyle \left\vert\vphantom{\frac{x^{n+1}}{(n+1)!}\mathop\mathrm{e}\nolimits ^c}\right.$$\displaystyle {\frac{{x^{n+1}}}{{(n+1)!}}}$ e$\displaystyle \nolimits^{c}_{}$$\displaystyle \left.\vphantom{\frac{x^{n+1}}{(n+1)!}\mathop\mathrm{e}\nolimits ^c}\right\vert$$\displaystyle \le$$\displaystyle {\frac{{\vert x\vert^{n+1}}}{{(n+1)!}}}$max( e$\displaystyle \nolimits^{x}_{}$, 1)$\displaystyle \to$0    as n$ \to$$ \infty$.    

We think of the limit of the polynomial as forming a series, the Taylor series for e$ \nolimits^{x}_{}$. We study series (and then Taylor series) in Section 7.

Example 5.31   Find the Taylor polynomial of order 1 about a for f (x) = e$ \nolimits^{x}_{}$, and write down the corresponding remainder term.

Solution. Using the derivatives computed above, by Taylor's theorem,

e$\displaystyle \nolimits^{x}_{}$ = e$\displaystyle \nolimits^{a}_{}$ + (x - a) e$\displaystyle \nolimits^{a}_{}$ + $\displaystyle {\frac{{(x-a)^2}}{{2!}}}$ e$\displaystyle \nolimits^{c}_{}$

for some point c between a and x. In particular,

P1(x) = e$\displaystyle \nolimits^{a}_{}$ + (x - a) e$\displaystyle \nolimits^{a}_{}$    and    R1(x) = $\displaystyle {\frac{{(x-a)^2}}{{2!}}}$ e$\displaystyle \nolimits^{c}_{}$.


Example 5.32   Find the Maclaurin polynomial of order n > 3 about 0 for f (x) = (1 + x)3, and write down the corresponding remainder term.

Solution. We have

f (x) = (1 + x)3
f'(x) = 3(1 + x)2
f''(x) = 6(1 + x)
f'''(x) = 6
f(n)(x) = 0    if n > 3.    
        $\displaystyle \begin{array}{l}
f(0) = 1\\
f'(x) = 3\\
f''(x) = 6\\
f'''(x) = 6\\
\end{array}$

and so, by Taylor's theorem

(1 + x)3 = 1 + 3x + $\displaystyle {\frac{{6}}{{2!}}}$x2 + $\displaystyle {\frac{{6}}{{3!}}}$x3,

a result we could have got directly, but which is at least reassuring.


Example 5.33   Find the Taylor polynomial of order n about 0 for f (x) = sin x, and write down the corresponding remainder term.

Solution. There is no difficulty here in calculating derivatives -- we have

f (x) = sin x
f'(x) = cos x
f''(x) = - sin x
f'''(x) = - cos x
f(4)(x) = sin x    and so on.    
        $\displaystyle \begin{array}{l}
f(0) = 0\\
f'(x) = 1\\
f''(x) = 0\\
f'''(x) = -1.\\
\end{array}$

Thus by Taylor's theorem,

sin x = x - $\displaystyle {\frac{{x^3}}{{3!}}}$ + $\displaystyle {\frac{{x^5}}{{5!}}}$ +...+ (- 1)n+1$\displaystyle {\frac{{x^{2n+1}}}{{(2n+1)!}}}$ +...

Writing down the remainder term isn't particularly useful, but the important point is that

| R2n+1(x)|$\displaystyle \le$$\displaystyle \left\vert\vphantom{ \frac{x^{2n+3}}{(2n+3)!}}\right.$$\displaystyle {\frac{{x^{2n+3}}}{{(2n+3)!}}}$$\displaystyle \left.\vphantom{ \frac{x^{2n+3}}{(2n+3)!}}\right\vert$$\displaystyle \to$0    as n$ \to$$ \infty$.    


Exercise 5.34   Recall that cosh x = $\displaystyle {\frac{{\mathop\mathrm{e}\nolimits ^x + \mathop\mathrm{e}\nolimits ^{-x}}}{{2}}}$, and that sinh x = $\displaystyle {\frac{{\mathop\mathrm{e}\nolimits ^x - \mathop\mathrm{e}\nolimits ^{-x}}}{{2}}}$. Now check the shape of the following Taylor polynomials:


cos x = 1 - $\displaystyle {\frac{{x^2}}{{2!}}}$ + $\displaystyle {\frac{{x^4}}{{4!}}}$ +...+ (- 1)n$\displaystyle {\frac{{x^{2n}}}{{2n!}}}$ +...  
sinh x = x + $\displaystyle {\frac{{x^3}}{{3!}}}$ + $\displaystyle {\frac{{x^5}}{{5!}}}$ +...+ $\displaystyle {\frac{{x^{2n+1}}}{{(2n+1)!}}}$ +...  
cosh x = 1 + $\displaystyle {\frac{{x^2}}{{2!}}}$ + $\displaystyle {\frac{{x^4}}{{4!}}}$ +...+ $\displaystyle {\frac{{x^{2n}}}{{2n!}}}$ +...  

Example 5.35   Find the maximum error in the approximation

sin(x) $\displaystyle \sim$ x - $\displaystyle {\frac{{x^3}}{{3!}}}$

given that | x| < 1/2.

Solution. We use the Taylor polynomial for sin x of order 4 about 0, together with the corresponding remainder. Thus

sin x = x - $\displaystyle {\frac{{x^3}}{{3!}}}$ + $\displaystyle {\frac{{x^5}}{{5!}}}$cos c

for some c with 0 < c < 1/2 or -1/2 < c < 0. In any case, since | x| < 1/2,

$\displaystyle \left\vert\vphantom{ \frac{x^5}{5!}\cos c }\right.$$\displaystyle {\frac{{x^5}}{{5!}}}$cos c$\displaystyle \left.\vphantom{ \frac{x^5}{5!}\cos c }\right\vert$$\displaystyle \le$$\displaystyle \left\vert\vphantom{ \frac{x^5}{5!}}\right.$$\displaystyle {\frac{{x^5}}{{5!}}}$$\displaystyle \left.\vphantom{ \frac{x^5}{5!}}\right\vert$$\displaystyle \le$$\displaystyle \left\vert\vphantom{ \frac{1}{2^5.5!}}\right.$$\displaystyle {\frac{{1}}{{2^5.5!}}}$$\displaystyle \left.\vphantom{ \frac{1}{2^5.5!}}\right\vert$$\displaystyle \le$$\displaystyle {\frac{{1}}{{120.32}}}$.


Warning:The Taylor polynomial always exists, providing f is suitably differentiable. But it need not be useful. Consider the example

f (x) = $\displaystyle \left\{\vphantom{\begin{array}{ll}
\exp(-1/x^2)&\mbox{if $x > 0$;}\\
0&\mbox{if $x \le 0$.}
\end{array}}\right.$$\displaystyle \begin{array}{ll}
\exp(-1/x^2)&\mbox{if $x > 0$;}\\
0&\mbox{if $x \le 0$.}
\end{array}$

The interest in f is at 0; it is well behaved everywhere else. It turns out that

f (0) = f'(0) = f''(0) =...= f(n)(0) =...= 0.

So the Taylor polynomial of degree n for f about 0 is Pn(x) = 0 + 0x + 0x2 +...+ 0.xn = 0, and so for every n, Rn(x) = f (x). Clearly in this case, Pn tells us nothing useful about the function.


Example 5.36   Find the Taylor polynomial of order n about 0 for f (x) = (1 + x)$\scriptstyle \alpha$, and note that this gives a derivation of the binomial theorem. In fact, the remainder | Rn(x)|$ \to$ 0 as n$ \to$$ \infty$, provided | x| < 1.

Solution. There is again no difficulty here in calculating derivatives -- we have

f (x) = (1 + x)$\scriptstyle \alpha$
f'(x) = $\displaystyle \alpha$(1 + x)$\scriptstyle \alpha$-1
f''(x) = $\displaystyle \alpha$($\displaystyle \alpha$ - 1)(1 + x)$\scriptstyle \alpha$-2
f'''(x) = $\displaystyle \alpha$($\displaystyle \alpha$ - 1)($\displaystyle \alpha$ - 2)(1 + x)$\scriptstyle \alpha$-3
    and in general    
f(n)(x) = $\displaystyle \alpha$($\displaystyle \alpha$ - 1)...($\displaystyle \alpha$ - n + 1)(1 + x)$\scriptstyle \alpha$-n
        $\displaystyle \begin{array}{l}
f(0) = 1\\
f'(x) = \alpha\\
f''(x) = \alp...
...ad\text{}\quad \\
f^{(n)} = \alpha(\alpha-1)\ldots(\alpha-n+1).
\end{array}$

Thus by Taylor's theorem,

(1 + x)$\scriptstyle \alpha$ = 1 + $\displaystyle \alpha$x - $\displaystyle {\frac{{\alpha(\alpha-1)}}{{2!}}}$x2 + $\displaystyle {\frac{{\alpha(\alpha-1)(\alpha-2)}}{{3!}}}$x3 +    
  ...+ $\displaystyle {\frac{{\alpha(\alpha-1)\ldots(\alpha-n+1)}}{{n!}}}$xn +....    

The remainder is not hard to deal with, but we omit the proof; in fact | Rn(x)|$ \to$ 0 when n$ \to$$ \infty$.


Note also that if $ \alpha$ > 0 is an integer, say $ \alpha$ = n then | Rn(x)| = 0 and f (x) = Pn(x). This is another way to get the Binomial theorem described in Section 1.8.


next up previous contents index
Next: Infinite Series Up: Differentiability Previous: (Rates of growth)   Contents   Index
Ian Craw 2002-01-07