2.1.19 · D3Analytical Mechanics

Worked examples — Principle of least action — Hamilton's principle derivation

3,130 words14 min readBack to topic

The scenario matrix

Before solving anything, let us name every case class this topic can throw at you. Each row is a "flavour" of problem; the last column tells you which worked example below covers it.

# Case class What makes it distinct Covered by
A No potential () ⟹ a conserved momentum Ex 1
B Constant force ( linear in ) ⟹ constant acceleration Ex 2
C Restoring force ( quadratic) oscillation, sign of stiffness matters Ex 3
D Sign flip / degenerate stiffness ( or ) runaway vs. free motion — limiting behaviour Ex 4
E Curvilinear / non-Cartesian coordinate () kinetic energy is not ; new geometry Ex 5
F Cyclic (ignorable) coordinate doesn't contain Noether's Theorem conserved quantity Ex 6
G Explicit time dependence ( has in it) energy not conserved; forced system Ex 7
H Real-world word problem translate words → , , Ex 8
I Exam twist: free endpoint boundary term does not die ⟹ natural boundary condition Ex 9

We will now walk A → I in order. Every numeric answer at the bottom of the page is machine-checked.


Ex 1 — Case A: free particle (no potential)

Step 1. Compute the two partial derivatives. Why this step? Euler–Lagrange needs exactly these two ingredients. Here contains no , only — that is what "no potential" means.

Step 2. Plug into : Why this step? A zero means the momentum has zero time-derivative — momentum is conserved. This is your first taste of Noether's Theorem: no in -momentum conserved.

Step 3. Integrate: . With , : Why this step? Constant velocity is the only motion with ; fixed endpoints pin the constant.

Step 4. Momentum .

Verify: Units: ✅. Sanity: no force ⟹ straight uniform motion. This constant-speed path makes stationary (here genuinely a minimum for short times — any wobble raises the average of ), exactly as Calculus of Variations promises. Answer .


Ex 2 — Case B: falling body (constant force)

Step 1. , so . Why this step? This is the "momentum rate" term of Euler–Lagrange.

Step 2. . Why this step? Differentiate the potential debt ; the linear potential gives a constant slope — that is the signature of a constant force.

Step 3. EL: . Why this step? Mass cancels — heavy and light stones fall alike, and the minus says "downward".

Step 4. From rest at origin, . At : .

Verify: Units of : ✅. Sign negative = fell downward ✅. Answer , recovering Newton's Second Law .


Ex 3 — Case C: simple harmonic oscillator (restoring force)

Step 1. . Why this step? Momentum-rate term again.

Step 2. . Why this step? A quadratic potential differentiates to a linear restoring force — the hallmark of oscillation. The minus pulls back toward .

Step 3. EL: with . Why this step? Matching to reads off the frequency by inspection.

Step 4. ; period .

Verify: Units of : ✅. Stiffer ⟹ larger ⟹ faster ✅. Answers , .

Figure — Principle of least action — Hamilton's principle derivation
Figure s01 — the three stiffness regimes. This plot draws the potential for (lavender, a valley: motion oscillates), (mint, dead flat: free particle), and (coral, an upside-down hill: motion runs away). Its pedagogical job is to make the sign of visible as the shape of the landscape — a stable minimum versus an unstable maximum — which is precisely the distinction Ex 4 exploits algebraically.


Ex 4 — Case D: degenerate & sign-flipped stiffness (limiting behaviour)

Step 1. The EL equation from Ex 3 holds for any : . Why this step? Reuse the machinery; only the number changes.

Step 2 — case (a), . Then : the oscillator degenerates into the free particle of Ex 1. Why this step? This is the limiting value — the SHM answer means "infinitely long period", i.e. no oscillation at all.

Step 3 — case (b), . Write : with . Why this step? A positive coefficient on (from the flipped sign) turns sines into exponentials: — the solution runs away. This is why gives stationary, not minimum: on the hilltop the action is a saddle/maximum, matching the parent's first "mistake" callout.

Step 4. Numeric growth rate for (b): .

Verify: (a) ✅ degenerate. (b) , so displacement grows like — unstable ✅. This edge case is exactly where "least action" is a lie and "stationary action" is the truth.


Ex 5 — Case E: simple pendulum (curvilinear coordinate)

Step 1 — kinetic energy in the angle. The bob moves on a circle of radius ; its speed is . So Why this step? This is the whole point of a curvilinear coordinate: distance travelled per unit angle is , so the "effective mass" for is — a moment of inertia. Look at the figure: the arc length is .

Step 2 — potential energy. Height above the lowest point is , so . Why this step? Raising the bob costs potential debt; the geometry of the circle sets the height.

Step 3 — assemble and apply EL. .

  • .
  • .

EL: Why this step? Same six-step machine; only the symbols changed because the geometry did.

Step 4 — small angle limit. For small , , so , .

Verify: Units ✅. Structure matches Ex 3's SHM with playing the role of ✅. Answer .

Figure — Principle of least action — Hamilton's principle derivation
Figure s02 — pendulum geometry. This diagram earns every symbol used in Ex 5: the lavender rod of length , the coral bob , the mint angle measured from the dashed vertical, the butter-coloured arc whose length is (so speed ), and the vertical drop marking the height . Its pedagogical role is to show why and before we ever write them — the geometry is the derivation.


Ex 6 — Case F: cyclic coordinate & a conserved quantity

Step 1. Test the -Euler–Lagrange equation: . Why this step? We must build the two ingredients for the coordinate specifically.

Step 2. (cyclic!) and . Why this step? A cyclic (ignorable) coordinate is one absent from ; its vanishes.

Step 3. EL then reads Why this step? Zero force-slot ⟹ the conjugate momentum is conserved. is angular momentum — this is Noether's Theorem made concrete: rotational symmetry ↔ conserved angular momentum.

Step 4.

Verify: Units = angular momentum ✅. Answer . (The link to Hamiltonian Mechanics: is exactly the momentum you'd carry into a Legendre transform.)


Ex 7 — Case G: explicitly time-dependent Lagrangian (forced system)

Step 1. . Why this step? Momentum-rate term.

Step 2. . Why this step? Differentiating w.r.t. treats as frozen — this exposes the time-varying driving force.

Step 3. EL: Why this step? This is Newton with an oscillating external force. Because depends on explicitly, the total energy is not conserved — energy is pumped in and out by the drive.

Step 4. At : the drive phase is , and , so Why this step? Divide the EL equation by and evaluate the cosine at the given instant — the acceleration simply tracks the driving force.

Verify: Units ✅. Answer . Contrast Ex 6 (symmetry ⟹ conservation) with this (broken time-symmetry ⟹ no energy conservation).


Ex 8 — Case H: real-world word problem (Atwood machine)

Step 1 — one coordinate for the whole system. The string ties them: if drops , rises , and both move at speed . Kinetic energy: Why this step? The constraint collapses two objects into one degree of freedom — the elegance of Lagrangian bookkeeping.

Step 2 — potential energy. Take down as positive and put the zero of height at the pulley. Then has descended (height , PE ) while has risen (height , PE ). Total: Why this step? Height changes are equal and opposite; the potential debt therefore depends only on the difference of the weights. This is the piece missing from a naive "just write " attempt — no , no forces.

Step 3 — assemble & apply EL.

  • Why? momentum-rate term for the combined mass.
  • Why? derivative of the linear potential — the net driving weight.

EL:

Step 4 — solve for the acceleration.

Verify: Since , : the heavier side descends ✅. Magnitude because both masses must be accelerated together ✅. Units ✅. Answer , matching the standard Atwood result from Newton's Second Law.


Ex 9 — Case I: exam twist — a free endpoint

Step 1 — vary the path, keeping the boundary term. Following the parent's integration by parts but not discarding the endpoints: Why this step? Same machine as the parent — but now we may not throw the boundary term away, because is no longer forced to zero.

Step 2 — split the two demands. The interior integral must vanish for arbitrary (giving the usual EL equation), and the surviving boundary piece must vanish on its own. At the fixed start kills that end; at the free end is arbitrary, so its coefficient must be zero: Why this step? Whenever a factor multiplies an arbitrary quantity in a sum forced to zero, that factor must itself vanish. This is the natural boundary condition the parent's last "mistake" callout warned about.

Step 3 — interpret. says the bead arrives at the free end with zero momentum — it coasts to a halt. Physically, with nothing pinning the finish, the laziest path spends the least by simply not moving: . Why this step? The interior EL equation still gives (constant velocity); the free-end condition then pins that constant to zero velocity.

Step 4 — numeric check of the resulting motion. With and everywhere, for all , and the momentum at the free end is .

Verify: The natural boundary condition gives . For the whole path is , momentum ✅. Contrast with Ex 1, where a fixed finish forced : same , different boundary data, different physics. Answer: .


Recall Which case gives a

conserved quantity, and why? A coordinate missing from (cyclic) ::: its conjugate momentum is conserved — this is Noether's Theorem (Ex 6, and Ex 1's momentum).

Recall Why is "least action" a misnomer, shown by which example?

Ex 4(b): with negative stiffness the action is a saddle/maximum, so only stationary is correct, not minimum. ::: correct.

Recall When does the boundary term survive integration by parts?

When an endpoint is free (Ex 9) ::: giving the natural boundary condition there.

See also: Fermat's Principle (the optics twin of stationary action) and the Feynman Path Integral (where all paths contribute, and the stationary one dominates).