Queen Dido founded the ancient city of Carthage using a mathematical trick. Having fled her murderous brother to the shores of North Africa, she begged the local leader Hiarbas to be given as much land as could be enclosed by a single ox hide. “I’m sure we can spare that much,” Hiarbas must have thought, and he granted her wish. Dido proceeded to cut the ox hide into thin strips, attached them at their ends and, presumably to Hiarbas’ surprise, enclosed an area large enough to start a kingdom.

All this is legend, but the mathematical problem is real. How should you arrange a long strip to enclose as large an area as possible? The answer is simple: in a circle. To get some intuition as to why that is, think of a square. We can increase the area it covers by bulging out the sides. If we bulge them out as regularly as possible, smoothing out the corners, we get a circle. We can increase the area of any other shape using this “bulging out” technique, and in the end we always end up with a circle.

A circle and a square with the same perimeter, highlighting the difference in the area covered.

The answer is intuitively clear, so it’s surprising how long it took mathematicians to prove that the circle really is the shape that encloses a maximal area for a given perimeter. During the 18th century they attacked the problem using the Calculus of Variations. Dido was thinking about all possible curves that enclose an area, the best one being the one that encloses the largest area. But you could also consider a collection of paths connecting two points and ask which one is shortest, or takes the least effort to traverse, and so on. Integration plays an important part in solving these problems, as we need to sum the values of a given quantity for each of the infinitely many points along a curve.

Interestingly, we can derive some of the laws of nature using such variational principles. For example, Newton’s laws of motion can be derived if we assume that a particle moving from \(A\) to \(B\) always takes the path that minimises something called the action. This is a measure of the effort involved in travelling along the path.

The laws of reflection and refraction for rays of light can be derived if we assume that light always takes the path that takes the least time to traverse. Facts like these have led to the idea that “nature is frugal”—it always seeks to minimise certain quantities.

Dido’s problem, however, was not entirely solved until the 19th century, when the geometer Jakob Steiner came up with a strategy for a proof that is much closer to the intuitive argument given above. With his work, the problem was regarded as solved.

However, one subtle technical gap in Steiner’s was discovered later in the 19th century through the development of an area of mathematics now known as analysis. The analysts also succeeded in plugging this gap, and thus Dido’s problem was finally solved.