Mathematics RU

Part IV · Calculus Chapter 29 of 60

The number e and the exponential

The same number, 2.71828…, has been spotted in a bank, on a graph, under a hyperbola, in radioactive decay, on a circle, in a cloakroom and at a bride’s choosing of a husband. Let’s log every sighting, like a naturalist in a field diary, and find out whether it’s one number or several look-alikes.

Ages 16–18 55 minutes

Builds on: 28 · The integral

You will learn

  • explain why compound interest, the area under a hyperbola and the function equal to its own derivative all lead to the same number e
  • solve problems about continuous growth, decay and cooling, and find a half-life
  • compute e and powers of e to any accuracy from the series of factorials
  • understand Euler’s formula and recognise 1/e in the hat-check problem, the lottery and choosing the best

The last chapter left a crack in its handiest formula. The area under the graph of $y = x^n$ is given by the antiderivative $\frac{x^{n+1}}{n+1}$, for every $n$ but one: at $n = -1$ there’s a zero in the denominator. Yet the hyperbola $y = \frac1x$ hasn’t gone anywhere; there’s an area under it, and you can shade it in and measure it. There was a hint too: Fermat’s rectangles over the intervals $[1, q]$, $[q, q^2]$, $[q^2, q^3]$, … all have the same area, so the area under the hyperbola grows like the number of steps of a geometric progression, like a logarithm. But which one? And a second question, saved for the end: is there a function that coincides with its own derivative, that is, grows at exactly the rate its own value shows?

Both questions lead to the same number, $2.71828\ldots$, which is denoted by the letter $e$. What’s strange is something else: the number turns up where nobody expects it. In a bank agreement. On the graph of an exponential function. Under a hyperbola. In an ancient bone where radioactive carbon is decaying. On a circle. In a cloakroom where the hats got mixed up. And even at a bride’s choosing of a husband. Let’s keep notes like a naturalist who meets a similar bird now in a forest, now on a marsh, now in the middle of a city. First we’ll record where and in what circumstances it was seen, and then we’ll work out whether it’s one species or several look-alikes.

The bank: interest on interest

The first sighting was recorded by Jacob Bernoulli, the eldest mathematician of the famous family from Basel. In 1683 he took up a problem any depositor might ask. A bank promises $100\,\%$ a year. Put in one pound and a year later you get two. But what if interest is credited twice a year, $50\,\%$ per half-year? After six months there’s $1.5$ pounds in the account, and the next $50\,\%$ is credited on one and a half pounds rather than one. By the end of the year it comes to $1.5^2 = 2.25$ pounds. Interest on interest pays better.

Let’s split the year ever more finely. With $n$ credits, each one adds $\frac1n$ of the sum in the account, that is, multiplies it by $1 + \frac1n$. In a year one pound becomes $\left(1 + \frac1n\right)^n$ pounds.

Interest is credited$n$After a year, pounds
once a year$1$$2$
twice a year$2$$2.25$
quarterly$4$$2.441\,406\ldots$
monthly$12$$2.613\,035\ldots$
daily$365$$2.714\,567\ldots$
hourly$8760$$2.718\,127\ldots$
every minute$525{,}600$$2.718\,279\ldots$

The sum grows, but the gains melt away. Going from monthly to daily crediting brings in another ten pence, from daily to hourly a third of a penny, from hourly to every minute one and a half hundredths of a penny. The growth is clearly running up against something. Bernoulli saw that the sums approach a limit lying between two and three, but didn’t find the number itself. Into the diary: $2.71828\ldots$

The initial deposit. What fraction one credit adds: the annual rate $r$ as a fraction of one ($12\,\% = 0.12$), divided by the number of credits a year. How many times interest was credited: $n$ times a year for $t$ years. Example: $100{,}000$ pounds at $12\,\%$ a year credited monthly. In a month the sum is multiplied by $1.01$, and after a year the account holds $100{,}000 \cdot 1.01^{12} \approx 112{,}683$ pounds, $683$ more than with a single credit at the end of the year.

With a rate $r$ the picture is the same: $\left(1 + \frac rn\right)^n$ grows as $n$ grows and approaches its limit. Crediting “infinitely often” like this is called continuous compounding. Play at being the bank: pick the frequency in the table and the rate with the slider.

Tap a row of the table to change how often interest is credited. The steps of the graph are the moments when the bank credits interest; the more of them there are, the closer the staircase hugs the smooth curve. Move the rate up to $50\,\%$ and see what one pound now tends to.

In the expression $\left(1 + \frac1n\right)^n$ the base tends to one, and one to any power is one. So as $n \to \infty$ it tends to $1$?

The base pulls towards one, the exponent towards infinity, and the outcome of the tug of war depends on which is faster. Such an expression is called an indeterminate form of type $1^\infty$. Compare: $\left(1 + \frac1{n^2}\right)^n \to 1$, because the base approaches one too quickly, while $\left(1 + \frac1n\right)^{n^2}$ grows without limit. In our case the forces are balanced, and the result is $e$.

So far we only have a table. We haven’t proved that the limit exists, or that it’s less than three. We’ll come back to this once there are more sightings; for now, on to the second place.

The slope: a function equal to its own rate

The second place is a graph. The exponential function $y = a^x$ from the chapter on powers grows by the same factor over equal stretches of time. But how fast? Rate is the derivative, and it can be computed from the definition. The difference quotient splits into two factors:

$$\frac{a^{x+h} - a^x}{h} = a^x \cdot \frac{a^h - 1}{h}.$$

The second factor doesn’t depend on $x$. As $h \to 0$ it’s the slope of the graph of $y = a^x$ at the point $x = 0$, a number that depends only on the base. Let’s call it $k(a)$.

Suppose the graph of $y = a^x$ ($a > 0$) has a tangent with slope $k(a)$ at the point $x = 0$. Then the derivative exists at every point $x$ and equals $(a^x)' = k(a)\,a^x$: the rate of growth is proportional to the value.

The trick is the equation $a^{x_0 + h} = a^{x_0} \cdot a^h$: the graph near any point $x_0$ is the graph near zero, raised by a factor of $a^{x_0}$.

Near zero the graph almost coincides with its tangent: $a^h \approx 1 + k h$. For each unit of run to the right the tangent rises by $k = k(a)$; that’s the slope at zero. In the picture $a = 2$ and $k \approx 0.693$. Take the piece of the graph over the interval $[0, h]$ and move it right by $x_0$. By the equation $a^{x_0 + h} = a^{x_0} a^h$ each of its heights is multiplied by the same number $a^{x_0}$: over the interval $[x_0, x_0 + h]$ lies the same piece, stretched vertically by a factor of $a^{x_0}$. A vertical stretch multiplies all the rises by $a^{x_0}$ and leaves the runs alone, so the slope of the tangent is multiplied by $a^{x_0}$ too. In algebra it’s the same thing: the difference quotient at $x_0$ equals $a^{x_0} \cdot \frac{a^h - 1}{h}$ and tends to $a^{x_0} k$ as $h \to 0$. Move the point $x_0$: wherever it stands, the slope is $k(a) \cdot a^{x_0}$. So $(a^x)' = k(a)\,a^x$.

The derivative of an exponential function is proportional to the function itself. Different bases differ only in the factor $k(a)$. For two it’s about $0.693$: the function $2^x$ grows more slowly than its value, and its tangent at the point $(0, 1)$ is gentle. For three it’s about $1.099$, faster than the value. Somewhere between two and three hides a base with $k = 1$, and for it the derivative coincides with the function. Look for it yourself.

Drag the point on the graph up and down or move the slider. The dashed line is the graph of the derivative: it lies below the graph of the function while $k < 1$ and above it when $k > 1$. Make the slope at zero equal to one.

Found it? Anyone who chose the base carefully got $2.718\ldots$ The diary has a second appearance of the same number. But resemblance isn’t identity: the number was found by feel, to three digits, and we have no reason why the bank and the graph should need the same number. What’s more, we haven’t even proved that the slope $k(a)$ exists. We need a third sighting.

The hyperbola: an area that adds up

Back to the question the chapter began with, the area under the hyperbola. Let $A(x)$ be the area under the graph of $y = \frac1t$ from one to $x$:

$$A(x) = \int_1^x \frac{dt}{t}, \qquad x > 0.$$

For $x > 1$ it’s an ordinary area, for $x < 1$ it’s the area from $x$ to one taken with a minus sign (that’s how the integral works by definition, see the chapter on the integral), and $A(1) = 0$. The antiderivative can’t be found from a ready-made formula, but numerically the area is easy to compute: $A(2) \approx 0.693$, $A(3) \approx 1.099$, $A(4) \approx 1.386$, $A(8) \approx 2.079$.

Two coincidences at once. The first two numbers are the very slopes $k(2)$ and $k(3)$ from the last section. And the last two are twice and three times $A(2)$: the area up to four is twice the area up to two, up to eight three times. That’s how a logarithm behaves: $\log 4 = 2\log 2$, $\log 8 = 3 \log 2$. The coincidence isn’t an accident.

For any positive $a$ and $b$, $A(ab) = A(a) + A(b)$.

The trick is to stretch the figure horizontally and squash it vertically by the same factor: the area doesn’t change, and the hyperbola goes to itself. We’ll draw the case $a > 1$, $b > 1$.

Shade the area under the hyperbola from $1$ to $b$. That’s $A(b)$. Stretch the figure horizontally by a factor of $a$: the point $(t, s)$ goes to $(at, s)$. The interval $[1, b]$ becomes the interval $[a, ab]$, and the area grows by a factor of $a$: each narrow rectangle of width $w$ turns into a rectangle of width $aw$ and the same height. Now squash the figure vertically by a factor of $a$: $(at, s) \to \left(at, \frac sa\right)$. The heights shrink by a factor of $a$, and the area returns to $A(b)$. The top edge lands exactly on the hyperbola: the point $\left(t, \frac1t\right)$ has gone to $\left(at, \frac1{at}\right)$. So the area under the hyperbola from $a$ to $ab$ equals $A(b)$ too. What matters isn’t where the interval stands but how many times further out its right end is than its left. The area under the hyperbola from $1$ to $a$ is $A(a)$ by definition. The area from $1$ to $ab$ is made up of two pieces, from $1$ to $a$ and from $a$ to $ab$: $A(ab) = A(a) + A(b)$. If $a$ or $b$ is less than one, the same stretch works with signed areas: for $a > 0$ it doesn’t change the direction of intervals, and $\int_a^{ab} \frac{dt}{t} = \int_1^b \frac{dt}{t}$ as before.
The area under the hyperbola from one to the product. The area up to the first factor. The area up to the second. It’s also the area from $a$ to $ab$: intervals with the same ratio of ends collect the same area under the hyperbola. Example: $A(6) = A(2) + A(3) \approx 0.693 + 1.099 = 1.792$. Numerical integration gives $A(6) = 1.7918\ldots$

$A\left(\frac1x\right) = -A(x)$, and $A(x^q) = q\,A(x)$ for any rational $q$ and any $x > 0$.

From the theorem with $b = \frac1a$ we get $A(a) + A\left(\frac1a\right) = A(1) = 0$, so $A\left(\frac1a\right) = -A(a)$. For natural $k$, apply the theorem $k - 1$ times to the product $x \cdot x \cdot \ldots \cdot x$ and get $A(x^k) = k A(x)$; together with the previous equation this holds for negative integers $k$ too. Finally, if $q = \frac mn$, put $y = x^{m/n}$. Then $y^n = x^m$, and by what’s already proved $n A(y) = A(y^n) = A(x^m) = m A(x)$, that is, $A(x^{m/n}) = \frac mn A(x)$.

The area under the hyperbola is a logarithm. But to what base? The base of a logarithm is the number whose logarithm equals one. We’re looking for the $x$ at which $A(x) = 1$. The area grows with $x$ and changes without jumps; $A(2) \approx 0.693$ is less than one and $A(3) \approx 1.099$ more, so such an $x$ exists, lies between two and three, and is unique (the intermediate value theorem from the chapter on limits is at work here). Numerically it’s $2.71828\ldots$ The third sighting, and the same number again.

One and the same number

We have three sightings. The bank: the limit of $\left(1 + \frac1n\right)^n$. The slope: the base whose slope at zero equals one. The hyperbola: the number up to which the area under it equals one. Time to prove that this is one number, not three look-alikes. Everything is settled by one narrow strip under the hyperbola.

For any $h > -1$, $h \ne 0$, we have $\dfrac{h}{1 + h} < A(1 + h) < h$.

The area of a rectangle of width $h$ and height $\frac1{1+h}$, the lowest point of the hyperbola on the interval $[1, 1 + h]$. The area of a rectangle of width $h$ and height $1$, the highest point. Example: at $h = 0.1$ we get $0.0909 < A(1.1) < 0.1$; in fact $A(1.1) = 0.0953\ldots$ The narrower the strip, the tighter the squeeze: for small $h$ the area is almost equal to $h$.

On the interval $[1, 1 + h]$ the hyperbola decreases, so it’s squeezed between its lowest and highest points.

The strip under the hyperbola over the interval $[1, 1 + h]$ is $A(1 + h)$. At every point of the interval except the right end, the hyperbola is higher than its value at the right end, $\frac{1}{1 + h}$. So a rectangle of that height fits entirely inside the strip and doesn’t fill it: $\frac{h}{1 + h} < A(1 + h)$. At every point except the left end, the hyperbola is below one. A rectangle of height $1$ covers the strip with room to spare: $A(1 + h) < h$. The strip is squeezed between the rectangles: $\frac{h}{1 + h} < A(1 + h) < h$. For negative $h$ (from $-1$ to $0$) the picture is the same, only the strip lies to the left of one and the area is taken with a minus sign; the inequalities come out the same.

First, let’s check the bank against the hyperbola. For now let $e$ denote the number for which $A(e) = 1$.

For every natural $n$

$$\left(1 + \frac1n\right)^n < e < \left(1 + \frac1n\right)^{n+1},$$

and so $\left(1 + \frac1n\right)^n \to e$ as $n \to \infty$.

Put $h = \frac1n$ in the lemma. Since $\frac{1/n}{1 + 1/n} = \frac1{n+1}$, we get $\frac1{n+1} < A\left(1 + \frac1n\right) < \frac1n$.

Multiply the right inequality by $n$. By the corollary on powers $n A\left(1 + \frac1n\right) = A\left(\left(1 + \frac1n\right)^n\right)$, so $A\left(\left(1 + \frac1n\right)^n\right) < 1 = A(e)$. The area grows along with the right edge, so a smaller area corresponds to a smaller number: $\left(1 + \frac1n\right)^n < e$. In exactly the same way, multiplying the left inequality by $n + 1$ gives $A\left(\left(1 + \frac1n\right)^{n+1}\right) > 1$ and $\left(1 + \frac1n\right)^{n+1} > e$.

It remains to notice that the squeeze tightens. The upper bound is $1 + \frac1n$ times the lower, so their difference is $\frac1n\left(1 + \frac1n\right)^n < \frac en$. The number $e$ is less than four: $A(2) > \frac12$ (a rectangle of width $1$ and height $\frac12$ fits under the hyperbola on $[1, 2]$), so $A(4) = 2A(2) > 1 = A(e)$. Altogether $0 < e - \left(1 + \frac1n\right)^n < \frac4n$, and this difference becomes smaller than any positive number.

The bank and the hyperbola are talking about the same number. Now it has a name and a rigorous definition.

The number $e$ is the limit of the sequence $\left(1 + \frac1n\right)^n$: $e = 2.718\,281\,828\,459\ldots$ The area under the hyperbola $y = \frac1t$ from $1$ to $e$ equals one.

The base, which hugs one: how much one credit of interest adds when the year is split into $n$ parts. The exponent, which grows: how many times interest was credited. The base and the exponent pull in opposite directions, and the tug of war ends in a draw at the number $e$. Example: at $n = 10$ the theorem gives $2.5937 < e < 2.8531$, at $n = 1000$ it gives $2.71692 < e < 2.71964$. The limit converges slowly: to get each next correct digit, $n$ has to be made about ten times larger. Some calculus textbooks call this the “second remarkable limit”; the first is $\frac{\sin x}{x} \to 1$ from the chapter on limits.

Now let’s call the area by its real name. In the chapter on logarithms, the natural logarithm $\ln x$ was the logarithm to base $e$.

For every $x > 0$, $\ln x = A(x) = \displaystyle\int_1^x \frac{dt}{t}$.

For numbers of the form $e^q$ with rational $q$ the equation follows from the corollary on powers: $A(e^q) = q A(e) = q = \ln e^q$. Take any $x > 0$ and suppose that $A(x) < \ln x$. Between any two different numbers there’s a rational one (fractions are dense on the line, chapter 6); take such a $q$: $A(x) < q < \ln x$. From $q < \ln x$ it follows that $e^q < x$, because the logarithm to a base $e > 1$ is increasing. The area is increasing too, so $A(e^q) < A(x)$, that is, $q < A(x)$. A contradiction. The case $A(x) > \ln x$ is dealt with in the same way. What remains is $A(x) = \ln x$.

This theorem can also be read the other way round, making the formula $\ln x = \int_1^x \frac{dt}{t}$ the definition of the logarithm. Then everything is built anew with no reservations. The function $\ln x$ increases, changes without jumps and takes every value: $\ln 2^k = k\ln 2$ goes off to plus infinity and $\ln 2^{-k} = -k\ln 2$ to minus infinity. So for each real $x$ there’s exactly one number $y > 0$ with $\ln y = x$. That number is called $e^x$, and a power with any base $a > 0$ is defined by the equation $a^x = e^{x \ln a}$. In the chapter on powers we promised to deal carefully with exponents like $\sqrt 2$, and this is that definition. For rational $x$ it gives the same as before (by the corollary on powers $\ln a^q = q\ln a$), and the rules for powers follow from the property of the area: the logarithms of the numbers $e^x e^y$ and $e^{x+y}$ both equal $x + y$, so the numbers themselves are equal.

The exponential function, or simply the exponential, is the function $y = e^x$ with base $e$; it’s also written $\exp x$. It’s the inverse of the natural logarithm: $e^{\ln x} = x$ for $x > 0$ and $\ln e^x = x$ for every $x$.

Now for the derivatives. We’ve met them already in the chapter on the derivative, but here both functions have been built anew, from the area under the hyperbola, and we’ll derive their derivatives using only the fundamental theorem of calculus. The logarithm is the accumulated area under the hyperbola, and by the fundamental theorem the rate at which accumulated area grows equals the height of the graph. So $(\ln x)' = \frac1x$, and the crack from the start of the chapter is closed: $\int \frac{dx}{x} = \ln|x| + C$ (for $x < 0$ the derivative of $\ln(-x)$ is also $\frac{-1}{-x} = \frac1x$ by the chain rule). The derivative of the exponential comes from a mirror.

$(e^x)' = e^x$ for every $x$.

The graphs of mutually inverse functions are symmetric about the line $y = x$. Reflection swaps run and rise, so the slope of the tangent is turned upside down.

Take the point $P = (a, \ln a)$ on the graph of $y = \ln x$. The slope of the tangent there is $(\ln x)' = \frac1a$: for each unit of run the tangent rises by $\frac1a$. Reflect the whole picture in the line $y = x$. The point $(x, y)$ goes to $(y, x)$, so the graph of the logarithm goes to the graph of the exponential, the point $P$ to the point $P' = (\ln a, a)$, and the tangent to the tangent to the exponential at $P'$. In the reflected triangle the legs have swapped roles: the run is now $\frac1a$ and the rise one. The slope of the tangent to the exponential at $P'$ is $\frac{1}{1/a} = a$. The $x$-coordinate of $P'$ is $x_0 = \ln a$, and its height is $e^{x_0} = a$. The slope has matched the height: $(e^x)' = e^x$ at the point $x_0$. The point $P$ can be put anywhere on the graph, so the equation holds for all $x$.

And here’s the explanation of the second coincidence. By definition $a^x = e^{x \ln a}$, and by the chain rule $(a^x)' = \ln a \cdot e^{x\ln a} = \ln a \cdot a^x$. The factor from the section on the slope is the natural logarithm of the base: $k(a) = \ln a = A(a)$. Hence $k(2) = A(2)$ and $k(3) = A(3)$, and the slope at zero equals one exactly when $\ln a = 1$, that is, when $a = e$. All three sightings are one number.

The number $e$ is at once the limit of $\left(1 + \frac1n\right)^n$, the point up to which the area under the hyperbola $y = \frac1t$ equals one, and the only base for which the exponential function equals its own derivative. The natural logarithm is natural because it’s the area under the simplest curve, $y = \frac1t$.

It remains to answer the question from the last chapter: which functions coincide with their own derivative? The exponential is one of them, and so is any multiple $Ce^x$ of it. There are no others.

Let a function $y(x)$ be defined on an interval containing $0$, and let $y' = k y$ on it, where $k$ is a number. Then $y(x) = y(0)\,e^{kx}$. In particular, the functions equal to their own derivative are exactly the functions $Ce^x$.

The trick is to divide $y$ by the expected answer and see that the quotient doesn’t change. Put $u(x) = y(x)\,e^{-kx}$. By the product rule and the chain rule

$$u' = y' e^{-kx} + y \cdot \left(-k e^{-kx}\right) = (y' - ky)\,e^{-kx} = 0.$$

A function with zero derivative on an interval is constant; that’s the lemma from the chapter on the integral, and it follows from Lagrange’s theorem: $u(x) - u(0) = u'(c)\,x = 0$ for some $c$ between $0$ and $x$. So $u(x) = u(0) = y(0)$, and $y(x) = y(0)\,e^{kx}$.

This theorem is a workhorse of calculus. Whenever a quantity changes at a rate proportional to itself, the answer is an exponential, and there are no other options. The first application is to the bank itself.

For any real $x$, $\left(1 + \frac xn\right)^n \to e^x$ as $n \to \infty$.

At $x = 0$ there’s nothing to prove. Let $x \ne 0$ and $n > |x|$; then $h = \frac xn$ lies between $-1$ and $1$. By the strip lemma $\frac{h}{1 + h} < \ln(1 + h) < h$; multiply by $n > 0$: $\frac{x}{1 + x/n} < n\ln\left(1 + \frac xn\right) < x$. The left side differs from $x$ by $\frac{x^2/n}{1 + x/n}$, and this tends to zero, so $\ln\left(1 + \frac xn\right)^n \to x$. The exponential changes without jumps (it has a derivative), so $\left(1 + \frac xn\right)^n = e^{\ln(1 + x/n)^n} \to e^x$ as well.

One pound at $100\,\%$ with continuous compounding grows by a factor of $e$ in a year, and at a rate $r$ over $t$ years by a factor of $e^{rt}$. That’s the smooth curve the bank’s staircase hugs.

A deposit of $100{,}000$ pounds is placed at $8\,\%$ a year, compounded continuously, for $10$ years. How many pounds will be in the account? Round the answer to the nearest pound; $e^{0.8}$ can be worked out on a calculator.

$S = 100{,}000 \cdot e^{0.08 \cdot 10} = 100{,}000 \cdot e^{0.8} \approx 100{,}000 \cdot 2.225541 \approx 222{,}554$ pounds. For comparison, with interest credited once a year it would be $100{,}000 \cdot 1.08^{10} \approx 215{,}892$ pounds. The difference is almost seven thousand.

Factorials: a portrait accurate to the last digit

The limit of $\left(1 + \frac1n\right)^n$ is a poor way to compute $e$: at $n = 1000$ only two decimal places are correct. There’s an incomparably faster way, and the road to it is laid by integration by parts from the last chapter.

For any real $x$ and natural $n$

$$e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots + \frac{x^n}{n!} + R_n(x),$$

where the remainder is

$$R_n(x) = \frac1{n!}\int_0^x (x - t)^n e^t\,dt,$$

and $|R_n(x)| \le e^{|x|}\dfrac{|x|^{n+1}}{(n+1)!}$. So the sums $1 + x + \frac{x^2}{2!} + \ldots + \frac{x^n}{n!}$ tend to $e^x$ as $n \to \infty$.

The trick is to pull terms out of the integral one at a time. At $n = 0$ the formula holds: $R_0(x) = \int_0^x e^t\,dt = e^x - 1$ by the Newton–Leibniz formula, and $e^x = 1 + R_0(x)$.

The step from $n$ to $n + 1$ is integration by parts. In the integral $R_n(x)$ take $u = e^t$ and $dv = \frac{(x - t)^n}{n!}\,dt$; then $du = e^t\,dt$ and $v = -\frac{(x - t)^{n+1}}{(n+1)!}$ (check by differentiating: the minus from the chain rule eats the minus in front). The formula $\int u\,dv = uv - \int v\,du$ gives

$$R_n(x) = \left[-e^t\,\frac{(x - t)^{n+1}}{(n+1)!}\right]_0^x + \frac1{(n+1)!}\int_0^x (x - t)^{n+1} e^t\,dt.$$

The remaining integral is $R_{n+1}(x)$ by definition. In the bracket, at the upper limit $(x - x)^{n+1} = 0$, and at the lower $e^0 = 1$, so the bracket equals $\frac{x^{n+1}}{(n+1)!}$, and $R_n(x) = \frac{x^{n+1}}{(n+1)!} + R_{n+1}(x)$. So if the formula holds for $n$, substituting $R_n = \frac{x^{n+1}}{(n+1)!} + R_{n+1}$ into it gives the formula for $n + 1$. By induction it holds for all $n$.

The remainder estimate. On the interval between $0$ and $x$ the factor $e^t$ is at most $e^{|x|}$, and $\left|\int_0^x (x - t)^n\,dt\right| = \frac{|x|^{n+1}}{n+1}$. So $|R_n(x)| \le \frac{e^{|x|}}{n!} \cdot \frac{|x|^{n+1}}{n+1} = e^{|x|}\frac{|x|^{n+1}}{(n+1)!}$. The factorial overtakes any power: as soon as $n + 1 > 2|x|$, each next factor $\frac{|x|}{n+2}$ is less than a half, and the fraction $\frac{|x|^{n+1}}{(n+1)!}$ more than halves with every step. The remainder tends to zero, and the sums to $e^x$.

The first two terms, $\frac{1}{0!}$ and $\frac{1}{1!}$ (by convention $0! = 1$). They alone give the whole-number part, $2$. The general term. The factorial grows so fast that each term is at most half the one before, and from $k = 10$ on, a tenth or less. Example: the sum up to $k = 10$ is $2.718\,281\,801\ldots$, and $e = 2.718\,281\,828\ldots$: seven correct decimal places. The theorem promises an error of at most $\frac{e}{11!} < \frac{3}{11!} \approx 7.5 \cdot 10^{-8}$; in fact it’s about $2.7 \cdot 10^{-8}$. The limit of $\left(1 + \frac1n\right)^n$ would give that accuracy only for $n$ in the tens of millions.

For any other exponent the series works just as fast: $e^{0.1} \approx 1 + 0.1 + 0.005 + 0.000\,167 + 0.000\,004 = 1.105\,171$, and all six decimal places are correct.

How many of the first terms of the series $1 + 1 + \frac1{2!} + \frac1{3!} + \ldots$ have to be added for the error to fall below one millionth?

If we add the terms from $k = 0$ to $k = n$, the error is $R_n(1) < \frac{e}{(n+1)!} < \frac{3}{(n+1)!}$. At $n = 9$ this is $\frac{3}{10!} \approx 8.3 \cdot 10^{-7}$, less than a millionth. At $n = 8$ the estimate isn’t enough, and the real error is large too: $e - 2.718\,278\,77\ldots \approx 3.1 \cdot 10^{-6}$. So we need the terms from $k = 0$ to $k = 9$: ten in all.

The number $e$ is irrational: a four-line proof

Euler proved $e$ irrational in 1737, using a continued fraction. The short proof attributed to Fourier (published in 1815) rests on the remainder estimate. Suppose $e = \frac pq$ with natural $p$ and $q$. Multiply the series by $q!$: the number $q!\,e = p \cdot (q - 1)!$ is an integer, and $q!\left(1 + 1 + \frac1{2!} + \ldots + \frac1{q!}\right)$ is an integer too, because $q!$ is divisible by every $k!$ with $k \le q$. So the number $q! \, R_q(1)$ is an integer as well. But $0 < q!\,R_q(1) < q! \cdot \frac{e}{(q+1)!} = \frac{e}{q+1} < 1$ for $q \ge 2$: an integer strictly between zero and one. A contradiction. The case $q = 1$ is ruled out at once: $e$ lies between $2$ and $3$ and isn’t an integer. In 1873 Charles Hermite proved more: $e$ is transcendental.

Decay: how much is left

The next place $e$ has been seen is a laboratory. A radioactive atom has no clock. It doesn’t age: an atom that has lived a thousand years decays in the next second with the same probability as one just born, and atoms don’t affect one another. So in a large sample the same fraction of atoms decays in a short time: twice as many atoms, twice as many decays. The rate of decrease is proportional to the amount: $N' = -\lambda N$, where $\lambda > 0$ is the decay constant. By the uniqueness theorem for the exponential, $N(t) = N_0\,e^{-\lambda t}$.

The half-life $T_{1/2}$ is the time in which half the atoms of a sample decay. From $N_0 e^{-\lambda T} = \frac{N_0}2$ it follows that $\lambda T = \ln 2$: the half-life doesn’t depend on how many atoms there were at the start.

How many atoms there were at the start. The decay constant: what fraction of the atoms decays per unit of time, if that stretch is short compared with the half-life. The half-life $T_{1/2} = \frac{\ln 2}{\lambda}$. Each such period leaves a half: two leave a quarter, three an eighth. Example: carbon-14 has a half-life of $5730$ years, $\lambda = \frac{\ln 2}{5730} \approx 1.21 \cdot 10^{-4}$ per year. After $10{,}000$ years what’s left is $2^{-10{,}000/5730} \approx 0.298$, about $30\,\%$ of the original amount.

This formula underlies radiocarbon dating, devised in the late 1940s by the American chemist Willard Libby (in 1960 he received the Nobel Prize in Chemistry for it). While an organism is alive, its share of carbon-14 is the same as in the atmosphere: it constantly exchanges carbon with it. After death the exchange stops, the carbon-14 decays, and the clock starts. By measuring what share of carbon-14 is left in a bone or in charcoal from a campfire, you can find out how many years ago the exchange stopped.

An ancient bone has $\frac18$ of the carbon-14 it had in life. How many years ago did the animal live? The half-life is $5730$ years.

$\frac18 = \left(\frac12\right)^3$: three half-lives have passed, $3 \cdot 5730 = 17{,}190$ years. By the formula: $2^{-t/5730} = 2^{-3}$, so $t = 17{,}190$.

You can check the law without a reactor, with dice. Throw a handful of dice and remove those showing a six: they’ve “decayed”. Throw the rest again. A die has no memory either: however many throws it has survived, a six comes up with probability $\frac16$. Each throw leaves on average $\frac56$ of the dice, and after $t$ throws $N_0\left(\frac56\right)^t = N_0 e^{-t\ln(6/5)}$ are left. That’s decay with constant $\lambda = \ln\frac65 \approx 0.182$ and half-life $\frac{\ln 2}{\ln(6/5)} \approx 3.8$ throws.

Press “Roll” or let it keep rolling to the end. The dots are your experiment, the curve is the law of decay. The more dice, the more closely the dots lie on the curve; with a hundred dice chance is still noticeable. In “coins” mode every tail decays, and half of them go in a single toss.

The half-life of iodine-131 is about $8$ days. What fraction of the iodine will be left after $16$ days?

In the first $8$ days half decays, in the next $8$ half of what’s left: $\frac12 \cdot \frac12 = \frac14$. It never gets to zero: the exponential never becomes zero. In practice, of course, after a few dozen half-lives not a single atom is left, but that’s because the number of atoms is finite.

Newton used the same law in 1701 to describe cooling. His paper appeared unsigned in the Philosophical Transactions of the Royal Society. A hot body gives off heat the faster the hotter it is compared with the surrounding air, so the temperature difference decreases exponentially: $T(t) = T_{\text{air}} + \left(T_0 - T_{\text{air}}\right)e^{-kt}$.

A cup of boiling water ($100\,°$C) is left in a room at $20\,°$C. After $10$ minutes the water has cooled to $60\,°$C. How many minutes from the start will it take to cool to $30\,°$C?

Follow the difference from the room: at the start $80°$, after $10$ minutes $40°$. The difference halved in $10$ minutes, and by Newton’s law it will keep halving every $10$ minutes. $30\,°$C is a difference of $10°$, eight times smaller than at the start, that is, three “half-cooling times”: $30$ minutes.

The circle: $e^{i\pi} = -1$

The next sighting looks like an observer’s mistake: the number $e$ was seen on a circle, in the company of $\pi$ and the imaginary unit. What could $e$ to an imaginary power even mean? First attempt: $e^x$ is $e$ multiplied by itself $x$ times. With imaginary $x$ this idea gets us nowhere. Second: $e^x = \lim\left(1 + \frac xn\right)^n$. This needs only addition, multiplication and a limit, and we know how to do those for complex numbers. Substitute $x = i\varphi$ and look at the plane. When complex numbers are multiplied, their moduli multiply and their angles add.

For any real $\varphi$

$$\lim_{n \to \infty}\left(1 + \frac{i\varphi}{n}\right)^n = \cos\varphi + i\sin\varphi.$$

The trick is that multiplying by $1 + \frac{i\varphi}{n}$ is a small rotation with a small stretch. Let’s follow the angle and the length separately; we’ll draw $0 < \varphi \le \pi$ (for negative $\varphi$ everything is mirrored).

Multiply a point $z$ by $1 + \frac{i\varphi}{n}$: we get $z + \frac{i\varphi}{n} z$. Multiplying by $i$ rotates by $90°$, so a step perpendicular to the segment $0z$, of length $|z| \cdot \frac{\varphi}{n}$, is added to $z$. The result is a right triangle with legs $|z|$ and $|z|\frac{\varphi}{n}$. Start from $z = 1$ and repeat $n$ times. All the triangles are similar: each has legs in the ratio $\frac{\varphi}{n}$, so each rotates by the same angle $\theta$ with $\tan\theta = \frac{\varphi}{n}$ and lengthens by the same factor $\sqrt{1 + \frac{\varphi^2}{n^2}}$. After $n$ steps we’re at the point $\left(1 + \frac{i\varphi}{n}\right)^n$. The angle. For an acute angle $\sin\theta < \theta < \tan\theta$ (that’s the comparison of areas from the chapter on limits). Here $\tan\theta = \frac{\varphi}{n}$ and $\sin\theta = \frac{\varphi/n}{\sqrt{1 + \varphi^2/n^2}}$, so the full rotation $n\theta$ is squeezed between $\frac{\varphi}{\sqrt{1 + \varphi^2/n^2}}$ and $\varphi$. Both bounds tend to $\varphi$. The length. The modulus of the end of the chain is $\left(1 + \frac{\varphi^2}{n^2}\right)^{n/2}$. Its logarithm $\frac n2 \ln\left(1 + \frac{\varphi^2}{n^2}\right)$ is positive and, by the strip lemma ($\ln(1 + h) < h$), less than $\frac n2 \cdot \frac{\varphi^2}{n^2} = \frac{\varphi^2}{2n}$, so it tends to zero. So the length tends to one. The point the chain reaches tends to the point of the unit circle at angle $\varphi$, that is, to $\cos\varphi + i\sin\varphi$.

So it’s natural to set, as Euler did in the Introduction to the Analysis of the Infinite (1748):

The $x$-coordinate of the point of the unit circle turned by the angle $\varphi$ from the point $1$. Its $y$-coordinate. The modulus of $e^{i\varphi}$ is always one: an imaginary power doesn’t stretch, it only rotates. Examples: $e^{i\pi/2} = i$, $e^{i\pi} = -1$, $e^{2\pi i} = 1$. With this definition the rule for powers survives: $e^{i\alpha} e^{i\beta} = e^{i(\alpha + \beta)}$, because angles add when numbers multiply; and this is just the formulas for the sine and cosine of a sum.

At $\varphi = \pi$ we get the equation that’s often called the most beautiful in mathematics:

$$e^{i\pi} + 1 = 0.$$

Five of the main constants meet in it: $0$ and $1$ from arithmetic, $\pi$ from geometry, $i$ from algebra and $e$ from calculus. And its meaning is simple: if you rotate one in small steps, as described in the proof, through a total angle of $\pi$, it arrives at $-1$.

The number $n$ is how many times we multiply by $1 + \frac{i\varphi}{n}$. At $n = 1$ we get a single point, $1 + i\varphi$, far outside the circle. Increase $n$ and watch the spiral hug the circle, and at $\varphi = \pi$ close in on the number $-1$.

Euler’s formula also has a “velocity” reading. The derivative of $e^{it}$ with respect to $t$ is $ie^{it}$: the velocity is the position turned by $90°$. A point whose velocity is always perpendicular to the radius and equal to it in length runs round a circle of radius $1$ at unit speed and in time $t$ covers an arc of length $t$, exactly the angle $t$ in radians. The same function that describes a growing deposit describes rotation when the exponent is imaginary. That’s why the exponential governs everything that oscillates: pendulums, alternating current, sound.

The cloakroom and the lottery

The last two places $e$ turns up are where chances are counted. The first is a cloakroom. In the chapter on combinatorics, $n$ guests handed in their hats and the attendant gave them back at random, and we found the probability that nobody got their own hat, that the result was a derangement:

$$p_n = \frac{D_n}{n!} = 1 - \frac1{1!} + \frac1{2!} - \frac1{3!} + \ldots + \frac{(-1)^n}{n!}.$$

It was also said there that these probabilities tend to $\frac1e \approx 0.368$. Now this follows from the series for the exponential at $x = -1$.

$\left|p_n - \frac1e\right| \le \frac1{(n+1)!}$. For $n \ge 1$ the number of derangements $D_n$ is the integer nearest to $\frac{n!}{e}$.

By the series theorem at $x = -1$ we have $e^{-1} = 1 - 1 + \frac1{2!} - \ldots + \frac{(-1)^n}{n!} + R_n(-1) = p_n + R_n(-1)$. The remainder estimate from the proof of the theorem: for $x < 0$ the factor $e^t$ on the interval $[x, 0]$ is at most one, so $|R_n(-1)| \le \frac{1}{(n+1)!}$. That’s the first statement. Multiply it by $n!$: $\left|D_n - \frac{n!}{e}\right| \le \frac{1}{n + 1}$. For $n \ge 2$ this is at most $\frac13$, less than a half, and the integer $D_n$ is the integer nearest to $\frac{n!}{e}$. For $n = 1$: $D_1 = 0$, and $\frac1e \approx 0.37$ is closer to zero than to one.

Let’s check: $\frac{4!}{e} \approx 8.83$, and $D_4 = 9$; $\frac{5!}{e} \approx 44.15$, and $D_5 = 44$; $\frac{13!}{e} \approx 2{,}290{,}792{,}932.07$, and the number of derangements of the thirteen cards in Montmort’s game is $2{,}290{,}792{,}932$. Already with six guests the probability differs from $\frac1e$ by less than $\frac1{7!} \approx 0.0002$.

The second is a lottery. Suppose the chance of winning on one ticket is $\frac1n$, and you buy $n$ tickets in $n$ different draws. The probability of never winning is $\left(1 - \frac1n\right)^n$, and by the theorem on continuous compounding at $x = -1$ this tends to $e^{-1}$. A ticket with a one-in-a-million chance, bought a million times, leaves you without a win with probability $0.367\,879\ldots$ The difference from $\frac1e$ is in the seventh digit.

The chance of winning an instant lottery is one in a hundred. You’ve bought a hundred tickets, one in each draw. What’s the probability of winning at least once?

Never winning: $0.99^{100} \approx 0.366$, almost $\frac1e$. Winning at least once: $1 - 0.366 = 0.634$. We’ve seen the same share, $1 - \frac1e \approx 63.2\,\%$, before: that’s how often the banker wins in the game of Thirteen.

Choosing a husband: the 37 per cent rule

A bride receives suitors one at a time, in random order. There are $n$ of them in all, and this number is known in advance. She can compare each one with everyone she’s already seen, but knows nothing about those still to come. She has to decide on the spot: a refusal is final, and accepting ends the search. The aim is to choose the best of them all. If she accepts at random, the chance is $\frac1n$: with a hundred suitors that’s one per cent. Can she hope for more?

Let’s try a strategy: let the first $m$ suitors go, only sizing them up, and then accept the first one who’s better than everyone before. If there’s no such suitor, she ends up with the last.

For $1 \le m \le n - 1$ this strategy picks the best with probability

$$P_n(m) = \frac mn\left(\frac1m + \frac1{m + 1} + \ldots + \frac1{n - 1}\right).$$

If $n \to \infty$ and the fraction let go, $\frac mn$, tends to $x \in (0, 1)$, then $P_n(m) \to -x\ln x$. The limit takes its largest value, $\frac1e$, at $x = \frac1e$.

Suppose the best suitor came $k$th. All places are equally likely for him, so this happens with probability $\frac1n$. If $k \le m$, we’ve let him go. Let $k > m$. We’ll pick him if none of those who came from the $(m+1)$th to the $(k-1)$th turned out better than all his predecessors, since otherwise we’d have stopped earlier. And that’s the same as the best of the first $k - 1$ suitors being among the first $m$: then everyone who came after him and before the $k$th is worse than him and won’t set a record; but if the best of the first $k - 1$ came after the $m$th, he himself sets a record, and we’ll accept him. The order of the first $k - 1$ suitors is random, and their best is equally likely to stand in any of the $k - 1$ places, so the probability is $\frac{m}{k-1}$. Adding over all $k$ from $m + 1$ to $n$, we get

$$P_n(m) = \sum_{k = m+1}^{n} \frac1n \cdot \frac{m}{k - 1} = \frac mn \sum_{j = m}^{n-1} \frac1j.$$

Now the limit. Rewrite the sum as $\sum_{j=m}^{n-1} \frac{1}{j/n} \cdot \frac1n$. It’s the sum of the areas of rectangles of width $\frac1n$ under the graph of $y = \frac1t$ on the interval from $\frac mn$ to $1$, a Riemann sum. As $n \to \infty$ it tends to $\int_x^1 \frac{dt}{t} = \ln 1 - \ln x = -\ln x$, and the factor $\frac mn$ tends to $x$. Altogether $P \to -x\ln x$. The derivative of this function, $-\ln x - 1$, is zero when $\ln x = -1$, that is, at $x = \frac1e$; to the left of this point it’s positive, to the right negative. So this is a maximum, and it equals $-\frac1e \ln\frac1e = \frac1e$.

What fraction of the suitors to let go, only sizing them up. The best fraction: let about $37\,\%$ go and then accept the first one who’s better than all before. The probability of choosing the best is then about $37\,\%$ too. Example: at $n = 100$ the exact formula gives the largest probability, $0.371$, at $m = 37$; at $n = 10$ it’s $0.399$ at $m = 3$. Notice that the chance doesn’t fall as the number of suitors grows: the best of a thousand can be chosen almost as surely as the best of ten.
In “Play” mode you only see how a suitor compares with those who have already come, and decide on the spot. In “A thousand evenings” mode choose how many to let go and test the formula by experiment: the dots lie on the curve, and the best fraction is about $37\,\%$.

It can be proved that no strategy does better in this game: the rule “let about $\frac ne$ go, then take the first one better than all before” is the best possible. Martin Gardner introduced the problem to a wide audience in 1960 in Scientific American as the “game of googol”: numbers are written on slips of paper, and you have to guess when the largest is in front of you. Under the names “the secretary problem” and “the marriage problem” it lives on in probability textbooks, and variants of it are used to describe choosing a flat, selling a car, and the moment to stop searching and start acting.

Where next

The diary can be closed. In the bank, on the slope, under the hyperbola, in decay, on the circle, in the cloakroom and at the choosing of a husband we met one and the same number, and its most accurate portrait was given by the series of factorials: $e = 1 + 1 + \frac1{2!} + \frac1{3!} + \ldots$ What’s more, the whole exponential turned out to be an “infinite polynomial”: $e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \ldots$

Can other functions be written this way? Substitute $x = i\varphi$ into this series and split the terms into real and imaginary: by Euler’s formula we should get $\cos\varphi = 1 - \frac{\varphi^2}{2!} + \frac{\varphi^4}{4!} - \ldots$ and $\sin\varphi = \varphi - \frac{\varphi^3}{3!} + \ldots$, and that’s true. The logarithm, the sine, the square root: many functions have an infinite polynomial of their own. But this is where the surprises begin. The function $\frac{1}{1 + x^2}$ is smooth on the whole line, yet its series $1 - x^2 + x^4 - x^6 + \ldots$ at $x = 2$ gives $1 - 4 + 16 - 64 + \ldots$, utter nonsense. And the series $1 - \frac12 + \frac13 - \frac14 + \ldots$ can be rearranged to give any sum you like. When does a sum of infinitely many terms make sense at all? That’s the question of the chapter on series.

In this chapter

  1. The bank: interest on interest
  2. The slope: a function equal to its own rate
  3. The hyperbola: an area that adds up
  4. One and the same number
  5. Factorials: a portrait accurate to the last digit
  6. Decay: how much is left
  7. The circle: $e^{i\pi} = -1$
  8. The cloakroom and the lottery
  9. Choosing a husband: the 37 per cent rule
  10. Where next

Chapters