The hanging chain (catenary)
What shape does a chain hanging under its own weight take — the parabola Galileo guessed?

▶ Run the simulationSee the measured result
Units: length units (catenary parameter a for S = 2, L = 2.5; root of L = 2a·sinh(S/2a), Acta Eruditorum June 1691)
How the lab tests it
Hang a flexible chain (a Verlet rope of equal links between two pinned ends, settled with position-based distance constraints) and, as the span slowly breathes, compare its shape to the catenary y = a·cosh(x/a) and to the least-squares best-fit parabola, by the RMS residual of each.
What it checks
the CATENARY, not the parabola: the chain matches y = a·cosh(x/a) to a tiny residual (≈0.006) while even the BEST-FIT parabola is tens of times worse at deep sag — and only catches up when the chain is nearly flat, where cosh ≈ parabola. The cosh wins because the chain has uniform mass per unit LENGTH (a parabola is the cable of a suspension bridge, uniform mass per unit horizontal span); it is also the least-potential-energy shape, which the rope finds on its own (Bernoulli/Huygens/Leibniz, 1691)
Catenary calculator: chain sag, span, length, the parameter a & tension
Hang a chain between two points and it takes a shape nobody could write down for fifty years. Galileo said parabola in 1638; he was wrong, and Jakob Bernoulli turned it into a public challenge in May 1690 precisely because nobody could prove what it was. The answer — y = a·cosh(x/a) — came back a year later from Leibniz, Huygens and Johann Bernoulli at once, and the single parameter a is the whole curve: it is the horizontal tension divided by the weight per unit length, the radius of curvature at the lowest point, and the height of the chain above an imaginary line called the directrix, all at the same time. That is why the tension in a hanging chain is just its HEIGHT above that line, which is the cleanest sentence in statics. Nothing here is typed: a is never an input on this page, it is SOLVED — bisected out of the span-and-length relation, or out of a measured sag, or by re-executing the shipped simulation's own bracket — because L = 2a·sinh(S/2a) has no closed-form inverse and never will. The numbers that come back are checkable against the lab above, which recovered the same a from a chain of 1600 free links that was told nothing about cosh at all: it got 0.845504697713 where the 1691 law says 0.8455046977134. One field carries the rival: g is the load law, 1 for weight spread along the chain's own arc and 0 for weight spread along the horizontal, and it is worth knowing that Galileo's parabola is the exactly right answer to that second question — a suspension bridge's cable really is a parabola, because it carries a deck and not itself. Hung as a chain, the same-length parabola costs 8.6e-4 more potential energy than the cosh and misses its shape by a hundredth of the sag; pull the span nearly taut and that misfit collapses twentyfold, which is precisely why the mistake was so easy to make and why it took the deep-sag limit to catch it. Four things this page will not do: stiffness (a real cable resists bending, and near its ends that matters), elastic stretch, a load that is neither uniform along the arc nor uniform along the horizontal, and any claim to more than twelve significant figures — the bisection calls Math.sinh, which the language leaves implementation-approximated, so the thirteenth digit belongs to your browser and not to the physics.
y = a·cosh(x/a) · L = 2a·sinh(S/2a) · sag = a(cosh(S/2a) − 1) · H = w·a, T = w·y above the directrix, T_end = √(H² + (wL/2)²) · deck load instead: sag = wS²/(8H) — Galileo's parabola, right answer to the other question