An amazing approximation to e
Categories: exponentials problems
Level:
Euler's number, e, is an important number in mathematics. It is an irrational number, so it cannot be expressed exactly as a fraction or decimal number. But there are many ways to calculate its approximate value, as accurately as you like.
In this article, we will look at a clever (and amazingly accurate) approximation that emerged in response to a simple mathematical challenge.
The challenge
The challenge appeared in 2004 on Eric S. Friedman's personal website, Math Magic. The site is no longer active, but an archive can be found on github.
The problem was stated as:
This month's problem is to approximate famous mathematical constants using only the first k digits (each used exactly once) and the mathematical symbols + – × / ( ) and ^. For each k, what is the best approximation you can get to the following constants?
The problem listed several mathematical constants. In a little more detail:
- You must use the first k digits (1 to k) exactly once each.
- They can be used as single-digit numbers (eg 1).
- Or they can also be used to make multi-digit numbers (eg 2 and 3 can be used to make twenty-three).
- Ot they can also be used as decimals (eg 4.5 can be used to make four and a half).
- The numbers can be combined using the four basic arithmetic operators, and also exponentiation (eg 7^3 is seven cubed).
- Brackets can also be used.
- And that is all you are allowed to do.
Mathematician Richard Sabey turned his attention to Euler's constant, e. To clarify the challenge, let's consider some small values of k. If k is 2, we must create a formula that only uses the digits 1 and 2. The equation that is closest to e is:

We know, of course, that e is approximately 2.718281828459045, so 3 isn't a particularly good approximation. We can do better if we k is 3, so we can use the digits 1 to 3. Here is one possibility:

We have used .1 rather than 0.1 to avoid the digit 0 (and similarly for .2). This approximation is somewhat better, and we might expect the approximations to get even better as we allow more digits.
Sabey's approximation using 9 digits
Sabey came up with a very interesting approximation that gives an extremely accurate value. Here is the approximation:

How do we know this value is close to e? The obvious answer would be to evaluate it, but that is slightly problematic. To see why, let's look at the exponent in the above expression:

This number looks innocent enough, but it is a power raised to a power, so you might imagine it could be quite large. In fact, it is far too large to write down. To get some idea of how big it is, we can express it, very approximately, as a power of 10 (we won't go through the arithmetic here):

The number on the left is 10 raised to the power of 10 raised to the power of 25. That is a one followed by ten million, million, million, million zeroes.
The term in 9 has a negative exponent, but again the exponent is huge in magnitude. A negative exponent, of course, gives the reciprocal of the same term with a positive exponent. So the term is approximately:

This time, it is a decimal fraction with ten million, million, million, million zeros before the first non-zero digit. That is an extremely small number. In the formula, we add this number to 1, which gives:

Again, with the same vast number of zeros.
So we are taking a number that is extremely close to (but greater than) 1, and raising it to an extremely large power. The claim is that the two extremes cancel each other out, leaving us with a number that is approximately equal to e. In fact, it is extremely close to e.
Unfortunately, there is no practical way to prove this by direct calculation, the numbers are just too extreme. It is difficult to perform calculations on numbers that have 10^25 digits!
An alternative approach
There is another way to view the formula. First, let's name the two exponent terms. We will use a for the term based on the power of 3:

The power of 9 has a negative exponent. It will be useful to write this as the reciprocal of the positive exponential term:

So if we call the positive exponential b, the negative exponential will be 1/b:

So a is a power of 3 and b is a power of 9. It is probably worth trying to manipulate these expressions to get them into similar forms. First, let's simplify b by multiplying out the top exponent:

We can replace 9 with 3 squared:

We can then change the base of the inner exponential from 4 to 2:

Finally, we can combine the extra factor of 2 with the exponential:

This final value for b is the same as the value of a. The two exponential terms initially looked very different (deliberately, to ensure the full equation used every digit from 1 to 9), but they are actually identical in value.
How does this help?
We can now substitute a and b, derived above, into the original approximation for e:

Since we now know that a and b are equal, we can write this as:

This looks very similar to one of the standard definitions of e (covered in the article What is e?):

This expression becomes exactly equal to e in the limit as n tends to infinity. In our case, the value a isn't infinite, but it is extremely large, so we might expect the approximation to be extremely close to e. How close? We will find out next.
How accurate is this answer?
Let's take out previous approximate value for e, and call it v:

We would like to know how close v is to e. We expect it to be extremely close to e, so we will take the following approach:
- First, we will find the difference between the two values, e - v. This will be a very small number.
- Then we will find the log (base 10) of the difference. This tells us how many zeros there are after the decimal point but before the first significant digit (for example, the log of 0.0002 is -3.699, which tells us there are 3 zeros before the first non-zero).
Finding e - v takes a little bit of work. We start by taking the natural log of both sides. The RHS is raised to the power a, so we can move it outside the ln function:

We will now use the standard Maclaurin expansion of the log function:

We can apply this expansion to equation (1) above, using x = 1/a. Remember that (1) has an extra factor of a outside the ln function:

Since a is extremely large, we won't consider any terms beyond the 1/2a term. Next, it will be useful to find the ratio of v to e:

We used the expansion of ln(v)and the fact that ln(e) is 1. Next, we eliminate the ln function by taking the exponential of both sides:

Now we will use the Maclaurin expansion of the exponential function. Again, we will discard all terms beyond 1/a because a is so large:

We can rearrange this expression to find e - v. This is the difference between the approximation and the true value e. We will call this value δ:

This is clearly a very small number, but to get some idea of how small it is, we will find its logarithm to base 10:

The first two terms are vanishingly small compared to the final term, so we will discard them. Bringing the power outside the log function gives:

As we noted above, this expression tells us the order of magnitude of the difference between e and v. Since log(3) is roughly equal to 1, we will ignore it. 2^85 is approximately 10^25. So:

This means that δ is a decimal fraction so small that there are 10^25 zeros after the decimal point before the first non-zero digit. So Richard Sabey's approximation is accurate to around ten million, million, million, million decimal places.
Remember, though, that there is no practical way to evaluate an expression to such a huge number of places. But if we could, it would be incredibly accurate.
Related articles
Join the GraphicMaths Newsletter
Sign up using this form to receive an email when new content is added to the graphpicmaths or pythoninformer websites:
Popular tags
adder adjacency matrix alu and gate angle answers area argand diagram binary maths cantor cardioid cartesian equation chain rule chord circle cofactor combinations complex modulus complex numbers complex polygon complex power complex root cosh cosine cosine rule countable cpu cube decagon demorgans law derivative determinant diagonal differential equation directrix dodecagon e eigenvalue eigenvector einstein ellipse equilateral triangle erf function euclid euler eulers formula eulers identity exercises exponent exponential exterior angle first principles flip-flop focus gabriels horn galileo gamma function gaussian distribution gradient graph hendecagon heptagon heron hexagon hilbert horizontal hyperbola hyperbolic function hyperbolic functions infinity integration integration by parts integration by substitution interior angle inverse function inverse hyperbolic function inverse matrix irrational irrational number irregular polygon isomorphic graph isosceles trapezium isosceles triangle kite koch curve l system lhopitals rule limit line integral locus logarithm maclaurin series major axis matrix matrix algebra mean minor axis n choose r nand gate net newton raphson method nonagon nor gate normal normal distribution not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutation matrix permutations pi pi function polar coordinates polynomial power probability probability distribution product rule proof pythagoras proof pythagorean triple quadrilateral questions quotient rule radians radius rectangle regular polygon rhombus root sech segment set set-reset flip-flop simpsons rule sine sine rule sinh slope sloping lines solving equations solving triangles special relativity speed of light square square root squeeze theorem standard curves standard deviation star polygon statistics straight line graphs surface of revolution symmetry tangent tanh transformation transformations translation trapezium triangle turtle graphics uncountable variance veridical paradox vertical volume volume of revolution xnor gate xor gate