The length round an ellipse
Worth reading first: Which curves have a length at all · The staircase that is not the diagonal.
The ellipse is the most familiar curve after the circle, and the two share almost everything a first course asks of them. The area of an ellipse with semi-axes and is , the circle’s formula with one radius stretched; the equation is the circle’s with two denominators; the points can be written , the circle’s with the axes rescaled. The exception is the one quantity that seems most elementary of all. The length of the boundary — how much string it takes to go once round — has no formula. Not a hard one: none at all, in the sense that no combination of roots, powers, logarithms and trigonometric functions of and equals it.
Which curves have a length at all defined the length of a curve as the supremum of the lengths of polygons inscribed in it, and found the condition under which that supremum is finite. The ellipse passes easily: it is smooth, its length is a perfectly good number, and the arc-length integral converges. What fails is the last step, the one that turns an integral into a formula. This essay is about what happens instead — the guesses made over three centuries, how good each is, why one of them is astonishingly good, and how the number is actually computed to as many digits as anyone wants.
A length with no formula
Walking round the ellipse at the parameter , the point moves at speed , so the perimeter is
where is the eccentricity. This is a complete elliptic integral of the second kind, and Joseph Liouville proved in the 1830s that integrals of this kind cannot be expressed through elementary functions. The integral is not difficult to evaluate numerically — the integrand is smooth and periodic, and the trapezoid rule on it converges faster than any power of the step — so the length is known to any accuracy anyone cares to ask for. It simply has no closed form.
The exact curve runs from 4 — a segment of length 2, traced out and back — to , the circle. Three classical guesses lie beside it. The oldest, usually credited to Johannes Kepler and his work on the orbit of Mars, is , the circumference of a circle with the same area. The average of the two semi-axes gives . Leonhard Euler in 1773 proposed . All three are exact for the circle and wrong for everything else: at the true perimeter is 4.844224, Kepler says 4.4429, the average 4.7124 and Euler 4.9673. Two fall short and one overshoots, and as the ellipse flattens Kepler’s guess collapses to nought while the truth stays at 4.
Polygons creep up on it
The definition supplies a method of its own, and it is worth seeing why nobody uses it. Inscribe a polygon with corners at equally spaced values of and add up its sides. Each side is a chord, shorter than the arc it cuts off, so the polygon always falls short, and refining it always helps — that was the observation which curves have a length at all turned into a definition.
For the ellipse with semi-axes 1 and 0.4 the eight-cornered polygon measures 4.4957 against the true 4.6026. Every doubling of the corners divides the shortfall by four, to within a thousandth, all the way to 1,024 corners. That is the signature of a chord’s error: a chord of an arc of angle is short by about the cube of , there are chords each of angle about , and times is . Ten correct digits would need about a hundred thousand corners. The staircase that is not the diagonal found a way of approaching a curve that never converges to its length at all; the inscribed polygon converges, but at a pace that makes it a definition rather than a method.
How far from a circle
All three classical guesses are exact for a circle, so their errors depend on how far the ellipse is from being one, and the right way to measure that turns out not to be the eccentricity. It is the quantity
which is nought for a circle and 1 for a segment. In terms of the perimeter has an exact expansion, found by Carl Friedrich Gauss and published in this form by Ernst Kummer in 1836:
where the coefficients are the squares of the binomial coefficients . The leading term is the average , and the expansion says at once how wrong the average is: by about of itself. Kepler’s geometric mean is wrong by a first-order amount in too, since and differ by a factor , and Euler’s root mean square overshoots by a first-order amount from the other side. The three famous guesses are all correct to zeroth order and all wrong in the first.
Three means and the truth between them
The three classical guesses are three averages of the semi-axes in disguise: Kepler’s uses the geometric mean , the plain guess the arithmetic mean , and Euler’s the root mean square , each multiplied by . These means always come in that order — the curve of the average and the average of the curve derived the inequality between the first two from the bending of a single curve — and the true perimeter slots into the chain:
Both inner steps can be proved in a line. The perimeter is at least because every coefficient of the Gauss–Kummer series is positive. It is at most Euler’s value because the perimeter is the integral of the speed over a full turn, and the integral of a quantity is at most the square root of times the integral of its square — the Cauchy–Schwarz inequality — while the speed squared, , integrates to exactly . So Euler’s guess is not merely an overestimate in the cases plotted; it is an upper bound that holds for every ellipse, and the average is a lower bound for every ellipse. The truth is trapped between two of the classical guesses, and the figure shows it lying nearer the lower one.
How much any of this matters depends entirely on the ellipse. The orbit of Mars, the problem that brought Kepler to ellipses, has eccentricity 0.0934 and axes in the ratio 0.9956, so its is about five millionths. Kepler’s formula is then wrong by 3.6 parts in a million, the average by 1.2, and Ramanujan’s formulas agree with the truth to the last digit the arithmetic carries. For a planet any of the guesses would do. For Halley’s comet, whose orbit has axes in the ratio of about one to four, Kepler’s formula is short by 26 per cent, the average by 8 per cent and Euler’s long by 7 per cent, while Ramanujan’s second formula is still within two parts in ten million. The guesses that served astronomy for two centuries were good because the orbits were nearly round, not because the guesses were good.
Ramanujan’s second formula
In 1914, in a paper on modular equations and approximations to , Srinivasa Ramanujan wrote down two formulas for the perimeter, almost in passing:
He gave no derivation. The figure measures how good they are, against the exact value, for ellipses from nearly circular to a ratio of axes of about eight to one.
On logarithmic axes an error proportional to is a line of slope , and the measured slopes are 1.00, 1.00 and 0.99 for Kepler, the average and Euler, 3.01 for Ramanujan’s first formula and 5.08 for his second. So the second formula agrees with the Gauss–Kummer series through its term and is first wrong in the fifth: halving the distance from a circle divides its error by thirty-two. For an ellipse with axes in the ratio two to one, , and the error is a few parts in a hundred million. Even at the far end, where the ellipse has collapsed to a segment and , the second formula gives against the true 4, wrong by 0.038 per cent. Near a circle the error is so small that it disappears below the precision of the arithmetic, which is the flat stretch at the bottom left of the black curve.
Why the second formula is so good can be seen by expanding it. Writing and expanding in powers of , the correction becomes , the Gauss–Kummer coefficients themselves, and the slope of 5 in the figure says that the agreement continues through the term and fails only at . A short algebraic expression has been chosen so that four coefficients of an infinite series come out right. How Ramanujan chose it he did not say; it sits in the same paper as his modular equations and his series for , and later writers, Gert Almkvist and Bruce Berndt among them, have studied its error closely without recovering the route by which he found it.
Gauss’s mean doubles the digits
An approximation, however good, is still an approximation. To compute the perimeter exactly, the series in is one option, and the figure shows its trouble: it gains a fixed number of digits per term, and that number shrinks as approaches 1. Twelve correct digits take 8 terms for an ellipse with axes 1 and 0.5, 37 terms for axes 1 and 0.1, and 275 terms for axes 1 and 0.01.
Gauss had a far better method, the same one the sine of a figure eight met when he identified the lemniscate’s length. Start with and , replace them by their arithmetic mean and their geometric mean, and repeat. The two sequences close in on a common value, the arithmetic–geometric mean , and they close in quadratically: the gap between them is roughly squared at every step. The perimeter is times minus a short sum over the gaps, so the same iteration computes it.
The mean reaches the last representable digit in 5, 6 and 7 steps for the three ellipses, against 8, 37 and 275 terms of the series, and its advantage grows exactly where the series struggles. That speed is why the mean, and not any series, is how elliptic integrals are computed in practice. Two methods that share nothing — the trapezoid rule on the original integral and Gauss’s iteration — agree to twelve places on every ellipse tried here, which is the best evidence on this page that the solid curve in every figure is the true perimeter.
A logarithm at the flat end
The series in struggles near for a reason that can be seen directly. Flatten the ellipse, keeping fixed and letting shrink, and the perimeter approaches . How it approaches matters. If the excess were a power series in , a flat ellipse would be as easy to handle as a round one. It is not: the excess is
with a logarithm of that no power series can supply.
Divided by , the computed excess lies on the line for every from a tenth to a millionth, to within a thousandth of a unit for every below a hundredth. The logarithm is the trace of the curvature at the ends. A very flat ellipse is almost two straight segments, except at its two ends, where it turns sharply through half a turn over a region of width about ; the length gained there grows logarithmically as the turn sharpens. A function with a logarithmic singularity at one end of its range cannot be captured by a polynomial in , which is why the Gauss–Kummer series needs hundreds of terms near and why Ramanujan’s formula, a rational function of , is finally wrong at the segment by a small but definite amount.
Two kinds of answer to one question
The ellipse sharpens a distinction that the length belongs to the journey drew in another form: a length is a definite number, and having one is a different matter from having a formula for it. Here the number exists by the polygon definition, is computed to any accuracy by Gauss’s iteration, and is approximated to astonishing accuracy by Ramanujan’s algebra, while the formula does not exist at all. Each of the five figures is a different relation to the same number — a limit of polygons, a guess, a series, an iteration, an asymptotic law — and none of them is the number itself.
It also connects to the ellipse’s other properties. Every ray comes back to the other focus found that the sum of distances to the foci is constant, which is how a gardener draws an ellipse with a loop of string round two pegs. The loop’s length is , where is the distance from centre to focus, so the string needed to draw the curve is elementary while the curve it draws is not. And a length counted by the lines that cross it measured curves by throwing lines at them; for a convex curve its formula becomes Cauchy’s, that the perimeter is times the average width. The ellipse’s width across the direction is , and averaging that over every direction is the elliptic integral once more, reached by a route that never walks round the curve at all. And an ellipse rolled along a line traces the same integrals: the distance covered in one turn is the perimeter, so a wheel of elliptical section would mark the ground at a spacing given by the same integral.
What the pictures cannot show
None of the figures proves that the perimeter has no closed form. They show that five formulas are wrong, and by how much, and they show two exact methods agreeing; Liouville’s theorem, that the elliptic integral is not an elementary function of the eccentricity, is a statement about every conceivable formula, and no finite set of comparisons can establish it. The slopes 1, 3 and 5 are measurements on a finite range of — they agree with the expansions, which are the proofs — and the claim that Ramanujan’s second formula is off by at most 0.038 per cent is checked here on a grid of ellipses, not over every ellipse, though the error is known to grow steadily with and to be largest at the segment.
The figures also do not show where Ramanujan’s formula comes from. The error curve shows that it matches four terms of the series; the reason it can, through modular equations, is a theory these pictures do not touch.
Still open: which lengths are periods
The perimeter of an ellipse whose axes are whole numbers is a strange kind of number. It is not elementary, and Theodor Schneider proved in 1937 that it is transcendental whenever the axes are algebraic and the ellipse is not a circle. But it is also not arbitrary: it is the integral of an algebraic function over a region cut out by polynomial inequalities, which makes it what Maxim Kontsevich and Don Zagier in 2001 called a period. So are , and the values of the zeta function at whole numbers.
Periods are countable and can be written down, and their conjectured structure is precise. Kontsevich and Zagier conjecture that whenever two periods are equal, the equality can be proved using only the rules of calculus — additivity, change of variables, and the fundamental theorem. If that is true, then every identity between perimeters of ellipses, lengths of lemniscates and values of is in principle a manipulation of integrals, and the question of whether two such lengths coincide is decidable. The conjecture is open, and it is the precise version of the feeling this essay leaves: that the length round an ellipse is a perfectly definite number that the ordinary vocabulary of formulas has no word for.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- An ellipse, not a disc — both name approximation, convergence, ellipse
- An endless region with a finite area — both name convergence, integral, logarithm
- Counting what has no formula — both name approximation, integral, logarithm
- No integrand sits on the border — both name convergence, integral, logarithm
- A denominator that reaches past the radius — both name approximation, convergence
- A rectangle cut by a curve — both name integral, logarithm
Named objects
A dashed tag is an object no other essay names yet.