Visual walkthrough — Lagrangian L = T − V
Step 0 — The one idea, before any symbols

Look at the figure. The red curve is the path nature actually takes. The thin black curves are imaginary competitors — routes the object could have taken but didn't. Our whole job is to find a rule that singles out the red one from the crowd.
We will link this to Generalized Coordinates and Constraints later; for now think " = position."
Step 1 — Give each path ONE number: the action
WHAT. To compare paths we need a scoreboard: one number per curve, so we can ask "which curve scores best?" That number is the action .
WHY this and not something simpler? A single instant's energy is not enough — a path is a whole history, so its score must gather information from every moment along the way. The mathematical tool that "adds up a quantity over a continuous stretch" is the integral . That is exactly why an integral appears and not just a sum of a few points: time is continuous, so we need the continuous version of addition.
PICTURE. At every instant compute the number (we will say what is in Step 2), plot against time, and shade the area underneath. That shaded area is the action.

Different paths give differently-shaped -curves, hence different areas, hence different scores. Good — now we can compete them.
Step 2 — What is ? Moving-energy minus stored-energy
WHAT. The height we integrate is : kinetic energy minus potential energy, measured at that instant on that path.
WHY these two energies, why the minus? We do not justify the minus yet — that is the payoff of the whole derivation (Step 8). For now just hold the definition. Kinetic energy measures how fast the object moves; potential energy measures how much stored push it sits in (height in gravity, stretch in a spring).
PICTURE. Two stacked bars at one frozen instant: a bar and a bar. The value of at that instant is the top of minus the top of .

Step 3 — The competing paths: wiggle the true one
WHAT. Take the real path and build a nearby fake path by adding a tiny wiggle . The fake path is .
WHY. "Stationary" (our target condition) means: nudge the path a little and the score barely moves. Just like the bottom of a valley — step sideways and your height barely changes. To test that, we need a controlled small nudge, and is exactly that nudge.
WHY fixed endpoints? We are comparing routes between the same start event and the same end event — the question is which way you go, not where you end up. So the wiggle must be zero at both ends:
PICTURE. The red true path, a black wiggled path hugging it, and the vertical gap between them — pinned shut at both ends.

The valley analogy is the load-bearing intuition: at the very bottom of a valley the ground is flat — first-order change is zero in every direction. Stationary action = standing at the bottom of the action-valley over the space of all paths.
Step 4 — How the score changes: vary
WHAT. Compute the change = (score of wiggled path) − (score of true path), keeping only first order in .
WHY. Because the whole game is . We must find a formula for before we can set it to zero.
The wiggle changes both the position () and the velocity (). A tiny change in an ingredient changes by (rate responds to that ingredient) × (size of the change) — that "rate of response" is a partial derivative . This is why partial derivatives enter: they measure how sensitively reacts to each of its knobs separately.
PICTURE. Two side-by-side sensitivity slopes: how climbs as you push , and how climbs as you push .

The two terms are a nuisance: one holds , the other holds . We cannot factor out a common yet. Fixing that is Step 5.
Step 5 — Integration by parts: make every term carry
WHAT. Rewrite the second term so it also multiplies plain instead of .
WHY this tool? is the derivative of . Integration by parts is precisely the tool that moves a derivative off one factor and onto the other inside an integral — it is the reverse of the product rule. That is exactly the surgery we need: it strips the time-derivative off so we can factor out of everything.
Using :
= \underbrace{\left[\frac{\partial L}{\partial \dot q}\,\delta q\right]_{t_1}^{t_2}}_{\text{boundary term}} - \int_{t_1}^{t_2} \frac{d}{dt}\!\left(\frac{\partial L}{\partial \dot q}\right)\delta q\,dt$$ **The boundary term dies.** It is evaluated only at the two endpoints — and there $\delta q = 0$ (Step 3, the pinned ends). This is *why fixed endpoints mattered*: they are the reason the boundary term vanishes and only the clean integral survives. **PICTURE.** The boundary term shown as two dots at $t_1$ and $t_2$, both crushed to zero by the pinned wiggle; the interior integral survives. ![[deepdives/dd-physics-2.1.04-d2-s06.png]] > [!formula] After parts, with the boundary killed > $$\int_{t_1}^{t_2}\frac{\partial L}{\partial\dot q}\,\delta\dot q\,dt = -\int_{t_1}^{t_2}\frac{d}{dt}\!\left(\frac{\partial L}{\partial\dot q}\right)\delta q\,dt$$ > - $\left[\;\cdot\;\right]_{t_1}^{t_2}$ ::: "evaluate at the top end minus the bottom end" — both give $0$ here > - $\dfrac{d}{dt}\!\left(\dfrac{\partial L}{\partial\dot q}\right)$ ::: the derivative got shoved onto the velocity-sensitivity instead of onto $\delta q$ > - the minus sign ::: the cost of moving the derivative (product-rule bookkeeping) --- ## Step 6 — Factor $\delta q$ and invoke the "any wiggle" lemma **WHAT.** Substitute Step 5 back into Step 4. Now *both* terms multiply $\delta q$, so pull it out: $$\delta S = \int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot q}\right)\delta q\,dt.$$ **WHY the "arbitrary wiggle" argument?** We demanded $\delta S = 0$ for the *true* path. But $\delta q$ can be **any** tiny pinned bump — a bump near the start, a bump near the middle, anywhere. If the bracket were nonzero somewhere, we could choose a bump concentrated *right there* with the matching sign, making the integral nonzero — contradiction. The only way the area is zero for *every* possible bump is if the bracket itself is zero everywhere. (This is the **fundamental lemma of the calculus of variations**.) **PICTURE.** A spotlight bump placed at one spot; if the bracket (shown as a shaded background sign) is nonzero there, the shaded area is nonzero — so the bracket must be flat zero all along. ![[deepdives/dd-physics-2.1.04-d2-s07.png]] > [!formula] The Euler–Lagrange equation > $$\boxed{\;\frac{d}{dt}\frac{\partial L}{\partial \dot q} - \frac{\partial L}{\partial q} = 0\;}$$ > - $\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q}$ ::: rate of change of the "velocity-response" — this will become mass × acceleration > - $\dfrac{\partial L}{\partial q}$ ::: the "position-response" — this will become the force > - $=0$ ::: the two must balance at every instant on the true path This is the master result; see [[Euler–Lagrange Equation]] and [[Principle of Least Action]] for its own dedicated treatments. --- ## Step 7 — Feed in $L = T - V$ and watch Newton appear **WHAT.** Take the simplest case: one particle in one dimension, position $x$, kinetic energy $T=\tfrac12 m\dot x^2$, potential $V=V(x)$. So $L=\tfrac12 m\dot x^2 - V(x)$. Compute the two pieces of Euler–Lagrange. **WHY this case first?** It is the cleanest place to check our machine against something we already trust — [[Newton's Second Law]]. If the abstract result reproduces $F=ma$ here, the whole construction is validated. Compute each piece (remember: $x$ and $\dot x$ are independent knobs, Step 2): $$\frac{\partial L}{\partial \dot x} = m\dot x,\qquad \frac{d}{dt}\big(m\dot x\big)= m\ddot x,\qquad \frac{\partial L}{\partial x} = -\frac{dV}{dx} = F.$$ Plug into $\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot x} - \dfrac{\partial L}{\partial x} = 0$: $$m\ddot x - F = 0 \quad\Longrightarrow\quad \boxed{F = m\ddot x}.$$ **PICTURE.** The abstract EL boxes on the left morph into the concrete Newton boxes on the right, arrow by arrow. ![[deepdives/dd-physics-2.1.04-d2-s08.png]] > [!formula] Term-by-term dictionary > $$\underbrace{\frac{d}{dt}(m\dot x)}_{\text{= } m\ddot x \text{ (mass}\times\text{accel)}} - \underbrace{\Big(-\frac{dV}{dx}\Big)}_{\text{= force } F} = 0$$ > - $m\dot x$ ::: this is exactly the **generalized momentum** $p=\partial L/\partial\dot x$ (see [[Generalized Momentum and Conservation]]) > - $m\ddot x$ ::: mass times acceleration > - $-dV/dx$ ::: force = minus the slope of the potential hill (things roll downhill) > [!mistake] Why $T-V$ and not $T+V$? (now we can see it) > Redo Step 7 with $L=T+V$. Then $\partial L/\partial x = +dV/dx = -F$, and Euler–Lagrange gives $m\ddot x + F = 0$ — the **wrong sign**, anti-physics. Only the **minus** in $T-V$ lets the force term land with the sign Newton demands. That single minus is the entire reason for the definition. (Contrast with the total energy $E=T+V$ and the [[Hamiltonian H = T + V|Hamiltonian]] — different object, different job.) --- ## Step 8 — Every case: signs, degenerate inputs, limits We must never leave you facing a scenario we didn't show. **Case $V=0$ (free particle).** Then $\partial L/\partial x = 0$, so $\dfrac{d}{dt}(m\dot x)=0$: momentum is constant, motion is a straight line at constant speed. On the action picture the $V$ bar vanishes and $L=T$ alone. **Case $F=0$ region but $V\neq 0$ constant.** A flat potential ($V=$const) has zero slope, so $-dV/dx=0$: same straight-line motion. *Adding a constant to $V$ changes nothing* — only the **slope** of $V$ matters, which is why potential energy has an arbitrary zero. **Sign of the force.** If the potential slopes *up* to the right ($dV/dx>0$), then $F=-dV/dx<0$ pushes *left* — downhill. If it slopes *down* to the right, force pushes right. Either way: **toward lower potential.** Both signs shown in the summary figure. **Degenerate wiggle $\delta q \equiv 0$.** Then $\delta S=0$ trivially for *any* path — it tells us nothing. That is why the lemma insists $\delta q$ range over *all* nonzero bumps; the "arbitrary" is essential, not decorative. **Limit of many coordinates.** Nothing in Steps 3–6 used "one dimension." Repeat with an independent wiggle $\delta q_i$ for each coordinate and you get one Euler–Lagrange equation *per* coordinate — they don't interfere because each bump is chosen independently. > [!recall]- Self-check the cases > If $V$ is constant, what is the motion? ::: straight line, constant velocity — constant $V$ has zero slope so zero force. > Which way does force point when $V$ slopes upward to the right? ::: to the left, i.e. toward lower potential ($F=-dV/dx<0$). > Why must $\delta q$ be arbitrary and not one fixed shape? ::: a single fixed wiggle gives one equation; only *all* wiggles force the whole bracket to vanish everywhere. > How many EL equations for $n$ coordinates? ::: exactly $n$ — one independent wiggle each. --- ## The one-picture summary ![[deepdives/dd-physics-2.1.04-d2-s09.png]] Read the flow top to bottom: **many paths** → each gets a **score** (area under $T-V$) → demand the **wiggle changes nothing** → **integration by parts + pinned ends** → **Euler–Lagrange** → plug in $T-V$ → **$F=ma$**. ```mermaid flowchart TD A["Many possible paths q of t"] --> B["Score each path S = integral of L dt"] B --> C["L = T minus V at each instant"] C --> D["Wiggle true path by delta q, ends pinned to zero"] D --> E["First order change delta S in two terms"] E --> F["Integration by parts, boundary term dies"] F --> G["Factor delta q, arbitrary wiggle lemma"] G --> H["Euler Lagrange equation"] H --> I["Insert T minus V, one particle"] I --> J["Newton F = m a recovered"] ``` > [!recall]- Feynman retelling — the whole walkthrough in plain words > Draw a graph of *where the object is* against *time*. The real trip is one curve; imagine a swarm of nearly-identical fake curves crowding around it, all starting and ending at the same two dots. > > Give every curve a **score**: at each moment take "moving-energy minus stored-energy," and add that up across the whole trip — that total is the *action*. Nature's chosen curve is the one sitting at the *bottom of a valley* of scores: nudge it a hair in any direction and the score refuses to change. > > To cash that in, wiggle the real curve by a tiny amount that's glued to zero at the two ends. Work out how the score shifts. One piece of the shift is awkward because it involves the *slope* of the wiggle, not the wiggle itself — so we use a clean trick (integration by parts) to move that slope off, and the glued-down ends make the leftover boundary junk disappear. > > Now the whole shift is (some bracket) times (the wiggle), added over the trip. Since we can wiggle *anywhere* we like and the shift must still be zero, the bracket has to be zero *everywhere*. That bracket-equals-zero **is** the Euler–Lagrange equation. > > Finally, pour in real energies — $\tfrac12 m v^2$ for moving, $V$ for stored — and the equation spits out "mass times acceleration equals minus the slope of the potential," which is just **$F=ma$**. The *minus* in "moving minus stored" is what makes the force come out pushing the right way. That's the whole show. --- ## Connections - [[Euler–Lagrange Equation]] — the boxed result of Step 6, on its own terms. - [[Principle of Least Action]] — the $\delta S = 0$ demand of Steps 3–4. - [[Generalized Coordinates and Constraints]] — what $q$ may be; why constraint forces vanish. - [[Generalized Momentum and Conservation]] — the $m\dot x = \partial L/\partial\dot x$ of Step 7. - [[Hamiltonian H = T + V]] — the $T+V$ object that is *not* the Lagrangian. - [[Newton's Second Law]] — recovered in Step 7 as the sanity check.