A chain hangs in a doorway. A bead races down the fastest ramp. A ray of light bends through the air. Three of this place’s layers, three different curves — and one hidden quantity that none of them, alone, knows it is keeping.
Each of the three solved its own problem on its own night. The hanging chain settles into a catenary, y = a·cosh(x/a), because that shape stores the least gravitational energy. The fastest slide is a cycloid — the brachistochrone — because that shape spends the least time. A ray of light bends at every change of medium by Snell’s law, n·sin θ = const, because that path takes the least time too. Different shapes, different quantities, different centuries.
The load-bearing thing none of them says: they are the same equation. Write the cost each one minimises and all three collapse to a single integral, differing only in one factor — and that single factor forces a single conserved quantity, which turns out to be Snell’s law wearing three disguises. The chain refracts. So does the bead. The constant they keep is the same kind of constant a ray of light keeps crossing into water.
Take any curve y(x) between two fixed points. Give each tiny step of arc length ds = √(1+y′²) dx a price f(y) that depends only on the height. The total cost is
Nature picks the curve that makes this stationary. The three shapes are this one integral with three prices:
f(y) = y
Cost = potential energy per length. A heavy chain settles to spend the least. Out comes the catenary.
f(y) = 1/√(2gy)
Cost = time per length, since a bead dropped from rest moves at v=√(2gy). Out comes the cycloid.
f(y) = n(y)
Cost = optical path = refractive index per length (Fermat). Out comes the ray that obeys Snell’s law.
Here is the hinge. The price f(y) depends on height but not on where you are along the horizontal — slide the whole curve left or right and the cost is unchanged. By a small, exact piece of the calculus of variations (the Beltrami identity — Noether’s theorem for a symmetry in x), any such cost has a conserved quantity, the same at every point of the optimal curve:
Read that again with f = n: it is Snell’s law, n·sin θ = const. So the conserved quantity of the variational problem is Snell’s law — and it does not care whether f is a real refractive index or just the chain’s height. Each shape behaves as if it were a ray of light moving through a medium whose “index” is its own price:
The chain’s “refractive index” is its height above the directrix; the bead’s is one-over-its-speed; light’s is the real thing. One conservation law, three materials.
If a single quantity f(y)·sin θ=C is conserved, you don’t need to minimise anything to draw the curve — you just walk forward always keeping that product equal to C. The interactive below does exactly that: one routine, three prices. Pick a material and watch the pen lay down the curve while the gauge on the right — the value of f(y)·sin θ measured live along it — does not move.
Drag the open endpoint. The curve is drawn by the marcher in research/the-chain-obeys-snells-law/engine.mjs — the same code the verifier runs.
This is not a modern re-reading. In 1697 Johann Bernoulli solved the brachistochrone by literally turning the bead into light: slice the fall into thin horizontal layers, let the speed in each layer be v=√(2gy), and refract a ray through them by Snell’s law, sin θ/v = const. As the layers thin, the broken ray bends into the cycloid the race finds — the very same curve, reached through optics. Drag the slider and watch the staircase of refractions converge.
Green staircase: the ray refracting layer by layer, holding sin θ/v constant. White: the exact cycloid. The gap is the error, printed live.
The three curves really are different shapes — a cosh, a cycloid, a gently-bent ray — so the unification is not that they look alike. It is that the rule producing each is identical down to a single replaceable factor, and that factor’s independence from the horizontal forces the same conserved quantity in every case. That is the deep pattern: a symmetry of the cost becomes a constant of the curve. It is the variational twin of the invariants that prove things impossible — there a quantity the rules can’t change forbids an outcome; here a quantity the cost can’t prefer shapes the outcome.
Every claim here is recomputed from scratch — no algebra taken on faith. node
research/the-chain-obeys-snells-law/verify.mjs — 16/16 checks pass:
• the Beltrami identity L − y′Ly′ = f/√(1+y′²) is exact (max residual 1.4×10⁻⁸);
• sin θ = 1/√(1+y′²) is the angle from the vertical;
• the catenary holds y·sin θ = a (rel. std 6×10⁻¹⁵) and solves y·y″=1+y′²;
• the cycloid holds y(1+y′²)=2r and sin θ/v = const;
• Bernoulli’s broken ray → the cycloid as layers thin (max |Δx| 5.3×10⁻³ → 1.9×10⁻⁷), and its invariant equals the cycloid’s;
• one marcher of f·sin θ=C draws all three (catenary Δy 1.3×10⁻⁸, cycloid Δx 4.8×10⁻⁵, light vs Snell-ODE 3×10⁻⁵);
• gradient descent independently relaxes to the catenary and the light ray, and every perturbation raises the cost.
One honesty seam, named not hidden: the bead’s vertical-tangent cusp and
1/√y singularity defeat naive gradient descent on a uniform-x grid (it exploits the quadrature near the
cusp), so the bead is drawn by the first-integral marcher and by Bernoulli’s ray — not by descent. The
constant g is set to 1 throughout; it rescales the bead’s overall constant, never the curve.
This portal continues program P3 — the ground becomes a network — along a new spine: a symmetry of the cost is a constant of the curve. Its three members each carry their own verifier; this page supplies the one law that joins them.