Euler's number

Mathematical constant, the base of the natural logarithm


20 May 2017 View Comments
#euler #mathematics #logarithm #exponential #growth #algorithm

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.

Graph of f(x) = e^x
Graph of f(x) = e^x

History

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,[7][8] 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.

Fundamentals

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,

  1. 2.0000000000000000000
  2. 2.2500000000000000000
  3. 2.3703703703703703704
  4. 2.4414062500000000000
  5. 2.4883200000000000000
  6. 2.5216263717421124829
  7. 2.5464996970407131139
  8. 2.5657845139503479004
  9. 2.5811747917131971820
  10. 2.5937424601000000000
  11. 2.6041990118975308782
  12. 2.6130352902246781603
  13. 2.6206008878857322211
  14. 2.6271515563008693884
  15. 2.6328787177279190470
  16. 2.6379284973665998588
  17. 2.6424143751831096203
  18. 2.6464258210976854673
  19. 2.6500343266404449073
  20. 2.6532977051444201339

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 ,

  1. 2.00000000000000000000000000000
  2. 2.50000000000000000000000000000
  3. 2.66666666666666666666666666667
  4. 2.70833333333333333333333333333
  5. 2.71666666666666666666666666667
  6. 2.71805555555555555555555555556
  7. 2.71825396825396825396825396825
  8. 2.71827876984126984126984126984
  9. 2.71828152557319223985890652557
  10. 2.71828180114638447971781305115
  11. 2.71828182619849286515953182620
  12. 2.71828182828616856394634172412
  13. 2.71828182844675900231455787011
  14. 2.71828182845822974791228759483
  15. 2.71828182845899446428546957647
  16. 2.71828182845904225905879345033
  17. 2.71828182845904507051604779585
  18. 2.71828182845904522670811748171
  19. 2.71828182845904523492875272834
  20. 2.71828182845904523533978449067

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.

Application

Below 2 are probably the most common real life usage you will find that heavily uses this magic number.

  1. Population - With larger population, faster the number will grow to populate
  2. Money/Investment - More money you have, more interest = more money

Example

Let’s talk about the 2 applications I listed above.

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

  2. 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,

  • A = the amount of money after a certain amount of time
  • P = the principle or the amount of money you start with,
  • r = the interest rate and is always represented as a decimal
  • n = number of times interest is compounded in one year
  • t = the amount of time in years.

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.

Share this post

Me

I am a passionate programmer working in Vancouver. I strongly believe in art of algorithms and together with it to write clean and efficient software to build awesome products. If you would like to connect with me, choose one from below options :) You can also send me an email at