# e - like everywhere

Everybody doing any kind of geometry, calculus or higher algebra will have stumbled over this number:

2.71828182845904523536028747135266249775724709369995...

More commonly it is known as $e$ , Euler's number. You may wonder, where does this number come from and why is it so important? Well... If you are like me that is: waiting for simulations to finish, having 20 minutes of spare time on your hands, and having a tenacious drive to understand things. So come along as I explain two different ways that result explain where this beautiful number comes from.

## Compound interest

Rather than diving into derivatives and integrals, let me begin with an explanation that may be more comprehensible and easily relates to reality: compound interest. Interest is a percentage by which the amount of your savings in a bank increase. Imagine you are lucky and receive an interest offer of 100% per annum. This effectively means that your savings will double after every year.

Now, what if the bank offers you 50%, but after 6 months. Would you take the deal? Quick napkin-maths will show that you should definitely take that deal. In fact, you would not only double your savings, but receive 1.25 times what you already have.

Since no bank in the world would offer such extreme interest rates, let's carry on with this slightly ludicrous thought experiment, Let's decrease the interest rate to $\tiny{\frac{1}{12}}$ , which is paid every month. The formula would now become quite long, yet the result is an increase by 1.613. Rather than writing out the full chain of products I will simply raise the brackets to the power of 12:

As you can see, despite reducing the interest rate, if the payout frequency is inversely proportional, you will always receive a tiny bit more. So you might think: so why not pay out every day?

Or why not every second of the year?

Hmmm... You may think that the multiplication is stagnating, and you are right: it is approaching $e$ :

In fact, this method is how to calculate $e$ , assuming we increase the exponent (or in our example, the interest rate) to infinity:

## Difference quotient

Now, let's delve into the mathematical derivation of $e$ and appreciate its awesome properties. To begin, let us consider any exponential function, i.e. $f(x) = a^x$ . If we substitute a number for $a$ , that is greater than 1, then we obtain a constantly increasing value for any given $x$ . In fact, if we were to try and plot the value of a the gradient for $f(x)$ at any point, we would find that it looks awfully similar to the original function:

In the figure above, six exponential functions are plotted on the left, and their derivatives are sketched on the right. As you can see, they do look awfully similar, right? But let's remind ourselves, how these derivates, or gradients, are estimated. This is done by the difference quotient, i.e. the gradient is equals to the ration of the change in $y$ over the change in $x$ :

The change in $y$ can be approximated by evaluating $x$  at two locations, as shown in the figure below.

Here,

Where,

As you can see, this approximation of the gradient at $x$ is quite bad since the chosen parameter $h$ is way too big. So let's make it smaller and smaller. In fact, let's make it approach zero and re-evaluate the equation:

The result is:

Which actually contains the original function $a^x$ , but scaled by some parameter $\lim_{h\to0}\frac{a^h-1}{h}$ . Now the equation is, is there a value for $h$ , which would make this scaling factor equal one? I.e.:

Well, let's find out and re-equate this:

So now we can define $a$ as a function of $h$ as:

Here, we will divide the exponent by a number that is approaching zero, and dividing by zero is a big no-no in mathematics. So let's substitute  $\frac{1}{n}$ for $h$ and rather than reducing $h\to0$ , let's increase $n\to\infty$ . You will see, that this has exactly the same mathematical effect, since  $\lim_{h\to0}h = \lim_{n\to\infty}\frac{1}{n}$ .

And look at that! We have found the same equation for $e$ that we did in the compound interest one. Therefore, the amazing property of $e$ is, that weather you differentiate it or integrate it, $e$  always results in itself! How cool is that!?! 🙂

Very cool!