## 09 March 2008

### Approximating the length of an ellipse

Here's a question that occurred to me this morning -- what's the circumference (is this word appropriate here?) of an ellipse with semimajor axis 1+ε and semiminor axis 1? (ε is, of course, small. It could be negative, however.)

Of course, this is an elliptic integral. But I don't know much about elliptic integrals, and besides what good is that information? It doesn't give me a number. (I didn't actually need to know this for anything, but somehow the knowledge that the answer is, say, 2π+ε (it's not) is more satisfying than the fact that it can be written in terms of some special function that I don't know that well.

It turns out the answer is (2+ε)π.

Here's a sketch of a proof. This ellipse can be parametrized by x = (1+ε) cos t, y = sin t, with t varying from 0 to 2π. So the length is
Expand, and let ε2 = 0, to get
which simplifies to (recalling cos2 t + sin2 t = 1)
Now, since ε is "small", 2ε cos2 t is also "small". In general, for small h, (1+h)1/2 ~ 1 + (h/2); thus this is approximately
and now we recall that cos2 t has average value 1/2. So this is (2+ε)π, which is the answer.

More formally, if f(a) is the length of an ellipse with axis lengths 1 and a, this shows (modulo a couple leaps of faith) that f'(1) = π -- this can easily be checked with a computer algebra system, or if you actually know more about elliptic integrals than I do. This has the nice interpretation that if the lengths of the two axes of an ellipse are close to each other, the length of the ellipse is just π times the mean of the axis lengths -- which is true for a circle, where it just says that the circumference of a circle is π times its diameter. The Taylor series for the elliptic integral which gives the length is, according to Maple,

and from numerical data, for, say, ε = 0.1, this method predicts an ellipse length of 2.1π = 6.5973; the actual length is 6.6011. Even for ε = 0.5 the error's only about one percent (7.85 versus 7.93).

The real question that I started out with, though, still isn't answered -- is there some nice geometric way to see this?

Mark said...

Having seen the answer, you could argue that the ellipse is just a small perturbation of a circle of radius one. The ellipse should therefore have circumference close to that of a circle with radius (1 + ε/2). That is, 2(1 + ε/2)π = (2 + ε)π.

CarlBrannen said...

From a physicist (uh, sloppy mathematical) point of view, the path length P of an ellipse is a 1-dimensional quantity. The ellipse is defined by two dimensions, in this case 1 and 1+e. We write this as P(1,1+e). As e->0 we know that P goes to 2 pi. We wish to write P(1,1+e) = P(e) as a series in e so
P(e) = 2 pi + k1 e + k2 e^2 + ..., where we keep only the first nonzero entry.

Geometrically, the ellipse of dimension (1+e,1) and (1,1+e) are of the same size so P(1+e,1) = P(1,1+e) = P(e). But the first can also be written as (1+e)P(1,1/(1+e)) = (1+e)P(-e) to first order in e.

So P(e) = (1+e) P(-e). Therefore the first nonzero term in the series for P(e) is the linear term and we have, keeping first order in e:
(2 pi + k1 e) = (1+e) (2 pi - k1 e),
2 pi + k1 e = 2 pi - k1 e + 2 pi e,
2 k1 e = 2 pi e,
or k1 = pi, as required.

The argument generalizes to any figure that can be defined as having dimensions proportional to an x and y extent. So is that correct?

Carlos said...

I think the easiest explanation has to do with the fact that the linear transformation that takes you from a circle to a (1, 1+e) ellipse can be represented by the matrix [[1 0] [0 1+e]]. Now if we think of the length of the circumference as the derivative of the area of the circle, then the change in the derivative of the area would be given by the derivative of the matrix, which turns out to be the trace, 2+e. Now since the circumference is 2\pi for the matrix with trace 2, and everything is linear, you should get (2+e)\pi. Right?

Isabel Lugo said...

Mark: I agree with that now that I know the answer, but I'm not sure how convincing that would be if I didn't already know the answer. There's a classic proof that π = 2 which is based on a similar principle. Consider the symbol of yin and yang, where we assume that the curve separating black and white is a pair of semicircles, and the whole symbol has radius 1. The curve separating black and white then has length π. Now imagine that the curve is made up of four semicircles of half the size; it still has length π. Take more and more semicircles of smaller and smaller size; the length is always π. But these curves approach the diameter of the circle, which has length 2! Thus π = 2. Of course, the reason this proof doesn't work is because of the extreme wiggliness of those curves, which isn't a problem here.

Carl: I like that proof! And sloppy mathematics is certainly welcome here; it's very much in the spirit of the argument I gave.

Carlos: lengths don't scale like that. Areas do. (In other words, it's not true that "everything is linear".) If your argument were correct then I'm pretty sure that the area of the ellipse would be exactly (2+ε)π, but this is only a first-order approximation.

Carl Witty said...

Here's a simpler, sloppier explanation (inspired by carlbrannen's).

Geometrically, it seems clear that P(1+e,1+e)/P(1+e,1) is approximately equal to P(1+e,1)/P(1,1); so the answer is the geometric mean of 2 pi and 2 pi (1+e), which is 2 pi sqrt(1+e) or (for small e) approximately 2 pi (1 + e/2) == (2 + e) pi.

Mark said...

Isabel: You're right, the wiggliness is important but for small values of ε (positive or negative) the ellipse with radii (1+ε, 1) doesn't wiggle much relative to the circle of radius 1 + ε/2. In fact, one could argue that the circle is the "best" circular approximation of the ellipse insofar as any other circle will have a radial separation from the ellipse greater than ε/2 at some point.

While the other solutions proposed are very neat (especially those by people named Carl) aren't they more analytic than geometric?

Joshua Zucker said...

To get REALLY handwavy about it, if the circle is being stretched horizontally, the segment along the top is stretched by a factor of 1+e, and so is the segment on the bottom, while the segments on the sides to first order stay the same length (and only change their position). So on average the stretching is (1+e/2) ...

Or, a LITTLE bit more precisely, every segment gets horizontally stretched by 1+e, and vertically stretched not at all, and on average each segment points just as much vertically as horizontally, so the average is 1+e/2 again.

CarlBrannen said...

A less hand wavy calculation might be to take the length
dP = sqrt(dx^2 + dy^2),
and write it as
dP = dx sqrt(1 + dy/dx^2).
Then scale y by y = y(1+e) and take first order approximation in e.

Joshua Zucker said...

Carl,
I don't see how you get (1+e/2) out of that without doing some kind of integral around the circle?

Mark said...

You could always just inscribe a circle of radius one in side the ellipse, inscribe a circle of radius 1+ε outside the ellipse and argue (a la Archimedes) that its perimeter lies roughly halfway between the two. That is, half of 2π + 2(1+ε)π.

CarlBrannen said...

Joshua, I haven't worked out the details, but I suspect that you need to make an argument that amounts to an assumption that the figure is symmetric on the substitution of x-axis for y-axis.

David said...

Mark's last argument appeals the most. (2 + ε)π is the average of the circumference of the circles with radii 1 and (1 + ε). I would guess that the average is a good first approximation because the line integral is a square-root of squares --> adding to a particular coordinate has the effect of adding a similar value to the calculated distance. So, I guess is't more of a triangle inequality question (as in what's the geometry of the deformations of a circle into an ellipse).

Anonymous said...

If you consider an ellipse with semi-axes (a, a +\eps), then it has area \pi a (a + \eps). If a gets a bit bigger so does the area:
dA / da = \pi (2a + \eps)

Our ellipse has a = 1, so if a gets \delta a bigger then the extra area is about \pi (2 + \eps) \delta a

If you 'unwind' the extra area into a rectangle, then it's about \delta a wide, and hence about \pi (2 + \eps) long.

Anonymous said...

talking breakout detection desirability residence mattson ties supplying reputed judgments units
servimundos melifermuly

Anonymous said...

nice post. thanks.