## You are here

Homeexample of use of Taylor's theorem

## Primary tabs

# 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}(x)$ is the $n$-th Taylor polynomial of $f(x)$ around $x=a$, then the error, or the difference between the real value of $f$ and the values of $T_{n}(x)$ is given by:

$|E_{n}(x)|=|f(x)-T_{n}(x)|\leq\frac{M}{(n+1)!}|x-a|^{{n+1}}$ |

where $M$ is the maximum value of $f^{{(n+1)}}$ (the $n+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:

$|E_{4}(1)|=|f(1)-T_{4}(1)|=|e-(1+1+1/2+1/6+1/24)|\leq\frac{M}{5!}|1-0|^{5}=% \frac{M}{5!}<\frac{3}{5!}=0.025$ |

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 $|E_{n}(1)|<0.0001$. Notice all derivatives are $e^{x}$ and the maximum happens at $x=1$, where $e^{1}=e$, so for all derivatives $M<3$. Hence by the theorem:

$|E_{n}(1)|=|f(1)-T_{n}(1)|=|e-(1+1+1/2+\ldots+1/n!)|\leq\frac{M}{(n+1)!}|1-0|^% {{n+1}}=\frac{M}{(n+1)!}<\frac{3}{(n+1)!}$ |

So we need $3/(n+1)!<0.0001$. Try several values of $n$ until that is satisfied:

$3/2=1.5,\ 3/3!=0.5,\ 3/4!=0.125,\ 3/5!=0.025,\ 3/6!=0.00416$ |

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

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

## Mathematics Subject Classification

41A58*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff

## Recent Activity

new question: Prove that for any sets A, B, and C, An(BUC)=(AnB)U(AnC) by St_Louis

Apr 20

new image: information-theoretic-distributed-measurement-dds.png by rspuzio

new image: information-theoretic-distributed-measurement-4.2 by rspuzio

new image: information-theoretic-distributed-measurement-4.1 by rspuzio

new image: information-theoretic-distributed-measurement-3.2 by rspuzio

new image: information-theoretic-distributed-measurement-3.1 by rspuzio

new image: information-theoretic-distributed-measurement-2.1 by rspuzio

Apr 19

new collection: On the Information-Theoretic Structure of Distributed Measurements by rspuzio

Apr 15

new question: Prove a formula is part of the Gentzen System by LadyAnne

Mar 30

new question: A problem about Euler's totient function by mbhatia