2.1.5 · D2Analytical Mechanics

Visual walkthrough — Derivation of Euler-Lagrange equations from D'Alembert's principle

2,234 words10 min readBack to topic

Step 0 — The picture we are trying to fix

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Look at the picture. Two arrows leave the bead:

  • the burnt-orange arrow is the applied force — here, gravity. The little just means "applied", i.e. real physics we care about.
  • the teal arrow is the constraint force — the wire's push. It points across the wire.

The green dashed arrow is the only direction the bead is allowed to move: along the wire. Call a tiny imagined step in that allowed direction .

Why the dot product, and not something else? Because our whole trick is "does the wire's push help the bead move along its allowed step?" That is exactly the question "how aligned are these two arrows?" — and the tool that answers alignment is the dot product. Perpendicular arrows give ; that zero is what will delete the constraint force.


Step 1 — Kill the constraint force by projecting

WHAT. Newton says, for each particle , Here is momentum (mass velocity), and the dot on means "rate of change per second". So — just , Newton's familiar form, moved to one side.

WHY. We dot the whole line with the allowed step and add up over every particle: The constraint force is perpendicular to (teal green in Step 0), so . It vanishes. What remains is D'Alembert's principle:

PICTURE. The teal arrow's shadow onto the green line has length zero — that is the geometric meaning of "does no virtual work."

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 2 — Trade for smart coordinates

WHAT. Instead of describing the bead by (which must obey the wire's equation), we pick a coordinate that already lives on the wire: for a pendulum the angle ; for a bead the distance-along-the-wire . Call these generalized coordinates . The position is then a function . See Constraints and generalized coordinates.

WHY. With chosen this way, every value of is automatically legal — the constraint is baked in, and we never write it again. A tiny allowed step becomes Read this term by term:

  • (the curly = "partial derivative": change a hair, freeze all other 's and time, ask how moves) is an arrow pointing along the wire — the direction turning knob pushes the particle.
  • = how far we turn knob .
  • The sum adds up the pushes from all knobs.
  • No term appears — because time is frozen, .

PICTURE. Each knob contributes a tangent arrow; is their weighted sum. The knobs are independent — you can turn each without disturbing the others. Hold onto that word independent; it is the punchline of Step 7.

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 3 — Split into a "force part" and an "inertia part"

WHAT. D'Alembert has two pieces. Substitute the Step-2 expression into each:

WHY (force part). Plugging in and gathering the : The bundle is the generalized force — the real forces, projected (again a dot product!) onto knob . See Generalized forces and potentials.

PICTURE. The orange force arrow casts a shadow onto each tangent arrow; the length of that shadow is .

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

The inertia part, , contains an acceleration . Accelerations are ugly. The next step is a trick to turn them into something we do like: energy.


Step 4 — The product-rule trick (turn acceleration into energy)

WHAT. Focus on one term . Use the reverse product rule:

= \frac{d}{dt}\!\Big(m_k\dot{\vec r}_k\cdot\frac{\partial\vec r_k}{\partial q_i}\Big) - m_k\dot{\vec r}_k\cdot\frac{d}{dt}\frac{\partial\vec r_k}{\partial q_i}.$$

WHY this tool. The product rule for a derivative of two things, , rearranges to . Set (so ) and . This launders the unwanted acceleration into two velocity-flavoured pieces, which we will soon recognise as kinetic energy. That is why the product rule and not any other identity: it is the one move that lowers "second derivative" to "first derivative" quantities.

PICTURE. Think of as "the change in the velocity arrow." The identity redraws it as (total change of a product) minus (change of the tangent arrow). Two smaller, tamer arrows.

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 5 — Two lemmas, drawn

Before we can recognise energy, we need two small facts about how and its speed relate.

PICTURE. Lemma 1 says: the arrow you get by asking "how does velocity change with speed-knob " is the same arrow as "how does position change with position-knob ." Lemma 2 says: the two paths around the little square — differentiate-then-time vs. time-then-differentiate — land on the same corner.

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 6 — Recognise the kinetic energy

WHAT. Feed the two lemmas into Step 4:

=\frac{d}{dt}\Big(m_k\dot{\vec r}_k\cdot\frac{\partial\dot{\vec r}_k}{\partial\dot q_i}\Big) - m_k\dot{\vec r}_k\cdot\frac{\partial\dot{\vec r}_k}{\partial q_i}.$$ Now the key sighting: because $\dfrac{\partial}{\partial u}\big(\tfrac12 m_k\dot{\vec r}_k^{\,2}\big)=m_k\dot{\vec r}_k\cdot\dfrac{\partial\dot{\vec r}_k}{\partial u}$ (chain rule on a square), each piece is a derivative of the **kinetic energy** $\tfrac12 m_k\dot{\vec r}_k^{\,2}$. Summing over all particles and writing $T=\sum_k\tfrac12 m_k\dot{\vec r}_k^{\,2}$: $$\sum_k m_k\ddot{\vec r}_k\cdot\frac{\partial\vec r_k}{\partial q_i} =\frac{d}{dt}\frac{\partial T}{\partial\dot q_i}-\frac{\partial T}{\partial q_i}.$$

WHY. is kinetic energy written in the $q$'s. The whole ugly inertia sum has collapsed into two clean energy-derivatives — one with a out front, one bare.

PICTURE. The velocity arrow, dotted with its own rate-of-change, is literally the slope of the energy bowl. The two terms are the two ways that bowl tilts as we wiggle and .

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 7 — Assemble, and use independence

WHAT. Put the force part (Step 3) and the energy form (Step 6) back into D'Alembert:

WHY each bracket is zero. For a holonomic system the knobs are independent — I can wiggle knob 1 alone, all others zero. Then the sum is just (bracket 1), forcing bracket 1 . Repeat for each knob. A weighted sum of independent nudges vanishes only if every weight is zero:

PICTURE. Independent axes: pushing along one leaves the others untouched, so a total of zero means zero on each axis separately.

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

Step 8 — Fold in a potential to get

WHAT & WHY. If the applied forces come from a potential , then (see Generalized forces and potentials). Since has no inside, adding it to doesn't touch the term. Define the Lagrangian : This is the same equation Hamilton's principle (least action) produces by minimising an action — two roads to one summit. Its symmetries feed Noether's theorem.

We started from Newton's laws of motion; we ended with the constraint forces gone and everything written in energy.


The one-picture summary

Figure — Derivation of Euler-Lagrange equations from D'Alembert's principle

The flow: Newton dot with the allowed step (delete constraint force) change to -knobs split force/inertia product-rule + two lemmas launder acceleration into independence splits the sum fold in Euler–Lagrange.

Recall Feynman retelling (say it back in plain words)

Newton's law is written in forces, but the wire's push is a nuisance we don't know. Trick: only ever nudge the bead in directions the wire allows, and take the dot product of the whole law with that nudge. The wire's push is sideways to the nudge, so its shadow is zero — it disappears. Then, instead of that must obey the wire, describe the bead by a knob that already lives on the wire, so the constraint is baked in and never written again. Split what's left into a "real forces" part (which becomes the generalized force ) and an "inertia" part carrying an ugly acceleration. Use the product rule backwards to demote that acceleration into velocity terms, and two little lemmas ("cancel the dots", "swap the order of the derivatives") let you recognise those terms as slopes of the kinetic energy . Now everything is a sum over independent knobs times a bracket; independent things summing to zero means each bracket is zero. That bracket is . Finally, if forces come from a potential , absorb it into and get the clean Euler–Lagrange equation. Newton, with the annoying constraints algebraically swept away.

Recall Quick self-check

Why does the constraint force vanish in D'Alembert? ::: It is perpendicular to the virtual displacement, so its dot product (its shadow onto the allowed direction) is zero. Why do we use generalized coordinates ? ::: Each already respects the constraint, so the constraint equation is baked in and constraint forces never reappear. What does the product-rule trick achieve? ::: It converts the unwanted acceleration into first-derivative (velocity) terms that assemble into kinetic energy. Why may we set each bracket to zero? ::: Because for a holonomic system the are independent, so a weighted sum of them is zero only if every weight is zero. What breaks if constraints are non-holonomic? ::: The are no longer independent; you cannot split the brackets and must use Lagrange multipliers.