Last week, I covered Binary Logarithm. Here is the magic number that we use in logarithm a lot as well, except in this time, it is at the base of ‘e’, instead of the 2, which we call this natural logarithm. It is helpful in my opinion to know and understand the concept of number ‘e’ and natural logarithm to solve problems to be a computer science industry person. The number ‘e’ is often called Euler’s number these days. ‘e’ is just another form of constants like the ‘π’. Well, why is ‘e’ so important? To answer that in a sentence, it represents the natural growth (or decay or anything that does similar) in our life, . It can be used to estimate the growth/decay in our life.
John Napier discovered the logarithm in 1618 but did not define any natural constant for it. The discovery of the constant itself is credited to Jacob Bernoulli in 1683, who attempted to find the value of the following expression (which is in fact e):
Leonhard Euler later introduced the letter ‘e’ as the base for natural logarithms and used it for the next few years.
In order to understand Euler’s number, you need to understand what exponential growth is. When you think of exponential growth, you are probably thinking “growing fast”. Let me start by giving some examples of exponential growth, as we all know grows fast. However, probably grows faster. They all grow fast. Following equation came as a result that they all grow fast,
If we punch in numbers from to , we have,
You can see the number slowly moves closer to 2.71. We can modify above equation in this fashion:
Now let’s calculate this from to ,
We can see this is moving much faster and similarly reaches closer and closer to 2.71. People have gone through these numbers and gone up to 12,884,901,000 decimal places which are ridiculously crazy given that the number goes to infinity.
Below 2 are probably the most common real life usage you will find that heavily uses this magic number.
Let’s talk about the 2 applications I listed above.
Let’s say P = where t = 0 represents the population in the year 2000. What is the expected population in the year 2015? To find the population in the year 2015, we need to let t = 15. P = = which is around 299,714 people. Let’s tweak the problem a little bit. What if we wanted to know the time when the population reaches 400,000? 400,000 = given that rate of 1.2% growth, we have time taking roughly 39 years then. Let’s take a look at another population example, A scientist starts with 100 bacteria in an experiment. After 5 days, she discovers that the population has grown to 350. Let’s determine the equation for this bacteria population growth. First, we know with some constant with 5 days it grew from 100 to 350. Applying this to the function representation, 350 = then if we calculate for the constant, c, we get 0.25055. So now equation for the growth given this layout becomes . With this equation, we can apply this to estimate future growth such as what is population going to be after 30 days? and so on.
Probably the most common example for the exponential growth is in the investment. What is your interest you would get given rate and the frequency (number)?
would be the equation where,
Let’s say bank offers you 100% of interest per year with one dollar in your bank account. Awesome deal! What’s the equation to calculate the return? which is equal to $2. Now, what ‘if’ bank offered interest every 6 months? . The rate is 1/2 as its 2 times a year and frequency would be 2 in one year which is $2.25. So, we actually have the higher number than $2. That’s somewhat exciting. What if we make it more frequent, say every month? The equation becomes which is like $2.61. Woohoo, it’s growing!! Now, let’s make it more frequent, like every day. What’s the equation? It’s which is like $2.71 and it didn’t jump a lot this time, like 10 cents as opposed to the big jump in the beginning. If we kept on going to even smaller frequency, you will notice it just stays as $2.71 as this number is what we say ‘e’, natural growth.
Here we have a slightly more realistic example:
An investment of $500 is made in a 6-year condition that earns 4% annual interest that is compounded monthly. How much is the bank account worth at the end of the 6-year term
Well, this is easy since we had a similar example above, let’s just put the numbers into the equation above: . We then get where 0.045 is just same as 4%. So if we calculate this, we get that the account will be worth $654.65 at the end of the 6-year term.