How to estimate the value of $e$.

2.1k Views Asked by At

I am currently studying how to estimate $e$. To solve this problem I use these methods discuss below:

Method 1:

We know that $e^x = 1 + \dfrac{x}{1!} + \dfrac{x}{2!}+ \cdots $

So if we consider a large $n$ we can estimate $e$ as $1 + \dfrac{1}{1!} + \dfrac{1}{2!}+ \cdots + \dfrac{1}{n!}$

Method 2:

Another way is I consider $I=\displaystyle\int_1^{2} \dfrac1x \,dx =\log_{e} 2$. Now I can compute numerically the integral $I$. So from that I estimate $e$ as $e^I = 2 \implies e= 2^\frac1I$

I believe there is many other way to estimate the value of $e$. If you know please discuss here.

7

There are 7 best solutions below

4
On BEST ANSWER

In $2004$, using series compression, Brothers proposed $$e=\sum_{n=0}^{\infty}\frac{2n+2}{(2n+1)!}$$ which converges extremely fast.

Using $10$ terms, you get $$e\approx \frac{69439789852104840011}{25545471085854720000}\approx 2.71828182845905$$ which has an error of $9 \times 10^{-22}$ while, for the same number of terms, the classical expansion would give $$e\approx \frac{9864101}{3628800}\approx2.71828180114638$$ which has an error of $2.7 \times 10^{-8}$.

Using $20$ terms for the summation gives more than $50$ accurate digits.

In the same paper, Brothers also proposed $$e=\sum_{n=0}^{\infty}\frac{3-4n^2}{(2n+1)!}$$ $$e=\sum_{n=0}^{\infty}\frac{9n^2+1}{(3n)!}$$ This last one leads to $78$ correct digits after $20$ terms.

2
On

There is another well known formula:

$$e^x =\lim_{n\to \infty} (1+\frac x n)^n$$

Just plug in a $n$ great enough for an approximation.

If $n$ is a power of two $n = 2^k$ then you can calculate it very efficiently by initializing $y := 1+x/n$ Then repeating following $k$ times: $y := y\cdot y$.

There are other limits:

$$ e = \lim_{n\to\infty} \frac{n}{\sqrt[n]{n!}}$$

Other approaches could also be found using continued fraction expansions, e.g. Eulers identity:

\begin{align} e &= [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, 1,\dots] \\ &= 2+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{4+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{6+\dotsb}}}}}}}} \end{align}

0
On

You can use the continued fraction $$ e = 2 + \cfrac{1}{\color{red}1+\cfrac{1}{\color{red}2+\cfrac{1}{\color{red}1 + \cfrac{1}{\color{red}1+\cfrac{1}{\color{red}4 + \cdots}}}}} $$ where the pattern of the red numbers goes $1,2,1,1,4,1,1,6,1,1,8,1,1,10,1\ldots$ and so on in the obvious way. Terminate it wherever you want, and you cet in some sense the best rational number approximation you can get.

While I haven't looked into it, it is entirely possible that this is equivalent to your method 1.

0
On

Using a better converging continued fraction from e.g. Wikipedia $$e = 1 + \cfrac{2}{1+\cfrac{1}{6+\cfrac{1}{10 + \cfrac{1}{14+\cfrac{1}{18 + \cfrac{1}{22+\cfrac{1}{26+\cdots}}}}}}} $$ you get the approximation $$ e \approx \frac{28245729}{10391023} $$ which has an error of $6.16\cdot 10^{-16}.$

1
On

$$ e=\lim_{n \to \infty }(1+\frac{1}{n})^n=\binom{n}{0}1^n\frac{1}{n}^0+\binom{n}{1}1^{n-1}\frac{1}{n}^1+\binom{n}{2}1^{n-2}\frac{1}{n}^2+\binom{n}{3}1^{n-3}\frac{1}{n}^3+...\\=1+n\frac{1}{n}+\frac{n(n-1)}{2}\frac{1}{n^2}+\frac{n(n-1)(n-3)}{3!}\frac{1}{n^3}+...=\\1+1+\frac{n-1}{2n}+\frac{(n-1)(n-2)}{6n^2}+\frac{(n-1)(n-2)(n-2)}{24n^3}+...$$

0
On

What about just using the Taylor series for $e^{-1}$? This gives, after a little rearrangement : $\frac{1}{e} = \sum_{n=1}^{\infty} \frac{ 2n}{(2n+1)!},$ which converges pretty fast.

0
On

$e$ is a root of the function

$$ f(x) = (\ln x) - 1 $$

whose solution we can estimate using Newton's algorithm, by picking a starting value $x_0$ and setting

$$ x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)} = x_n (2 - \ln x_n) $$

Of course, to do this, we need to be able to estimate the natural logarithm. (for computer calculation, I understand that there are clever methods to compute logarithms efficiently, and this iteration is one of the main methods for actually computing $\exp(x)$)


Another approach inspired by computer algorithms is that

$$ e^1 = (e^{1 / 2^k})^{2^k} $$

Since $1/2^k$ is very small, we can use other methods to quickly get a very good estimate for $e^{1/2^k}$. Then we square that $k$ times.