Using $ \sum_{k=0}^{\infty}\frac{(-1)^{k}}{k!}=\frac1e$ evaluate first $3$ decimal digits of $1/e$.

165 Views Asked by At

Using the series $\displaystyle \sum_{k=0}^{\infty}\frac{(-1)^{k}}{k!}=\frac{1}{e}$, evaluate the first $3$ decimal digits of $1/e$.

Attempt. In alternating series $\displaystyle \sum_{k=0}^{\infty}(-1)^{k+1}\alpha_n$, where $\alpha_n \searrow 0$, if $\alpha$ is the sum of the series then $$|s_n-\alpha|\leq \alpha_{n+1}.$$ So, in our case we need to find $n$ such that $|s_n-1/e|<0.001$, where $\displaystyle s_n=\sum_{k=0}^{n-1}\frac{(-1)^{k}}{k!}$ and it is enough to find $n$ such that $\dfrac{1}{n!}<0.001$, so $n\geq 7$. Therefore:

$$s_7=\sum_{k=0}^{6}\frac{(-1)^{k}}{k!}=0.36805\ldots$$

so I would expect $\dfrac{1}{e}=0.368\ldots$. But: $\dfrac{1}{e}=0.36787944\ldots$.

Where am I missing something?

Thanks in advance.

5

There are 5 best solutions below

0
On

To know the first three digits in the decimal expansion of $e^{-1}$ you don't want $n$ such that $$|s_n-e^{-1}|<0.001,$$ but in stead you want $n$ such that $|s_n-e^{-1}|$ is strictly less than the part of $e^{-1}$ after the first three digits. Denoting the fractional part of a real number $x$ by $\{x\}$, this can be formally described as $$|s_n-e^{-1}|<\left|s_n-\frac{\{10^3s_n\}}{10^3}\right|,$$ so it suffices to find $n$ such that $$\frac{1}{n!}<\left|s_n-\frac{\{10^3s_n\}}{10^3}\right|.$$ As your computations show $n=7$ does not suffice; you've found that $$s_7=0.3680555...\qquad\text{ but }\qquad 0.0000555...<\frac{1}{7!}.$$ A little more work shows that $n=8$ does suffice; indeed $$s_8=0.3678571...\qquad\text{ and }\qquad 0.0001428...>\frac{1}{8!}.$$

3
On

Where am I missing something?

Um... nowhere?

$|s_7 - \frac 1e| = |0.36805.... - 0.36787944| \approx 0.00017056... < 0.001$

And $|0.368 - \frac 1e| = .00012055882855767840447622983853913..... < 0.001$

So... why do you think you are missing something?

2
On

so we know: $$S=\sum_{n=0}^\infty\frac{(-1)^n}{n!}=\frac{1}{e}$$ and we want to know this $\frac1e$. To do this we simply evaluate terms of the sequence until it is consistant to 3 decimal decimal places. $$a_0=\frac11=1$$ $$a_0+a_1=1+\frac{-1}1=0$$ $$a_0+a_1+a_2=0+\frac{1}{2}=\frac{1}{2}=0.5$$ $$a_0+a_1+a_2+a_3=\frac{1}{2}+\frac{-1}{6}=\frac{1}{3}\approx0.333$$ $$a_0...+a_4=\frac{1}{3}+\frac{1}{24}=\frac{3}{8}=0.375$$ $$a_0...+a_5=\frac{3}{8}+\frac{-1}{120}\approx0.367$$ If you continue this in the way that you did then you do indeed end up with $0.368$ which is correct to 3 decimal places, so you have missed nothing

0
On

Making the problem more general, you want to compute $p$ such that $$S_p=\sum_{k=0}^{p}\frac{(-1)^{k}}{k!}$$ such that $$\frac{1}{(p+1)!} \le 10^{-n}$$ $n$ being the number of significant decimal places you need.

If you look at this question of mine, you will see a magnificent approximation by @robjohn for the inverse of the factorial function.

Applied to your case $(a=1)$, this would give $$\color{blue}{p=\frac{n \log (100)-\log \left({2 \pi }\right)}{2 W\left(\frac{n \log (100)-\log \left({2 \pi }\right)}{2 e}\right)}-\frac 32}$$ where appears Lambert function that you can evaluate using the expansions given in the linked Wikipedia page.

For $n=3$, this would give, as a real number, $p=5.17$. So, you need to use $p=6$. Let us check : $\frac 1 {7!}=\frac{1}{5040}\approx 0.00020$ while $\frac 1 {6!}=\frac{1}{720}\approx 0.00139$.

0
On

Note $$\bigg|\sum_{k=0}^{n}\frac{(-1)^{k}}{k!}-\frac{1}{e}\bigg|=\bigg|\sum_{k=n+1}^{\infty}\frac{(-1)^{k}}{k!}\bigg|\le\sum_{k=n+1}^\infty\frac{1}{3^{k}}\le\frac{1}{2\cdot3^{n}}.$$ Let $\frac{1}{2\cdot3^{n}}<0.001$ and then $n>\frac{\ln500}{\ln 3}\approx5.65678$. Now set $n=6$ and then $$ \bigg|\sum_{k=0}^{6}\frac{(-1)^{k}}{k!}-\frac{1}{e}\bigg|<0.001. $$ In fact, it is easy to see $$ \bigg|\sum_{k=0}^{5}\frac{(-1)^{k}}{k!}-\frac{1}{e}\bigg|=0.001212774505,\bigg|\sum_{k=0}^{6}\frac{(-1)^{k}}{k!}-\frac{1}{e}\bigg|=0.0001761143841<0.001. $$ So $n=6$ is the small number such that $|s_n-\frac1e|<0.001$.