Given $e^{x}=1+x+\frac{x^2}{2!}+\frac{x^{3}}{3!}+\cdots $. Summing in the natural order, what stopping criterion should you use? Can you rearrange the series or regroup the terms in any way to get more accurate results for $x < 0$?
My attempt: I use the criterion that using $n$ terms for $n=$ any fixed number, if the Absolute error = |Approximated value of $e^{x}$ - Exact value of $e^{x}| < 10^{-6}$, then the approximated value is good enough. But I don't understand why there is a CORRECT stopping criterion, as the question seems to mean that way?
For the 2nd part, I think by summing all the negative/positive values of x separately before adding the final results together should decrease the rounding off error in MATLAB, thus we get more accurate results. I'm not sure if this is correct. Can anyone please give me some thoughts?
The Lagrange form of the remainder can give you a stopping condition. For the Taylor up to order $n$ there is a number $c\in[0,x]$ such that the remainder is (bounded by)
$$\frac{e^{c}}{(n+1)!}|x|^{n+1}\leq \frac{3^{|x|}}{(n+1)!}|x|^{n+1}$$
If $x<0$ the series is alternating. So a bound on the error can be the next term $$\frac{|x|^{n+1}}{(n+1)!}$$
This series is absolutely convergent. Therefore you can rearrange the terms and get the same sum of the series. I don't know what happens to the rate of convergence of the partial sum in this case. But it seems to be that rearranging the terms doesn't improve convergence in this case. The alternating series converges by encroaching the limit from each side with each partial sum. Changing the order means that you either will move farther away or not move close enough as in the current ordering of terms.