Brachistochrone racer
Five curves connect the same two points. Release the balls simultaneously and watch them race under gravity. The cycloid — the brachistochrone, or “shortest time” curve — always wins, no matter the height. Johann Bernoulli posed this challenge in 1696; the answer launched the calculus of variations.
The problem
In June 1696, Johann Bernoulli published a challenge to the mathematicians of Europe: given two points A and B at different heights, what curve between them allows a frictionless bead sliding under gravity to travel from A to B in the least time? A straight line is the shortest distance, but it is not the fastest path. The answer is the cycloid — the curve traced by a point on the rim of a rolling circle.
Why the cycloid wins
The cycloid steepens early, converting potential energy into kinetic energy faster than other curves. A straight line starts slow because it descends gradually at first. A parabola and circular arc both accelerate less efficiently. Even the catenary — which hangs like a chain — cannot match the cycloid’s early dive followed by a fast horizontal traverse.
The proof requires the calculus of variations — minimizing a functional (an integral over the path) rather than a function. The Euler-Lagrange equation applied to the time integral T = ∫ ds/v yields the cycloid as its unique solution. Newton, Leibniz, L’Hôpital, and Jakob Bernoulli all solved the problem, and it became the founding example of variational calculus.
The physics
Each ball slides frictionlessly under constant gravity. At any point on its curve, the speed is v = √(2gy) where y is the vertical distance fallen. The simulation integrates arc length along each parameterised curve, computing elapsed time from ds/v at each step. The balls are rendered at the corresponding position for the current time.