Evaluate the following function using as many significant figures as required to get a final result of 4 digits accuracy

I need to evaluate $$ f_5(0.2) = 5! \left[ e^{0.2} - \left( 1 + (0.2) +\frac{(0.2)^2}{2!}+\frac{(0.2)^3}{3!} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right] $$ using as many as required significant figures as necessary to obtain 4 decimal places accuracy in the final result.

So, I know how to do the required calculations, but I don´t know how justify the initial significant figures required to get the desired result.

I know that inside squared brackets I have the difference of between $e^{0.2}$ and an approximation $(e^{0.2})^*$, so as expected their difference will near to zero and some cancellation will occurs.

I use 12 decimal figures accuracy with rounding and I get

\begin{eqnarray*} f_5(0.2) &=& 5! \left[ e^{0.2} - \left( 1 + (0.2) +\frac{(0.2)^2}{2!}+\frac{(0.2)^3}{3!} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.12\times10^{1} +\frac{(0.2)^2}{2!}+\frac{(0.2)^3}{3!} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122\times10^{1} + \frac{(0.2)^3}{3!} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122\times10^{1} + 0.133333333333\times10^{-2} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122133333333\times10^{1} + \frac{(0.2)^4}{4!} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122133333333\times10^{1} + 0.666666666667\times10^{-4} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122140000000\times10^{1} +\frac{(0.2)^5}{5!} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - \left( 0.122140000000\times10^{1} + 0.266666666667\times10^{-5} \right) \right]\\ &\approx& 5! \left[ e^{0.2} - 0.122140266667\times10^{1} \right]\\ &\approx& 120 \left[ 0.122140275816\times10^{1} - 0.122140266667\times10^{1} \right]\\ &\approx& 120 \left[ 0.914900000000\times10^{-7} \right]\\ &\approx& 0.109700000000\times10^{-4}\\ \end{eqnarray*} Assuming the fact that $f_5(0.2)\approx 0.0000109792...$ is the "correct" result using Wolfram alpha I think that using 12 significant figures is the right answer.

So, my questions are:

  1. Is really 12 significant figures the right answer?
  2. If yes, how can I justify that fact?

Thanks.

NOTE1: I can´t use an alternate formula for the calculation, so no re-expression is allow.

NOTE2: Please note the fact that its a numerical methods/analysis problem, so I need to warranty/demostrate that if a I use $m$ significant figures, using rounding in each step then I will get $f_5(0.2)$ with 4 decimal places accuracy.


You have shown that using 12 digits does get you enough accuracy, but you can get away with less.

Hint: Using Taylor series, you have $e^x = \displaystyle\sum_{n=0}^{\infty}\dfrac{x^n}{n!} = 1+x+\dfrac{x^2}{2!}+\dfrac{x^3}{3!}+\dfrac{x^4}{4!}+\dfrac{x^5}{5!}+\sum_{n=6}^{\infty}\dfrac{x^n}{n!}$.

Therefore, $f_5(x) = 5!\displaystyle\sum_{n=6}^{\infty}\dfrac{x^n}{n!}$, and thus, $f_5(0.2) = 5!\displaystyle\sum_{n=6}^{\infty}\dfrac{(0.2)^n}{n!}$.

If you truncate that sum at $n = m$, then the remaining terms sum to at most $5!\displaystyle\sum_{n=m+1}^{\infty}\dfrac{(0.2)^n}{n!} \le 5!\displaystyle\sum_{n=m+1}^{\infty}\dfrac{(0.2)^n}{m!} = \dfrac{5!}{m!} \cdot \dfrac{(0.2)^{m+1}}{1-0.2}$.

Now, how big does $m$ need to be to ensure that this gets you 4 sig figs of accuracy?