1

The Problem:

If we consider approximating $e^x$ on $[-1,1]$, the Taylor Theorem for $x_0 =0$ says we can represent $e^x$ using a polynomial with a (known) remainder:

$e^x =\{1 + x + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \dots +\frac{1}{n!}x^n \} + \frac{1}{(n+1)!}x^{n+1}e^{C_x}$

Where $C_x$ is an unknown between $x $ and $0$. For simplicity, let us denote the polynomial (in curly backets) by $p_n(x)$ and the remainer (outside the curly brackets) by $R_n(x)$, such that

$e^x= p_n(x) + R_n(x)$

Suppose we want this approximation to be accurate to within $10^{-6}$ in absolute error, i.e. we want

$|e^x - p_n(x)| \leq10^{-6}$

For all $x $ on the interval $[-1,1]$.

Question:

For what value of $n$ will our accuracy condition be satisfied? How can this be done using the remainder of the approximation? What does this remainder represent?

Taylor's Thoerem:

Let $f(x)$ have $n+1$ continuous derivatives on $[a, b]$ for some $n \geq 0$, and let $x, x_0 \in [a, b]$. Then,

$f (x) = p_n(x) + R_n(x)$

for $p_n(x) = \sum_{k=0}^n \frac{(x -x_0)^k}{k!} f^{(k)}(x_0)$

There exists a point $\zeta _x $ between $x$ and $x_0$ such that

$R_n(x) = \frac{(x -x_0)^{n+1}}{(n+1)!} f^{(n+1)}(\zeta_x)$

Sharky
  • 93

1 Answers1

2

You have written everything down except for the last step: With $x=1$, we have $C_x\le1$. The most pessimistic case, the largest possible error, would be found at $C_x=1$ (more realistically, $C_x$ is located around the midpoint $\frac12$). With that you have to solve $$ \frac{e}{(n+1)!}<10^{-6} $$ for $n$. Either by computing a table or by using the Sterling formula for approximations.

Lutz Lehmann
  • 126,666
  • Thank you, I see that. Though, will it always be as straightforward to inspect the function ( to be approximated on its interval) and determine which the most pessimistic case will be? Is there a more systematic approach for more complex functions? – Sharky Apr 17 '16 at 12:17
  • At least for the derivative you can not do better that to take the maximum over the segment from $x_0$ to $x$. And for uniform error bounds as in this case, you have to take the overall most pessimistic case. You might get better error bounds by including higher order derivatives in the error term, i.e., split the Taylor formula not at the remainder term, but more in the middle. For instance, take the degree $n+2$ error term and combine with the degree $n+1$ term to get an error bound for the degree $n$ Taylor polynomial. – Lutz Lehmann Apr 17 '16 at 12:32