An area that is a sum of n to the minus n
Worth reading first: Adding up rectangles until they stop being rectangles · Where to take the samples.
Some identities look like errors. A student asked for might hope that the answer is the sum of , the way a student asked to square hopes the answer is . The second hope is wrong. The first is right:
Johann Bernoulli published it in 1697, together with its companion
and it was later nicknamed the sophomore’s dream — the dream being that this is how integration always works. It is not, and the reason it works here, and nowhere near as cleanly almost anywhere else, says something about the curve that the picture of the curve does not show at all. Adding up rectangles defined an area as a limit of sums of rectangles; this essay finds an area that is a sum of a very different kind, where every term is itself an exact area and the terms run out faster than any power.
Two curves that turn at 1/e
The curve is defined for positive as , and as shrinks to zero, shrinks to zero too — the logarithm runs off to minus infinity, but more slowly than falls — so tends to . At it is again. In between it dips: its logarithm has derivative , which vanishes at , so is smallest there, with value . Its reciprocal is a hump with the same ends and a maximum of at the same point.
Neither curve has an elementary antiderivative, so the fundamental theorem of area as the undoing of slope does not apply. The areas have to be computed some other way, and the figure computes them by Gauss–Legendre quadrature after the substitution , which smooths out the steep start of both curves near zero: and . Adding for from 1 to 30 gives the first number to sixteen digits, and adding gives the second. The agreement is the identity. What remains is to see why.
The point will keep appearing. It is where is largest, and is the quantity everything else is built from. Its maximum value is as well, which will matter shortly: on the whole interval, .
The proof is a stack of layers
Write and expand the exponential in its power series, which the curve that is its own slope built:
Each term is a curve on , and the figure stacks them. The bottom layer is the constant 1, below the window. The next is , a hump of height ; the next , a smaller hump; and so on. With five layers the stack is within a few ten-thousandths of everywhere, and the dashed curve is barely distinguishable from the top of the stack.
The proof is two steps. First, the area of the whole is the sum of the areas of the layers. That is not automatic — a limit that forgets to be continuous showed how integrating a limit and taking the limit of integrals can disagree — but here it holds for a strong reason. Since never exceeds , the -th layer never exceeds , and these bounds have a finite sum. The series therefore converges uniformly on the interval: the gap between the stack of the first layers and the curve is at most the tail of the bounds, which shrinks to zero independently of . The figure checks that the gap after five layers is below the bound . The bound is generous and still small: after two layers the curve is within 0.098 of the stack everywhere, after four within 0.0011, after six within five millionths, and the factorial in the denominator makes each further layer cost less than the one before by a factor that keeps growing. A uniformly convergent series of continuous functions can be integrated term by term, so
Second, each layer’s area is exact. Substitute , so that and . The integrand becomes , the extra factor from brings the exponent to , and the interval from 0 to 1 becomes the half-line from to 0:
The integral on the right is the gamma integral, which only one curve through the factorials identified as . The cancels the in front, and the layer’s area is exactly . Summing over and renaming as gives the sophomore’s dream. The figure’s legend prints the areas measured by quadrature: 1, 1/4, 1/27, 1/256 and 1/3125, each matching to twelve places.
The companion for is the same calculation with the sign of every odd layer reversed, since . Everything in the proof survives, and the areas alternate in sign.
Why the dream is rare
The identity is not a fluke of the proof; it is a fluke of the function. Term-by-term integration of a power series always works inside the series’ interval of convergence, so the trick is available for any . What made it pay off is that every layer could be integrated exactly, by one substitution, into a factorial. For most choices of the layers have no closed form, and the series is a series of numbers each of which needs its own quadrature — no improvement at all.
Here the substitution worked because and are the same thing in different coordinates: putting turns into and into , so the layer becomes , a gamma integrand rescaled. Bernoulli’s integral is a gamma function in disguise, sampled at every whole number at once, and the sum is what the rescalings leave behind. Other integrals of the same kind give similar sums. Replacing by for a constant multiplies the -th layer by and gives ; integrating against shifts the exponents in the same way. But the family is narrow, and it is the coincidence of power and logarithm that defines it.
Every layer peaks at the same point
Look at the layers individually, before the factorials are divided out. The function is , the -th power of a single hump, so it is largest wherever that hump is: at , with height . Dividing each by puts all of them at height 1 at the same point, and the figure draws them that way. Raising a function to a higher power makes it narrower, since values below its maximum shrink faster than the maximum does: the width at half height falls from 0.72 for to 0.34 for , roughly in proportion to .
This is a coincidence of the problem worth noticing. The minimum of , the maximum of , the peak of every layer and the point where reaches its largest value are all the same point, . The curve in the hero bulges at because every one of its layers does, and the layers decay in size because their common peak height shrinks geometrically while their width shrinks only like a square root.
Stirling’s formula, inside the layers
Because the layers narrow around their peak, a layer’s area for large is determined by the shape of the peak alone. That is Laplace’s method: near its maximum, a function raised to a high power looks like a Gaussian bell, and the bell’s area is computed from the height and the curvature at the top. For the logarithm is , whose second derivative at is . So near the peak
and the area of that bell is . The figure divides the exact area by this estimate and watches the ratio climb towards 1: 0.737 at , 0.961 at , 0.980 at .
Now rearrange. The exact area times is , and , where the last factor tends to . So the ratio tending to 1 says
which is Stirling’s formula. The figure’s second curve is divided by , falling to 1 from above: 1.0844 at and 1.0042 at , each time close to , the first of the corrections that refine Stirling’s formula into a series of its own. The layers carry those corrections too. A Gaussian is only the first approximation to the peak of ; the peak is lopsided, falling more steeply towards than towards , and expanding its logarithm to higher order around reproduces the term and the ones after it. The two ratios approach 1 from opposite sides because the two approximations make different small errors — one in the bell, one in — but they carry the same information.
So the sophomore’s dream contains Stirling’s formula in a precise sense: the terms of its series are a sequence of Laplace integrals, each concentrated at , and their sizes are the factorials’ growth rate written as areas. The constant that counts what does not happen found hiding in the count of derangements; here and appear together in the areas of humps that a curve on the unit interval is made of. This is the essay’s surprising connection, and it can be read in either direction: the curve encodes the factorials, or the factorials encode a curve.
Seven terms against a thousand samples
The practical consequence is speed. After terms the series is short by , which is dominated by its first term : the error after seven terms is , about , and after ten terms it is . That is faster than any geometric rate, since the ratio of successive terms itself goes to zero.
Sampling the curve does far worse. The midpoint rule with equally spaced samples has error falling roughly like for a smooth curve; where to take the samples measured that rate and found that it slows near a singularity. And has one at the left end: its derivative involves , which blows up at zero, so the curve rises with infinite slope from . The figure’s midpoint errors fall by a factor of about 3.5 per doubling rather than the factor of 4 a smooth curve would give, and with 1,024 samples the error is still — six times worse than seven terms of the series.
That comparison is not quite fair, and it is worth saying why. The series knew something about the function that the samples did not: its exact algebraic form, which the substitution turned into factorials. A quadrature rule only sees values. Gauss–Legendre quadrature after the change of variable , which the first figure used, removes the singular slope and converges as fast as the series does, and that is how this essay checks the identity independently. But no general-purpose rule knows to look for , and the identity’s practical worth to Bernoulli, computing by hand, was exactly that it replaced a hard area by a sum whose terms he could write down.
The steep start that slows the samples
Why the midpoint rule converges so sluggishly is visible in the curve once it is examined near zero. Expanding the series to its first layer, , the curve leaves along , whose slope is infinite at zero. The tangent at the left end is vertical, though the curve’s height is perfectly finite and its rise over the first hundredth of the interval is only about .
A midpoint rule estimates the area of each strip as the strip’s width times the curve’s height at its middle, and the error in a strip is governed by the curve’s second derivative there. For a smooth curve that derivative is bounded, the errors in the strips are each of order , and they add up to order . Here the second derivative behaves like near zero, so the first strip contributes an error of order on its own, the next ones a little less, and the total is of order : the factor is the cost of the vertical tangent, and it is why each doubling of the samples buys a factor of about 3.5 instead of 4.
The series sees none of this. Each layer has the same steep start in a milder form, but the steepness has been absorbed into the exact formula for the layer’s area, and nothing is ever sampled. The comparison is between a method that has to discover the singularity, one strip at a time, and a method that was handed it.
The alternating companion, bracketed
For the series alternates, and an alternating series whose terms shrink to zero has a useful extra property: its partial sums fall alternately above and below the limit, so each pair of consecutive sums brackets it, and the bracket’s width is the next term. The figure shows the sums 1, 0.75, 0.7870, 0.78313, 0.78345, … closing on 0.783431 from both sides. After eight terms the area is pinned between two numbers that differ by , about , and the bracket is a proof: no quadrature error estimate is needed, because the sums themselves are rigorous upper and lower bounds.
The companion also shows the difference between the two areas: , twice the sum of over even . The even layers are the ones where the two curves differ in sign, and the area between the curves is made entirely of them.
What the picture cannot show
The hero shows two curves and two shaded areas. Nothing in it suggests the numbers : the picture of a hump of height 1.44 over the unit interval is the picture of a thousand different functions, and the area’s decimal expansion carries no visible trace of the sum it equals. The identity is invisible to the eye in the way that most exact evaluations are. The layers figure is the closest the drawings come to showing it, and even there the layers’ areas have to be computed and printed; the eye sees humps getting smaller, not the numbers 4, 27, 256 and 3,125.
The pictures also hide what made the proof legal. Term-by-term integration is often wrong, and the reason it is right here — a uniform bound on — is a fact about the maximum of a function that a figure shows only as a height. The same expansion attempted on an interval where is unbounded, such as , fails at once: the layers’ areas are infinite. Nothing drawn on warns of that. And a sum read from inside and settling in order settles everywhere at once are reminders that whether a limit may be passed through an integral is always a separate question from whether the limit exists.
Still open: what kind of number it is
Nobody knows whether is rational, algebraic or transcendental, and the same is true of . The series converges much faster than the series for , which is the kind of speed that irrationality proofs exploit — Liouville’s numbers are transcendental precisely because they are approximated too well by fractions — but the partial sums of have denominators that grow as fast as the approximations improve, and the standard arguments come out exactly balanced. The constant has no known closed form in terms of other constants either; it is defined by its integral, its series, and nothing else. The power tower of root two studied the infinite iterate , whose behaviour on the real line is known completely. The humbler question of what kind of number the area under a single is remains, three centuries after Bernoulli, unanswered.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A limit can jump at every fraction — both name riemann sum, uniform convergence
- The area of the Mandelbrot set, from two sides — both name convergence rate, numerical integration
- The series everything else is measured against — both name convergence rate, power series
- The sum that fits in one square — both name convergence rate, power series
- What a jump costs evenly spread points — both name convergence rate, numerical integration
Named objects
A dashed tag is an object no other essay names yet.
Convergence rateGamma functionNumerical integrationPower seriesRiemann sumStirling approximationUniform convergence