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.

f\text{ }:\text{ }n \to (1+100\%)n = 2n

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.

f\text{ }:\text{ }n \to (1+50\%)(1+50\%)n = (1.5)(1.5)n = 2.25n

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:

f\text{ }:\text{ }n \to (1+\frac{100}{12}\%)^{12}n = 1.083^{12}n = 2.613n

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?

f\text{ }:\text{ }n \to (1+\frac{100}{365}\%)^{365}n = 1.00273^{365}n = 2.714n

Or why not every second of the year?

f\text{ }:\text{ }n \to (1+\frac{100}{31557600}\%)^{31557600}n = 1,0000000317^{31557600}n = 2.7182n

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:

e = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n

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:

m = \frac{\Delta y}{\Delta x}

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

Here,

g(x) = m(x)x + c(x)

Where,

\begin{array}{rcl}m(x)&=&\frac{f(x+h)-f(x)}{h}\\c(x)&=&f(x)-m(x)x\end{array}

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:

\begin{array}{rcl}m(x)&=&\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\\&=&\lim_{h\to0}\frac{a^{(x+h)}-a^x}{h}\\&=&\lim_{h\to0}\frac{a^xa^h-a^x}{h}\\&=&\lim_{h\to0}\frac{a^x(a^h-1)}{h}\end{array}

The result is:

m(x)=a^x\lim_{h\to0}\frac{a^h-1}{h}

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.:

1=\lim_{h\to0}\frac{a^h-1}{h}

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

\begin{array}{rcl}1&=&\frac{a^h-1}{h}\\h&=&a^h-1\\1+h&=&a^h\\(1+h)^{\frac{1}{h}}&=&a\end{array}

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

a(h)=\lim_{h\to0}(1+h)^{\frac{1}{h}}

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}.

a(n)=\lim_{n\to\infty}(1+\frac{1}{n})^{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!?! 🙂

One Response to “ e – like everywhere ”

Leave a Reply

*
*