Visual walkthrough — Brachistochrone problem
Step 1 — The bead, the wire, and the question
WHAT. Two nails, high up and lower down and off to the side. We bend a frictionless wire between them and let a bead slide from rest at . Different wire shapes give different travel times. We want the fastest shape.
WHY. Before any maths, we must be crystal clear on what varies (the shape of the wire) and what is fixed (the two endpoints, gravity). We are choosing a whole curve, not a single number — that is what makes this hard.
PICTURE. Three candidate wires between the same two nails: a straight ramp (magenta), a gentle sag (orange), and a steep early plunge (violet). The bead is drawn as a small dot at .

We link this to Calculus of Variations because "pick the best whole curve" is exactly its job.
Step 2 — Time is built from tiny slices
WHAT. Zoom into one microscopic piece of the wire. Over that tiny piece the bead moves a tiny distance at a speed , taking a tiny time .
WHY. We cannot write down "total time" directly — it depends on the whole path. But locally time is easy: it is always distance ÷ speed. If we get the tiny piece right, we add up (integrate) all the tiny pieces to get the total.
PICTURE. A blown-up right triangle sitting on the curve: horizontal leg , vertical leg , and the slanted hypotenuse lying along the wire. An arrow labels the bead's speed along that hypotenuse.

Step 3 — Rewriting the slice length with Pythagoras
WHAT. Turn the hypotenuse into something written purely in .
WHY. The functional we want must be an integral over . So (a slanted length) has to be expressed using (a horizontal step) and the steepness of the curve.
PICTURE. Same triangle as Step 2, now with the ratio marked as the slope — how many units down per unit across.

Step 4 — Speed from energy, not from force
WHAT. Find the speed at depth .
WHY. We could chase forces along a curved wire — a nightmare. Instead we use Conservation of Energy: whatever the wire shape, the speed depends only on how far the bead has dropped. This is the single idea that makes the problem solvable.
PICTURE. A vertical "energy thermometer": at the top all energy is potential (height); lower down, potential has converted into motion (speed). Two beads at depths show the deeper one moving faster.

Step 5 — Assembling the time functional
WHAT. Stack Steps 2–4 into one integral for total time .
WHY. Now every tiny time is written in and the curve's slope. Adding them all up gives a single number that depends on the whole curve — a functional.
PICTURE. The curve sliced into many thin vertical strips; each strip contributes its own , and a bracket shows them summing left-to-right into .

This plays the role of a Lagrangian: the quantity whose integral we optimise.
Step 6 — The Beltrami shortcut (why no is a gift)
WHAT. Extract a conserved quantity instead of solving a hard second-order equation.
WHY. The master tool Euler–Lagrange would give a messy second-order ODE. But when has no explicit , there is a quantity that stays constant along the optimal curve — the Beltrami identity. It hands us a first-order equation for free, just like energy conservation did in Step 4.
PICTURE. A horizontal "conserved level" line: as /position changes along the curve, the combination never moves off that line, while and each wiggle.

Plugging in and simplifying (the numerator collapses to ):
Step 7 — Turning the ODE into a rolling wheel
WHAT. Solve and recognise the shape.
WHY — separate the variables first. From we isolate the slope: Now flip to get alone on one side (separation of variables — put everything with left, everything with right, so each side can be integrated on its own):
- ::: appears because rearranges to it; it is the squared slope.
- The square root of ::: this is what we must integrate, but it is awkward as it stands.
WHY the substitution. The blocker is the . The trick: choose so that and both become perfect squares of sines/cosines, because then the messy square root turns into a clean tangent. The half-angle identity is exactly that pattern — so we set
PICTURE. A circle of radius rolling along the top line; a marked point on its rim traces the curve as the angle turns. The traced arc is the brachistochrone.

Substituting and using :
dx = \tan\!\tfrac\theta2 \cdot \frac{k}{2}\sin\theta\,d\theta = \frac{k}{2}(1-\cos\theta)\,d\theta.$$ Integrating $dx$ term by term ($\int d\theta = \theta$, $\int\cos\theta\,d\theta = \sin\theta$): $$x = \frac{k}{2}(\theta - \sin\theta).$$ > [!formula] The cycloid > With $r=k/2$, > $$x = r(\theta - \sin\theta), \qquad y = r(1-\cos\theta).$$ > - $\theta$ ::: how far the imaginary wheel has rolled (the rolling angle). > - $r$ ::: the wheel's radius, set so the curve passes through $B$. > - $r\theta$ ::: distance the wheel centre has moved; the $-r\sin\theta$ / $-r\cos\theta$ pieces are the rim point wobbling around that centre. This is exactly a [[Cycloid]] — see [[Fermat's Principle]] for the same "fastest path" idea applied to light. --- ## Step 8 — Edge and degenerate cases **WHAT.** Check the boundaries so no scenario surprises the reader. **WHY.** A derivation is only trustworthy if the ends behave. **PICTURE.** Three mini-panels: (a) at the very top $y\to 0$ where the curve is vertical; (b) the lowest point $\theta=\pi$; (c) the straight-line "cheat" for comparison, clearly slower. ![[deepdives/dd-maths-4.10.14-d2-s08.png]] > [!example] The three limits > - **Top, $y\to0$:** $v=\sqrt{2gy}\to0$ (bead starts from rest) and slope $y'\to\infty$ — the cycloid leaves $A$ *vertically*. Time stays finite because the fast-growing speed offsets the steepness. > - **Bottom, $\theta=\pi$:** $y=2r$ (deepest), slope $y'=0$ — the curve is momentarily flat, bead fastest. > - **Straight line (degenerate "wire"):** allowed but *not* optimal; it keeps $v$ small early. It is the shortest $\int ds$, never the shortest $\int ds/v$. --- ## The one-picture summary ![[deepdives/dd-maths-4.10.14-d2-s09.png]] One figure with the whole story: the rolling wheel (top), the cycloid it traces (fastest, violet), the straight chord (slower, magenta), the tiny $ds$-triangle inset, and the labels $v=\sqrt{2gy}$, $y(1+y'^2)=k$, $x=r(\theta-\sin\theta),\,y=r(1-\cos\theta)$ placed where each was born. > [!example] Where the $T=\pi\sqrt{r/g}$ time comes from > For the descent from the cusp ($\theta=0$) to the lowest point ($\theta=\pi$), write arc length and speed parametrically: > $$ds = r\sqrt{2(1-\cos\theta)}\,d\theta,\qquad v=\sqrt{2gy}=\sqrt{2gr(1-\cos\theta)}.$$ > Then the $(1-\cos\theta)$ factors **cancel** inside $ds/v$: > $$T=\int_0^\pi \frac{r\sqrt{2(1-\cos\theta)}}{\sqrt{2gr(1-\cos\theta)}}\,d\theta = \int_0^\pi \sqrt{\frac{r}{g}}\,d\theta = \pi\sqrt{\frac{r}{g}}.$$ > That cancellation is the tautochrone property: the total depends only on $r$ and $g$. > [!recall]- Feynman retelling — the whole walkthrough in plain words > A marble on a bendy slide, two fixed corners. Cut the slide into hairs: each hair takes (its length)÷(the marble's speed). Pythagoras gives the length from how steep the hair is; energy conservation gives the speed just from how far the marble has dropped (heavier marbles don't matter — mass cancels). Add up all the hairs → total time as one recipe $F$. That recipe never mentions the horizontal position directly, and *that* laziness is a gift: it means a certain combination stays constant the whole way down (Beltrami), which turns a hard equation into an easy first-order one, $y(1+y'^2)=k$. Solve it and — surprise — the answer is the path traced by a dot on a rolling wheel: a cycloid. It plunges nearly straight down first to get fast early, then coasts across; going farther-but-faster beats shorter-but-slower. Bonus: on that curve the marble takes the *same* time to the bottom no matter where you drop it. > [!recall]- > Where does $v=\sqrt{2gy}$ come from? ::: Energy conservation: $\tfrac12 mv^2=mgy$, mass cancels. > Why use Beltrami instead of Euler–Lagrange? ::: $F$ has no explicit $x$, so $F-y'F_{y'}=C$ is conserved and gives a first-order ODE. > What ODE do we get and what solves it? ::: $y(1+y'^2)=k$, solved by the cycloid $x=r(\theta-\sin\theta),\,y=r(1-\cos\theta)$. > Time from cusp to lowest point? ::: $T=\pi\sqrt{r/g}$ (the $(1-\cos\theta)$ factors cancel in $ds/v$).