Thoughts on the mathematical constant e

May 16th, 2010 admin Posted in Information, Tidbits, Tutorials | No Comments »

e for exponential

The mathematical constant e shows up in strange places. Moreover, its significance is not as easy to grasp as that of the other famous constant, \pi, because there is no easy physical object in whose context to imagine it. For example, \pi is the ratio of the circumference to the diameter of a circle. Yes, it is irrational, but if you can get over that mystery (or ignore it for the time being), it is straightforward to imagine what \pi is. Every circle does seem to have a certain circleness, which makes them all look the same. It is intuitively not hard to agree with the hunch that every circle has an unchanging ratio between the circumference and the diameter; and it makes sense to keep that ratio handy and give it a name.

The constant e is considerably more elusive. It appears, at first, to be a number you would not go hunting after. You just happen to stumble upon in during one of your mathematical excursions; it seems interesting enough that you then pick it up and put in in your pocket for some potential use later. After stumbling upon the same thing along other mathematical excursions, in hindsight, it does seem to be something rather useful. Something you should have gone looking for.

Jacob Bernoulli, sometime in the late 1600s, stumbled upon this constant when he was trying to calculate the maximum compound interest that can be earned on an investment by compounding continuously.

If you invest 1 dollar in an account that earns 100% annual interest, then after 1 year the value of your investment will be 2 dollars assuming the compounding (interest calculation) happens once during the year. Assuming you do not touch the money and let it grow, by the end of 2 years, the money would have doubled again and you’ll have 4 dollars in all. Now, imagine the bank decided to compound every 6 months instead of once a year. The annual interest rate remains the same, 100%. 50% is applied at the end of 6 months and another 50% is applied at the end of the year. The 1 dollar grows to 1.50 after the first 6 months. For the second half of the year 1.50 dollars grow in value. At the end of the first year, the total value in your account is 1.50 + (1.50*50%), that is, 2.25 dollars. Not bad! Just by compounding every 6 months you made 2.25 instead of 2. Now you start thinking (as, perhaps, did Jacob Bernoulli). What if the bank compounded every 3 months? What if the bank compounded every month? Every week? Every day? Every second? Every picosecond? A similar question is what Jacob Bernoulli asked himself in the late 1600s. It turns out that this calculation results in an infinite series, which when added up closes in on 2.718281…This means if your bank was really generous and compounded continuously, your 1 dollar would become 2.718281 dollars at the end of the year. Quite a swing there – between 2 and 2.71, wouldn’t you say? And this given that the interest rate is unchanged between the two scenarios. (Aside: In general, pay some attention to how often your investments are being compounded, not just to the the annual rate of return.)

That number, 2.718281…, shows up in such seemingly disparate scenarios that it may be hard to see the connection between those scenarios. I recall that the way this constant was introduced to me in school was entirely different from the discussion above. I was taught that c\cdot{e^{x}}, where c is a constant, is the only function whose derivative is equal to itself. That is, the slope of the curve is the value of the curve. Wow, I thought. That is quite a curve. I now feel that though that was correct, it may not have been the best way to introduce e; it does not say why c\cdot{e^{x}} is the only function that satisfies this property. Further, it is not explain why a function that does satisfy this property should even be of the basic form a^{x}, where a is a constant.

I decided therefore to think through two things. First, I wanted to understand why c\cdot{e^{x}} the only function whose slope at a given x is the same as its value. I wanted to approach this problem by using the knowledge of this special property, and then trying to come up with the function f(x) which would fit this requirement. Second, I wanted to tie together the two seemingly different arenas where e shows up – continuous compounding and as the base of the curve whose slope is equal to its value. There are other areas where e shows up also. For example, if the probability of winning a wager is 1 in n, and a man places n bets, then the probability that he wins at least one bet is \frac{1}{e}. This question is related closely to the hat check problem (also known as Derangements). e also shows up in Euler’s Identity. I will need to do more digging before I attempt to understand, intuitively, why e shows up in those scenarios so I may not tackle these in much depth in this article.

Why is c\cdot{e^{x}} the only function whose slope at a given x is the same as its value?

Before I looked at this particular issue and attempted to uncover the function f(x) which gave me this special property, I decided to start small. I decided to look at some other canonical functions that might have been interesting. For example, “What is a function whose value, f(x), is equal to x?”, “What is a function whose value is equal to x^2?”, “What is a function whose value is equal to f(x)?”. The first question is easy. It defines f(x)=x. The curve for this is a straight line at a 45^{\circ} angle through the origin. The second one is easy as well. It defines f(x)=x^2. A parabola passing through the origin, (1,1) and (-1,1). The third question is the easiest of all, but the one that gets us closest to the question we are going after. It defines f(x)=f(x)! That is silly. Any function will fit. Notice, however, that in the third question the value of the function is dependent on the value of the function and not directly on x. This starts to highlight the significance of the question we are trying to answer. We want to discover a function, f(x)=f'(x). There is something quirky going on here. The right hand side is the derivative of the left hand side. So which comes first? It seems like you cannot really know the slope at f(x), until you define f(x). But then, you need the slope of f(x) to define f(x) because its value is the slope of f(x). It is a bit confusing. The trick is to realize that this function is continuous. So the value of the slope of f(x) will be pretty close to the value of the slope of f(x-\Delta{x}), the slope of the curve just prior to x. (This recursion also vaguely points to an upcoming infinite series.)

Now, let us try to find the function which satisfies the interesting property, f(x)=f'(x). In words, this means the rate of growth of this function at a given point is equal to the value of the function at that point. More on that in a bit. Let us use the fact that the function is continuous and therefore, f'(x), the slope of the function f(x) at x is given by the following.

f'(x)=\frac{f(x+\Delta{x})-f(x)}{\Delta{x}}

Since we know that the function we are trying to uncover has the special property that f(x)=f'(x), we can substitute f(x) instead of f'(x) in the previous equation, to get the following.

f(x)=\frac{f(x+\Delta{x})-f(x)}{\Delta{x}}

This can be rewritten as

(x)\cdot\Delta{x}=f(x+\Delta{x})-f(x)

which in turn can be rewritten as

,p>f(x)\cdot(1+\Delta{x})=f(x+\Delta{x})

I will substitute x with x-\Delta{x} (this is unfortunately one of those things which you do after you have worked out the steps and realize that doing something like this may make things a little cleaner to understand).

So we get, f(x-\Delta{x})\cdot(1+\Delta{x})=f(x)

Swapping the right and left sides, we get the following.

f(x)=f(x-\Delta{x})\cdot(1+\Delta{x})

The above equation represents f(x) in terms of f(x-\Delta{x}). Using steps similar to the ones shown above if we express f(x-\Delta{x}) in terms of f(x-2\cdot\Delta{x}) we get the following.

f(x)=f(x-2\cdot\Delta{x})\cdot(1+\Delta{x})^2

Extending this process n times we get the following.

f(x)=f(x-n\cdot\Delta{x})\cdot(1+\Delta{x})^n

If n is large enough that n\cdot\Delta{x}=x then the above equation becomes very interesting.

f(x)=f(0)\cdot(1+\frac{x}{n})^n

Notice that x is still not a power to any base. So f(x) is still not an exponential curve, at least it does not look so. It does seem like it may expand into a sum of polynomials with the largest polynomial being of degree n. A polynomial, however large in degree grows slower than an exponential curve (as long as the degree is finite). However, note that n is not a finite integer. It is an infinitely large number because \Delta{x} is infinitesimally small. So there is still hope that this sum of polynomials may catch up to an exponential curve. Now, we apply a trick which changes the nature of this curve. A sum of polynomials becomes an exponential curve, and the x goes up to a “position of power”. We simply reapply the equation n\cdot\Delta{x}=x to the \frac{x}{n} and the n term in the above equation to get the following.

f(x)=f(0)\cdot(1+\Delta{x})^\frac{x}{\Delta{x}}

Now, say we represent \frac{1}{\Delta{x}} by a new variable, N. Then the above equation can be written as follows.

f(x)=f(0)\cdot(1+\frac{1}{N})^({x}\cdot{N})

which in turn can be written as

f(x)=f(0)\cdot((1+\frac{1}{N})^N)^x

And now we start seeing the exponential form emerge. The x is the power to which (1+\frac{1}{N})^N must be raised to evaluate f(x).

This term, (1+\frac{1}{N})^N, when expanded out (remember that N is infinitely large) hones in on a constant, 2.718281. And that is why, a special name is given to this term (e). The right hand side thus becomes e^x.

This takes the general form f(x)=c\cdot{e^x}, where c = f(0), the value of the function at x=0. In other words we have proved that a function that satisfies the property that the curve’s value at any point is equal to the slope of the curve at that point follows the general form of an exponential curve.

How is continuous compounding related to the base of the exponential curve whose slope is equal to its value?

Now that we understand the general structure of the exponential curve and its special property, slope equals value, let us revisit the issue of continuous compounding. How is that related to this curve? It is intuitive once we realize that the rate at which money grows at any point in time is directly proportional to the amount of money in the account at that point in time. This is the same as saying the slope of the curve at a given point is directly proportional to the value of the function at that point. The interest rate plays the role of tempering the proportionality. For example, if the interest rate is 100%, the value of the continuously compounding account after x units of time (x years) is f(x) =c \cdot e^{100\% /cdot x}. Here c is the amount in the account at the beginning (value of the function at x=0, f(0)). If the interest rate is 8%, then the value at time x years is f(x)=c\cdot e^{80\% \cdot x}. Once we see that the two phrases, “slope of a curve is proportional to its value” and “rate of growth of something is proportional to the amount of that something”, are saying the same thing, it is clearer that these two ways of defining or discovering e are equivalent.

Other places e shows up

Another place e shows up is called Derangements, as in the opposite of arrangement. A popular example used to explain this issue is the hat check problem. Say there are n people who check in at a party, and the butler takes their hats as they enter the party. There are boxes to hold the hats, one per guest. The boxes have names on them to identify which guest’s hat should go into it. The butler, however, does not know the names of the guests. He puts the hats into those boxes randomly. When the number of hats (and boxes) is large, the probability that no hat is in the right box is \frac{1}{e}. I have been able to work this out mathematically, but I still have not been able to understand this intuitively. Maybe the reason e shows up here has nothing to do with the properties of e^x. Maybe it just so happens that the same summation, which adds up to e, (1+\frac{1}{n})^n, shows up here.

Solution to Hat Check Problem: An Outline

The probability that all hat are in wrong boxes = 1 – probability that at least one hat is in the right box

= 1 – (prob. that the 1^{st} hat is in the right box OR prob that the 2^{nd} hat is the right box OR … OR probability that the n^{th} hat is in the right box)

Note that for the i^{th} hat to be in the right box the first i-1 hats have to avoid that box. Therefore,

Probability that the i^{th} hat is in the right box = (probability that the 1^{st} hat has not taken up the right box of the i^{th} hat).(probability that the 2^{nd} hat has not taken up the right box of the i^{th} hat)…(probability that the i-1^{th} hat has not taken up the right box of the i^{th} hat).(the i^{th} hat does take up the right box)

Using this, the probability that all hat are in wrong boxes

 = 1 -  (     \frac{1}{n} + ( \frac{1}{n} \cdot (1-\frac{1}{n}))   +  (  \frac{1}{n}  \cdot  (1-\frac{1}{n})^2  )  +  (  \frac{1}{n}  \cdot  (1-\frac{1}{n})^3  )  + ... + (  \frac{1}{n}  \cdot  (1-\frac{1}{n})^n  )    )

 = 1 - ( \frac{1}{n}) \cdot (1 + (1-\frac{1}{n}) + (1-\frac{1}{n})^2  + (1-\frac{1}{n})^3 + ... + (1-\frac{1}{n})^n )

 = 1 - \frac{1}{n} \cdot A

where,

 A = 1 + (1-\frac{1}{n}) + (1-\frac{1}{n})^2 + (1-\frac{1}{n})^3 + ... +  (1-\frac{1}{n})^n

 A \cdot (1-\frac{1}{n}) = (1-\frac{1}{n}) + (1-\frac{1}{n})^2 + (1-\frac{1}{n})^3 + ... +   (1-\frac{1}{n})^n + (1-\frac{1}{n})^{n+1}

 A \cdot (1-\frac{1}{n}) + 1 = 1 + (1-\frac{1}{n}) + (1-\frac{1}{n})^2 + (1-\frac{1}{n})^3 + ... +   (1-\frac{1}{n})^n + (1-\frac{1}{n})^{n+1}

 A \cdot (1-\frac{1}{n}) + 1 = A + (1-\frac{1}{n})^{n+1}

 A = \frac{(1-\frac{1}{n})^{n+1} - 1}{(1-\frac{1}{n}) - 1}

 A = \frac{(1-\frac{1}{n})^{n+1} - 1}{-\frac{1}{n}}

Putting this A back in the equation for the probability we are looking for, we get,

 = 1 + (1-\frac{1}{n})^{n+1} - 1

 = (1-\frac{1}{n})^{n+1}

 = (\frac{n-1}{n})^{n+1}

 = (\frac{n}{n-1})^{-n-1}

now, replacing n-1 by N,

 = (\frac{N+1}{N})^{-N-2}

 = (1+\frac{1}{N})^{-N} \cdot (1+\frac{1}{N})^{-2}

The second term goes to 0 as N increases. So we are left with,

 = \frac{1}{(1+\frac{1}{N})^{N}}

 = \frac{1}{e}

I do not know why e shows up here. But, well, it does. Yet another place where e shows up with unabated vigor is when representing complex numbers, and, of course, in that famous Euler’s equation that brings together 5 of the most interesting quantities in mathematics, e^{i\pi}+1=0. I will go into exploring that another time.

References and Acknowledgments

My discussions with my friend Mani, and my investigations on the internet led to this write up. I found the Wikipedia site very useful to tie together the seemingly unconnected ways in which the constant e shows up in real life. The BetterExplained.com website has a very good illustrated tutorial for those who want to understand the concept of e in simple terms.

Wikipedia.com – http://en.wikipedia.org/wiki/E_(mathematical_constant)

BetterExplained.com – http://betterexplained.com/articles/an-intuitive-guide-to-exponential-functions-e/

Leave a Reply