2.1.19 · D4Analytical Mechanics

Exercises — Principle of least action — Hamilton's principle derivation

3,600 words16 min readBack to topic

Everything on this page runs on three objects. Let us pin them down before we touch a single exercise.


Level 1 — Recognition

L1.1 — Identify the Lagrangian

A ball of mass slides on a horizontal frictionless table (no gravity does work vertically, height fixed). Write , , and using coordinate .

Recall Solution

WHAT: is the energy of motion, the stored energy. Kinetic: . Potential: with height fixed and no spring, (any constant works; a constant never affects Euler–Lagrange since its derivatives are zero). WHY it matters: this is the free particle — the simplest test case. With in hand every later step is mechanical.

L1.2 — Spot the coordinate and the potential

A pendulum bob of mass on a rigid massless rod of length swings in a vertical plane. What is the natural generalized coordinate, and what is the potential energy in terms of it? (Measure height from the lowest point.)

Recall Solution

WHAT: one number fixes the bob's position on its circular arc — the swing angle from the downward vertical. So . WHY this coordinate: the rod is rigid, so the radius never changes; only the angle is free. Using instead of means one coordinate instead of two plus a constraint.

Reading the figure below. The dashed vertical line is the reference: it points straight down from the pivot to the lowest point of the arc (the open circle). The solid rod makes angle with that dashed line. The red segment measures the bob's height above the lowest point. Notice from the geometry: the pivot sits a distance above the lowest point, while the bob sits a distance below the pivot — so the bob is above the lowest point. That difference is exactly the red segment: Check the extremes on the figure: at the rod lies along the dashed line, red segment shrinks to zero (); swing out and the red segment grows, so grows. Good.

Figure — Principle of least action — Hamilton's principle derivation

L1.3 — Which name is correct?

True or false: "The principle is called least action, so the action is always a minimum." (Recall and = its first-order change under an endpoint-fixed wiggle, both defined at the top of this page.)

Recall Solution

False. The condition is — i.e. the first-order change in the action vanishes for every allowed wiggle. That makes the action stationary, not necessarily minimal. It can be a minimum, a saddle point, or (past a conjugate point) a maximum. The honest name is the principle of stationary action.


Level 2 — Application

L2.1 — Free particle equation of motion

Using , run Euler–Lagrange and find .

Recall Solution

Step (WHAT/WHY): compute the two pieces the equation needs. (derivative treating as a slot), so . (no appears). Euler–Lagrange: . Integrate twice: (const), . Straight line, uniform speed.

L2.2 — Vertical fall

, where is measured positive upward (increasing = higher up). Find the equation of motion.

Recall Solution

Orientation flag: with positive upward, gravitational potential energy grows with height, so and . This sign convention is what makes the answer come out as downward acceleration. . . EL: . ✅ Free fall: the minus sign means acceleration points downward (toward decreasing ), exactly as gravity should.

L2.3 — Harmonic oscillator frequency

with , . Find the equation of motion and the numeric angular frequency .

Recall Solution

The piece (WHY): — only the term contains ; its slot-derivative is . Then . The piece (WHY): . Reason: differentiate with respect to term by term. The kinetic term has no bare , so it contributes . The potential term differentiates by the power rule (): . That is the whole . EL: , with . Numbers: .

L2.4 — Pendulum equation of motion

Using from L1.2, with and , derive the exact pendulum equation.

Recall Solution

WHY : the bob speed along its arc is (arc length , differentiate). Square it, halve, times . . WHY : the kinetic term has no bare , so it gives . The potential part of is . Differentiate with respect to : the constant gives , and , so gives . EL: . For small , , giving .


Level 3 — Analysis

L3.1 — Why does adding a constant to change nothing?

Show that replacing (constant ) leaves the equation of motion untouched.

Recall Solution

New Lagrangian . In Euler–Lagrange we need and . (a constant has zero derivative). (same reason). Both pieces are identical, so the equation is identical. WHY it matters: only differences in potential energy have physical meaning — you may put the zero of wherever is convenient.

L3.2 — Total time derivative added to

Show that gives the same equation of motion for any smooth .

Recall Solution

The added piece is . Its contribution to the action is — a pure boundary term. Since the endpoints are fixed, this boundary value is a constant with respect to any path variation. Its variation is zero: . Therefore , and the true path — the one making — is unchanged. WHY it matters: the Lagrangian is not unique; this freedom underlies gauge choices and canonical transformations in Hamiltonian Mechanics.

L3.3 — Cyclic coordinate and conservation

Suppose does not contain the coordinate itself (only ). Such a is called cyclic. What is conserved, and why?

Recall Solution

If is absent then . Euler–Lagrange becomes The conserved quantity is the generalized momentum. WHY it matters: a symmetry (nothing depends on , i.e. shifting leaves physics unchanged) produces a conservation law. This is the seed of Noether's Theorem.


Level 4 — Synthesis

L4.1 — Bead on a rotating wire (effective potential)

A bead of mass slides frictionlessly along a straight horizontal wire that is forced to rotate about a vertical axis at constant angular speed . Let be the bead's distance from the axis. With and , find the equation of motion for .

Recall Solution

WHY that : the bead's velocity has a radial part (sliding out) and a tangential part (carried around by rotation). Speed. . . (differentiate by the power rule: ). EL: . Interpretation: the bead accelerates outward — the familiar centrifugal push, arising here with no force diagram, purely from the term acting like an inverted potential.

L4.2 — Two coordinates: projectile

A particle moves in a vertical plane under gravity, . There are now two coordinates. Write both Euler–Lagrange equations.

Recall Solution

Euler–Lagrange applies once per coordinate (each gets its own equation). For : , . For : , . So (uniform horizontal drift) and (vertical free fall) — the projectile parabola. WHY it matters: because is cyclic ( has no bare ), is conserved — horizontal momentum, exactly as expected.

L4.3 — Fermat as least action of light

Fermat's Principle says light takes the path of stationary time. A ray goes from point in a medium of speed to point in a medium of speed , crossing a flat boundary. Show that stationarity of travel time gives Snell's law .

Recall Solution

Reading the figure below. The horizontal black line is the boundary between the two media. Point sits in the top medium (light speed ), point in the bottom medium (light speed ). The red bent line is the ray: it travels straight from down to a crossing point on the boundary, then straight on to . The single number we get to choose is , where it crosses. The dashed vertical line is the normal (perpendicular to the boundary) through the crossing point. The ==angle of incidence is measured between the red incoming ray and that dashed normal; the angle of refraction == between the red outgoing ray and the normal. Those two marked angles are what the algebra will pin down.

Figure — Principle of least action — Hamilton's principle derivation

Time = (distance/speed) in each medium: Stationary means : Now read the two right triangles in the figure: in the upper triangle the side opposite (the horizontal run from the normal across to ) is and the hypotenuse is the red segment , so . Likewise in the lower triangle . Substituting, WHY it matters: the same variational logic that ran mechanics runs optics — one crossing point plays the role of the whole path's wiggle. This kinship is why Feynman Path Integral later unifies both.


Level 5 — Mastery

L5.1 — Brachistochrone: set up the functional

A bead slides frictionlessly under gravity from to a lower target point , where is the horizontal distance to and its depth. Among all curves joining them, which minimizes travel time? Set up the action-like functional to minimize (you do not need to solve the cycloid ODE), and identify the integrand .

Recall Solution

Orientation flag: take positive downward (increasing = deeper below the start). This is opposite to the upward-positive convention of L2.2 — we choose it here so the drop below the start is simply and the speed formula has no stray minus sign. The horizontal endpoint is . WHAT to minimize: total travel time , where is a little piece of arc length along the curve and the bead's speed there. The arc-length piece (WHY): for a graph , a small step raises the curve by where . By Pythagoras the slanted step is . The speed piece (WHY): energy conservation with measured downward — the bead has dropped a height , converting potential to kinetic: . Put them together: Here plays the role that time played in mechanics, and plays the role of the path ; the integrand plays the role of the Lagrangian . WHY this matters: this is precisely a Calculus of Variations problem — the same Euler–Lagrange engine solves it. Since has no explicit , the Beltrami identity () applies and yields the cycloid. (Solving that ODE is the next step; here we only needed the correct functional and integrand .)

L5.2 — Minimum vs. saddle: the conjugate point

Explain, with the oscillator, why the action is a genuine minimum only for short enough time intervals, and becomes a saddle beyond half a period.

Recall Solution

WHAT we test. The true path already satisfies (first variation vanishes). To classify it we examine the second variation — the leading change in when we add a small endpoint-vanishing wiggle . Writing the perturbed action to second order, The path is a minimum iff for every allowed , and a saddle if some makes . WHY the oscillator turns. For one finds Trade the term for by integrating by parts (the boundary dies since ): The sign of this is governed by the operator . A nonzero wiggle that both vanishes at the two endpoints and satisfies is exactly a sine that returns to zero — and the first time it can do that is when , i.e. after half a period . That instant is the conjugate point. Reading off the three regimes.

  • : no allowed wiggle can drive negative, so for all ⇒ the path is a genuine minimum. WHY: the restoring "spring cost" cannot outweigh the kinetic penalty over such a short span.
  • (the conjugate point): the special sine makes — the second variation goes flat, marking the exact borderline.
  • : a wiggle now exists that makes ⇒ the stationary path is a saddle, not a minimum. WHY: over a long enough span the potential term wins for that shape, so a competing path lowers the action. WHY it matters. This is the concrete proof behind L1.3: "least action" is a misnomer — past the conjugate point the true path is stationary but not least.

L5.3 — Momentum conservation from translation symmetry (mini-Noether)

Two particles interact through a potential depending only on their separation: . Show total momentum is conserved.

Recall Solution

Write for the derivative of with respect to its single argument . Euler–Lagrange for each particle: : . Since , this gives . : (the chain rule flips the sign since enters as ), giving . Add the two equations of motion: . So . ✅ WHY it works: shifting both particles by the same amount () leaves — and thus — unchanged. That translation symmetry is momentum conservation, the Noether's Theorem statement in miniature.


Recall One-line summary of the whole ladder

Every problem here is the same move: build , feed it to , one equation per coordinate — and read off physics (motion, conservation, optics, minimality).