2.1.5Analytical Mechanics
Derivation of Euler-Lagrange equations from D'Alembert's principle
2,028 words9 min readdifficulty · medium
WHAT we are deriving
We will derive this from scratch, never assuming it.
The starting ingredients

HOW the derivation runs (step by step)
We have particles, positions .
Step 1 — Express virtual displacements in generalized coordinates
Why this step? Because , the explicit time dependence does not contribute. The are independent for a holonomic system — that independence is the whole payoff.
Step 2 — Split D'Alembert into "force part" and "inertia part"
Force part → generalized forces. Substitute Step 1: is the generalized force. Why? It collects all the real forces, projected onto the direction.
Step 3 — Rewrite the inertia part using a key identity
Here is the algebraic heart. With : Use the product-rule trick (run it backwards):
= \frac{d}{dt}\!\left(m_k\dot{\vec r}_k\cdot\frac{\partial\vec r_k}{\partial q_i}\right) - m_k\dot{\vec r}_k\cdot\frac{d}{dt}\frac{\partial\vec r_k}{\partial q_i}.$$ **Why this step?** It converts $\ddot{\vec r}$ (an acceleration we don't want) into time-derivatives of velocity-type quantities, which we can package into kinetic energy. We now need two **lemmas**. > [!formula] Lemma 1 — "cancellation of dots" > $$\frac{\partial \dot{\vec r}_k}{\partial \dot q_i} = \frac{\partial \vec r_k}{\partial q_i}.$$ > **Derivation:** $\dot{\vec r}_k = \sum_j \dfrac{\partial\vec r_k}{\partial q_j}\dot q_j + \dfrac{\partial\vec r_k}{\partial t}$. The coefficients depend on $q,t$ but **not** on $\dot q_i$, so differentiating w.r.t. $\dot q_i$ picks out exactly $\partial\vec r_k/\partial q_i$. > [!formula] Lemma 2 — "commuting d/dt and ∂/∂q" > $$\frac{d}{dt}\frac{\partial \vec r_k}{\partial q_i} = \frac{\partial \dot{\vec r}_k}{\partial q_i}.$$ > **Derivation:** $\dfrac{d}{dt}\dfrac{\partial\vec r_k}{\partial q_i} = \sum_j \dfrac{\partial^2\vec r_k}{\partial q_j\partial q_i}\dot q_j + \dfrac{\partial^2\vec r_k}{\partial t\,\partial q_i}$, which is exactly $\dfrac{\partial}{\partial q_i}\Big(\sum_j\frac{\partial\vec r_k}{\partial q_j}\dot q_j + \frac{\partial\vec r_k}{\partial t}\Big) = \dfrac{\partial\dot{\vec r}_k}{\partial q_i}$ (mixed partials commute). ### Step 4 — Insert the lemmas Using Lemma 1 in the first term and Lemma 2 in the second: $$m_k\ddot{\vec r}_k\cdot\frac{\partial\vec r_k}{\partial q_i} = \frac{d}{dt}\!\left(m_k\dot{\vec r}_k\cdot\frac{\partial\dot{\vec r}_k}{\partial\dot q_i}\right) - m_k\dot{\vec r}_k\cdot\frac{\partial\dot{\vec r}_k}{\partial q_i}.$$ Now recognize that $m_k\dot{\vec r}_k\cdot\dfrac{\partial\dot{\vec r}_k}{\partial(\cdot)} = \dfrac{\partial}{\partial(\cdot)}\left(\tfrac12 m_k \dot{\vec r}_k^2\right)$. Summing over $k$ and defining $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}.$$ ### Step 5 — Assemble D'Alembert (Step 2) becomes $$\sum_i\left[\frac{d}{dt}\frac{\partial T}{\partial \dot q_i} - \frac{\partial T}{\partial q_i} - Q_i\right]\delta q_i = 0.$$ Because the $\delta q_i$ are **independent**, each bracket must vanish: $$\boxed{\;\frac{d}{dt}\frac{\partial T}{\partial \dot q_i} - \frac{\partial T}{\partial q_i} = Q_i\;}$$ **Why "each must vanish"?** A linear combination of independent quantities equals zero only if every coefficient is zero. This independence is *given* by the holonomic constraints. ### Step 6 — Bring in a potential If the applied forces are conservative, $\vec F_k^{(a)} = -\nabla_k V$, then $$Q_i = \sum_k \vec F_k^{(a)}\cdot\frac{\partial\vec r_k}{\partial q_i} = -\frac{\partial V}{\partial q_i}.$$ Since $V$ usually depends on $q$ only (not $\dot q$), $\partial V/\partial\dot q_i = 0$, so we may fold it in. Define $L = T - V$: $$\frac{d}{dt}\frac{\partial L}{\partial \dot q_i} - \frac{\partial L}{\partial q_i} = 0.\qquad\blacksquare$$ --- ## Worked examples > [!example] (1) Free particle in 1D, $q = x$ > $T = \tfrac12 m\dot x^2$, $V=0$. *Why pick these?* Simplest sanity check. > $\partial L/\partial\dot x = m\dot x$; $\frac{d}{dt}(m\dot x) = m\ddot x$; $\partial L/\partial x = 0$. EL gives $m\ddot x = 0$ — Newton's first law. ✓ > [!example] (2) Simple pendulum, $q=\theta$ > Position: $x = \ell\sin\theta,\ y = -\ell\cos\theta$. *Why these coordinates?* $\theta$ automatically satisfies the rigid-rod constraint, so the tension never appears. > $T = \tfrac12 m\ell^2\dot\theta^2$, $V = -mg\ell\cos\theta$. So $L = \tfrac12 m\ell^2\dot\theta^2 + mg\ell\cos\theta$. > $\frac{\partial L}{\partial\dot\theta} = m\ell^2\dot\theta \Rightarrow \frac{d}{dt}(\cdot) = m\ell^2\ddot\theta$. $\frac{\partial L}{\partial\theta} = -mg\ell\sin\theta$. > EL: $m\ell^2\ddot\theta + mg\ell\sin\theta = 0 \Rightarrow \ddot\theta = -\frac{g}{\ell}\sin\theta$. ✓ (Tension gone for free!) > [!example] (3) Bead on a frictionless rotating wire (forced) > Wire along the radial line rotating at $\omega$, bead coordinate $r$. *Why?* Shows $\partial T/\partial q \ne 0$ matters. > $T = \tfrac12 m(\dot r^2 + r^2\omega^2)$, $V=0$. > $\frac{\partial T}{\partial\dot r}=m\dot r\Rightarrow\frac{d}{dt}=m\ddot r$; $\frac{\partial T}{\partial r}=m r\omega^2$. > EL: $m\ddot r - m r\omega^2 = 0 \Rightarrow \ddot r = \omega^2 r$. The centrifugal term emerged from $\partial T/\partial r$. ✓ --- ## Common mistakes (steel-manned) > [!mistake] "Constraint forces do no work, so I can ignore them in real motion too." > **Why it feels right:** in the *virtual* displacement they do zero work, and that's true. **The trap:** for a *moving* constraint, real work $\vec F^{(c)}\cdot d\vec r$ can be nonzero (e.g. a moving wall). **Fix:** D'Alembert uses **virtual** ($\delta t=0$) displacements precisely so $\sum\vec F^{(c)}\cdot\delta\vec r=0$ holds even for time-dependent constraints. Always freeze time. > [!mistake] "$\delta q_i$ cancel, so I can drop the sum and write one bracket = 0 always." > **Why it feels right:** it works for holonomic systems. **The trap:** it requires the $\delta q_i$ to be **independent**. With non-holonomic constraints they are *not*, and you need Lagrange multipliers. **Fix:** check independence before setting each bracket to zero. > [!mistake] "I can differentiate $L$ treating $q$ and $\dot q$ as related (since $\dot q = dq/dt$)." > **Why it feels right:** they look linked. **The trap:** in $\partial/\partial q_i$ and $\partial/\partial\dot q_i$ you treat $q_i$ and $\dot q_i$ as **independent variables**; the link is reimposed only by $d/dt$. **Fix:** partials first (independent), then total time derivative. --- > [!recall]- Feynman: explain to a 12-year-old > Imagine a bead sliding on a curved wire. The wire is always pushing the bead *sideways* (so it stays on the wire), never along the way the bead can move. So if you only look at the directions the bead is *allowed* to slide, the wire's push disappears — it does nothing useful there. D'Alembert says: look only in the allowed directions, write "push minus mass×acceleration = 0," and the annoying wire-force vanishes. Then we cleverly rewrite everything using **energy** (motion energy minus stored energy), and out pops one neat equation that tells the bead how to move — without ever needing to know how hard the wire pushes. > [!mnemonic] Remember the EL machine > **"Dot the Velocity, Minus the Position"** → $\frac{d}{dt}\partial_{\dot q}L - \partial_q L = 0$. > And for the derivation route: **D**'Alembert → **V**irtual work → **G**eneralized coords → **L**emmas (dots cancel / dots commute) → **K**inetic energy → **E**uler-Lagrange. *"Dare Very Good Lads Keep Equations."* --- ## #flashcards/physics What is a virtual displacement? ::: An imagined, instantaneous ($\delta t=0$) infinitesimal change in position consistent with the constraints at that instant. State D'Alembert's principle. ::: $\sum_k(\vec F_k^{(a)} - \dot{\vec p}_k)\cdot\delta\vec r_k = 0$, summing only over applied (non-constraint) forces. Why do constraint forces drop out of D'Alembert's principle? ::: They are perpendicular to the allowed (virtual) displacements, so $\sum_k\vec F_k^{(c)}\cdot\delta\vec r_k = 0$. State Lemma 1 (cancellation of dots). ::: $\partial\dot{\vec r}_k/\partial\dot q_i = \partial\vec r_k/\partial q_i$. State Lemma 2 (commuting derivatives). ::: $\frac{d}{dt}\partial\vec r_k/\partial q_i = \partial\dot{\vec r}_k/\partial q_i$. What is the generalized force $Q_i$? ::: $Q_i = \sum_k\vec F_k^{(a)}\cdot\partial\vec r_k/\partial q_i$; equals $-\partial V/\partial q_i$ for conservative forces. What property of $\delta q_i$ lets each bracket be set to zero? ::: Their independence, guaranteed by holonomic constraints. Why can $V$ be absorbed into $L$? ::: Because $V=V(q,t)$ has $\partial V/\partial\dot q_i = 0$, so adding $-V$ doesn't change the $\partial/\partial\dot q$ term but adds $-\partial V/\partial q = Q_i$. The inertia term equals which energy expression? ::: $\sum_k m_k\ddot{\vec r}_k\cdot\partial\vec r_k/\partial q_i = \frac{d}{dt}\partial T/\partial\dot q_i - \partial T/\partial q_i$. Write the EL equation in $T$ and $Q_i$ form. ::: $\frac{d}{dt}\partial T/\partial\dot q_i - \partial T/\partial q_i = Q_i$. --- ## Connections - [[D'Alembert's principle]] - [[Constraints and generalized coordinates]] - [[Hamilton's principle (least action)]] — alternative route to the same EL equation - [[Generalized forces and potentials]] - [[Lagrange multipliers for non-holonomic constraints]] - [[Newton's laws of motion]] - [[Kinetic energy in generalized coordinates]] - [[Noether's theorem]] — symmetries of $L$ → conserved quantities ## 🖼️ Concept Map ```mermaid flowchart TD N[Newton F=ma] CF[Constraint forces unknown] VD[Virtual displacement, time frozen] ZW[Constraint forces do zero work] DA[D'Alembert principle] GC[Generalized coordinates q_i] S1[Express delta r_k in q_i] QF[Generalized force Q_i] INE[Inertia part rewrite] KID[Key identity via product rule] EL[Euler-Lagrange equation] LAG[Lagrangian L = T - V] N -->|has nuisance| CF VD -->|allowed by constraints| ZW N -->|dotted with delta r| DA ZW -->|removes F_c| DA DA -->|rewrite in| GC GC -->|gives| S1 S1 -->|force part yields| QF S1 -->|inertia part yields| INE INE -->|uses| KID KID -->|combined with| QF QF -->|assemble| EL KID -->|assemble| EL LAG -->|substituted into| EL ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, Newton ka $\vec F = m\vec a$ to sahi hai, par usme **constraint forces** (jaise rod ka push, wire ka reaction) aa jaate hain jinki value humein pata nahi hoti aur na hi interest hota hai. D'Alembert ka jugaad yeh hai: equation ko sirf un directions par project karo jo constraint **allow** karta hai — yani **virtual displacement** $\delta\vec r$ ke along. In allowed directions me constraint force hamesha perpendicular hota hai, isliye uska kaam (work) zero ho jaata hai aur woh equation se gayab. Bacha kya? Sirf applied forces aur inertia term. > > Phir hum positions ko **generalized coordinates** $q_i$ me likhte hain ($\delta\vec r = \sum \partial\vec r/\partial q_i\,\delta q_i$). Force wale part se **generalized force** $Q_i$ nikalta hai, aur inertia wale part ($m\ddot r\cdot\partial r/\partial q$) ko do chhote lemmas se — "dots cancel" aur "d/dt aur ∂/∂q swap kar sakte ho" — kinetic energy $T$ ki form me daal dete hain. Result: $\frac{d}{dt}\partial T/\partial\dot q_i - \partial T/\partial q_i = Q_i$. > > Kyunki holonomic constraint me $\delta q_i$ saare **independent** hote hain, har bracket alag-alag zero hoga. Agar force ![[audio/2.1.05-Derivation-of-Euler-Lagrange-equations-from-D'Alembert's-principle.mp3]]Go deeper — visual, from zero
Test yourself — Analytical Mechanics
Connections
Generalized coordinates — choosing them, degrees of freedomPhysics · 2.1.2Principle of least action — Hamilton's principle derivationPhysics · 2.1.19Generalized momenta and generalized forcesPhysics · 2.1.7Constraints using Lagrange multipliersPhysics · 2.1.10Kinetic energy in generalized coordinatesPhysics · 2.1.3Noether's theorem — symmetry ↔ conservation lawPhysics · 2.1.9