# example of use of Taylor’s theorem

In this entry we use Taylor’s Theorem in the following form:

###### Theorem 1 (Taylor’s Theorem: Bounding the Error).

Suppose $f$ and all its derivatives are continuous^{}. If ${T}_{n}\mathit{}\mathrm{(}x\mathrm{)}$ is the $n$-th Taylor polynomial^{} of $f\mathit{}\mathrm{(}x\mathrm{)}$ around $x\mathrm{=}a$, then the error, or the difference between the real value of $f$ and the values of ${T}_{n}\mathit{}\mathrm{(}x\mathrm{)}$ is given by:

$$|{E}_{n}(x)|=|f(x)-{T}_{n}(x)|\le \frac{M}{(n+1)!}{|x-a|}^{n+1}$$ |

where $M$ is the maximum value of ${f}^{\mathrm{(}n\mathrm{+}\mathrm{1}\mathrm{)}}$ (the $n\mathrm{+}\mathrm{1}$-th derivative of $f$) in the interval between $a$ and $x$.

###### Example 2.

Suppose we want to approximate $e$ using the Taylor polynomial of degree 4, ${T}_{4}(x)$, around $x=0$ for the function ${e}^{x}$. We know that

$${T}_{4}(x)=1+x+{x}^{2}/2+{x}^{3}/3!+{x}^{4}/4!$$ |

so we are asking how close are $e$ and ${T}_{4}(1)=1+1+1/2+1/6+1/24$. In order to use the formula in the theorem, we just need to find $M$, the maximum value of the $4$th derivative of ${e}^{x}$ between $a=0$ and $x=1$. Since ${f}^{(4)}={e}^{x}$ and ${e}^{x}$ is strictly increasing, the maximum in $(0,1)$ happens at $x=1$. Thus $M=e$ which is a number, say, less than $3$. Therefore:

$$ |

Thus the approximation has an error of less than $0.025$. Actually, if we use a calculator we obtain that the error is exactly $0.0099$. But, of course, the whole point of the theorem is not to use a calculator.

###### Example 3.

What Taylor polynomial ${T}_{n}(x)$ (what $n$) should we use to approximate $e$ within $0.0001$? As above, we will be using the Taylor polynomial ${T}_{n}(x)$ for ${e}^{x}$, evaluated at $x=1$. Thus, we want the error $$. Notice all derivatives are ${e}^{x}$ and the maximum happens at $x=1$, where ${e}^{1}=e$, so for all derivatives $$. Hence by the theorem:

$$ |

So we need $$. Try several values of $n$ until that is satisfied:

$$3/2=1.5,\mathrm{\hspace{0.25em}3}/3!=0.5,\mathrm{\hspace{0.25em}3}/4!=0.125,\mathrm{\hspace{0.25em}3}/5!=0.025,\mathrm{\hspace{0.25em}3}/6!=0.00416$$ |

$$3/7!=0.00059,3/8!=0.00007$$ |

Thus $n=7$ should work. So we just need ${T}_{7}(x)$, or add $1+1+1/2+\mathrm{\dots}+1/7!$.

Title | example of use of Taylor’s theorem |
---|---|

Canonical name | ExampleOfUseOfTaylorsTheorem |

Date of creation | 2013-03-22 15:05:51 |

Last modified on | 2013-03-22 15:05:51 |

Owner | alozano (2414) |

Last modified by | alozano (2414) |

Numerical id | 4 |

Author | alozano (2414) |

Entry type | Example |

Classification | msc 41A58 |