STEMviz
Physics · Analytical Mechanics and Thermodynamics

D'Alembert's Principle and the Derivation of the Lagrange Equations

Substituting δr⃗i=∑j(∂r⃗i/∂qj) δqj\delta\vec r_i=\sum_j(\partial\vec r_i/\partial q_j)\,\delta q_j into D'Alembert's principle and using the cancellation-of-dots and commutation identities converts the inertial term into ddt(∂T/∂q˙j)−∂T/∂qj\tfrac{d}{dt}(\partial T/\partial\dot q_j)-\partial T/\partial q_j, giving Lagrange's equations ddt(∂T/∂q˙j)−∂T/∂qj=Qj\tfrac{d}{dt}(\partial T/\partial\dot q_j)-\partial T/\partial q_j=Q_j; for conservative forces these become ddt(∂L/∂q˙j)−∂L/∂qj=0\tfrac{d}{dt}(\partial L/\partial\dot q_j)-\partial L/\partial q_j=0 with L=T−VL=T-V.

D'Alembert's Principle and the Derivation of the Lagrange Equations

The previous chapter ended with D'Alembert's principle,

∑i=1N(F⃗i(a)−p⃗˙i)⋅δr⃗i=0,\sum_{i=1}^{N} \left( \vec{F}_i^{(a)} - \dot{\vec{p}}_i \right) \cdot \delta\vec{r}_i = 0,

the exact statement of dynamics in which the forces of constraint have already been eliminated. It is not yet usable: it is written in the 3N3N Cartesian displacements δr⃗i\delta\vec{r}_i, which are not independent. This chapter carries out the one substantial calculation of analytical mechanics — projecting D'Alembert's principle onto the nn independent generalised coordinates — and arrives at Lagrange's equations, a set of nn second-order ordinary differential equations that contain no reaction forces and take the same form in every coordinate system.

The calculation has three moving parts: the substitution δr⃗i=∑j(∂r⃗i/∂qj) δqj\delta\vec{r}_i = \sum_j (\partial\vec{r}_i/\partial q_j)\,\delta q_j; the two kinematic identities of Chapter 1 (cancellation of dots, and the commuting of d/dtd/dt with ∂/∂qj\partial/\partial q_j); and the observation that the resulting combinations of velocities are exactly the partial derivatives of the kinetic energy TT. Once assembled, the applied forces appear only through the generalised force QjQ_j, and when they are conservative the whole right-hand side collapses into a single scalar function, the Lagrangian L=T−VL = T - V.

How to read this chapter. The derivation in Sections 2–4 is worth reproducing once with pencil and paper; after that you will never do it again, because Lagrange's equations are the starting point for everything that follows. Sections 5–7 widen the class of forces the method handles — conservative, electromagnetic (velocity-dependent potential), and dissipative (Rayleigh function). Keep Chapter 1's worked systems in view: each is solved here in three or four lines.

1. The Starting Point and the Plan

Write the inertial term of D'Alembert's principle as ∑ip⃗˙i⋅δr⃗i=∑imir⃗¨i⋅δr⃗i\sum_i \dot{\vec p}_i \cdot \delta\vec{r}_i = \sum_i m_i \ddot{\vec r}_i \cdot \delta\vec{r}_i and the applied term as ∑iF⃗i(a)⋅δr⃗i\sum_i \vec{F}_i^{(a)} \cdot \delta\vec{r}_i. Insert δr⃗i=∑j=1n∂r⃗i∂qj δqj\delta\vec{r}_i = \sum_{j=1}^{n} \dfrac{\partial\vec{r}_i}{\partial q_j}\,\delta q_j into both. The applied term becomes ∑jQj δqj\sum_j Q_j\,\delta q_j with QjQ_j the generalised force of Chapter 1. The inertial term becomes

∑imir⃗¨i⋅δr⃗i=∑j=1n(∑imir⃗¨i⋅∂r⃗i∂qj)δqj\sum_{i} m_i \ddot{\vec{r}}_i \cdot \delta\vec{r}_i = \sum_{j=1}^{n} \left( \sum_i m_i \ddot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} \right) \delta q_j

The plan is to show that the bracket equals ddt∂T∂q˙j−∂T∂qj\dfrac{d}{dt}\dfrac{\partial T}{\partial \dot q_j} - \dfrac{\partial T}{\partial q_j}, where T=∑i12mir⃗˙i 2T = \sum_i \tfrac12 m_i \dot{\vec r}_i^{\,2} is the kinetic energy expressed in terms of the qjq_j, q˙j\dot q_j and tt. Then, because the δqj\delta q_j are independent, each coefficient must vanish separately.

2. Rewriting the Inertial Term

Apply the product rule for d/dtd/dt to the quantity mir⃗˙i⋅(∂r⃗i/∂qj)m_i \dot{\vec r}_i \cdot (\partial\vec{r}_i/\partial q_j):

ddt(mir⃗˙i⋅∂r⃗i∂qj)=mir⃗¨i⋅∂r⃗i∂qj+mir⃗˙i⋅ddt ⁣(∂r⃗i∂qj)\frac{d}{dt}\left( m_i \dot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} \right) = m_i \ddot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} + m_i \dot{\vec{r}}_i \cdot \frac{d}{dt}\!\left( \frac{\partial\vec{r}_i}{\partial q_j} \right)

Solve for the term we want:

mir⃗¨i⋅∂r⃗i∂qj=ddt(mir⃗˙i⋅∂r⃗i∂qj)−mir⃗˙i⋅ddt ⁣(∂r⃗i∂qj)m_i \ddot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} = \frac{d}{dt}\left( m_i \dot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} \right) - m_i \dot{\vec{r}}_i \cdot \frac{d}{dt}\!\left( \frac{\partial\vec{r}_i}{\partial q_j} \right)

Now use the two identities from Chapter 1. In the first term, cancellation of dots replaces ∂r⃗i/∂qj\partial\vec{r}_i/\partial q_j by ∂r⃗˙i/∂q˙j\partial\dot{\vec{r}}_i/\partial\dot q_j. In the second term, the commuting identity replaces ddt(∂r⃗i/∂qj)\dfrac{d}{dt}(\partial\vec{r}_i/\partial q_j) by ∂r⃗˙i/∂qj\partial\dot{\vec{r}}_i/\partial q_j:

mir⃗¨i⋅∂r⃗i∂qj=ddt(mir⃗˙i⋅∂r⃗˙i∂q˙j)−mir⃗˙i⋅∂r⃗˙i∂qjm_i \ddot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} = \frac{d}{dt}\left( m_i \dot{\vec{r}}_i \cdot \frac{\partial\dot{\vec{r}}_i}{\partial\dot q_j} \right) - m_i \dot{\vec{r}}_i \cdot \frac{\partial\dot{\vec{r}}_i}{\partial q_j}

3. Recognising the Kinetic Energy

The combinations on the right are derivatives of 12mir⃗˙i 2\tfrac12 m_i \dot{\vec r}_i^{\,2}. Since ∂∂q˙j(12mir⃗˙i 2)=mir⃗˙i⋅∂r⃗˙i∂q˙j\dfrac{\partial}{\partial\dot q_j}\left(\tfrac12 m_i \dot{\vec r}_i^{\,2}\right) = m_i \dot{\vec r}_i \cdot \dfrac{\partial\dot{\vec r}_i}{\partial\dot q_j} and likewise for ∂/∂qj\partial/\partial q_j, summing over all particles gives

∑imir⃗¨i⋅∂r⃗i∂qj=ddt∂T∂q˙j−∂T∂qj,T=∑i12mir⃗˙i 2.\sum_i m_i \ddot{\vec{r}}_i \cdot \frac{\partial\vec{r}_i}{\partial q_j} = \frac{d}{dt}\frac{\partial T}{\partial\dot q_j} - \frac{\partial T}{\partial q_j}, \qquad T = \sum_i \tfrac12 m_i \dot{\vec r}_i^{\,2}.

This is the promised identity. It is purely kinematic — no forces have entered — and it holds for scleronomic and rheonomic holonomic systems alike, because both Chapter 1 identities do.

4. Lagrange's Equations of Motion

D'Alembert's principle is now

∑j=1n[ddt∂T∂q˙j−∂T∂qj−Qj]δqj=0\sum_{j=1}^{n} \left[ \frac{d}{dt}\frac{\partial T}{\partial\dot q_j} - \frac{\partial T}{\partial q_j} - Q_j \right] \delta q_j = 0

The δqj\delta q_j are independent, so each bracket vanishes:

 ddt∂T∂q˙j−∂T∂qj=Qj,j=1,…,n \boxed{\ \frac{d}{dt}\frac{\partial T}{\partial\dot q_j} - \frac{\partial T}{\partial q_j} = Q_j, \qquad j = 1,\dots,n\ }

These are Lagrange's equations of the second kind — valid for any generalised force, conservative or not. There are nn of them, one per degree of freedom, they are second order in the qjq_j, and no constraint force appears.

Worked example — plane pendulum. With q=θq = \theta, the bob speed is ℓθ˙\ell\dot\theta, so T=12mℓ2θ˙2T = \tfrac12 m\ell^2\dot\theta^2. Then ∂T/∂θ˙=mℓ2θ˙\partial T/\partial\dot\theta = m\ell^2\dot\theta, ddt(⋅)=mℓ2θ¨\dfrac{d}{dt}(\cdot) = m\ell^2\ddot\theta, and ∂T/∂θ=0\partial T/\partial\theta = 0. The generalised force was Qθ=−mgℓsin⁡θQ_\theta = -mg\ell\sin\theta (Chapter 1). Lagrange's equation gives mℓ2θ¨=−mgℓsin⁡θm\ell^2\ddot\theta = -mg\ell\sin\theta, i.e. θ¨+(g/ℓ)sin⁡θ=0\ddot\theta + (g/\ell)\sin\theta = 0, in three lines and with no tension.

5. Conservative Forces and the Lagrangian

If every applied force derives from a potential, Qj=−∂V/∂qjQ_j = -\partial V/\partial q_j with V=V(q⃗,t)V = V(\vec q,t) independent of the q˙j\dot q_j. Then

ddt∂T∂q˙j−∂T∂qj=−∂V∂qj⟹ddt∂(T−V)∂q˙j−∂(T−V)∂qj=0\frac{d}{dt}\frac{\partial T}{\partial\dot q_j} - \frac{\partial T}{\partial q_j} = -\frac{\partial V}{\partial q_j} \quad\Longrightarrow\quad \frac{d}{dt}\frac{\partial (T-V)}{\partial\dot q_j} - \frac{\partial (T-V)}{\partial q_j} = 0

where the second form is legitimate because ∂V/∂q˙j=0\partial V/\partial\dot q_j = 0, so subtracting VV inside the q˙j\dot q_j derivative changes nothing. Defining the Lagrangian

L(q⃗,q⃗˙,t)=T(q⃗,q⃗˙,t)−V(q⃗,t),L(\vec q,\dot{\vec q},t) = T(\vec q,\dot{\vec q},t) - V(\vec q,t),

the equations of motion take their canonical form:

 ddt∂L∂q˙j−∂L∂qj=0 \boxed{\ \frac{d}{dt}\frac{\partial L}{\partial\dot q_j} - \frac{\partial L}{\partial q_j} = 0\ }

The entire dynamics of a conservative holonomic system is encoded in the single scalar function LL. The next chapter is a catalogue of what falls out of it.

Worked example — bead on a rotating wire. From Chapter 1, T=12m(s˙2+s2ω2)T = \tfrac12 m(\dot s^2 + s^2\omega^2) for a wire in the horizontal plane cranked at rate ω\omega; there is no potential (V=0V = 0). So L=12ms˙2+12ms2ω2L = \tfrac12 m\dot s^2 + \tfrac12 m s^2\omega^2. Then ∂L/∂s˙=ms˙\partial L/\partial\dot s = m\dot s, ∂L/∂s=msω2\partial L/\partial s = m s\omega^2, and Lagrange's equation gives ms¨=msω2m\ddot s = m s\omega^2, i.e. s¨=ω2s\ddot s = \omega^2 s: the bead is flung outward exponentially. The s2ω2s^2\omega^2 term in TT, from the moving constraint, has acted as an effective outward potential −12mω2s2-\tfrac12 m\omega^2 s^2 — the centrifugal potential, generated automatically.

6. Velocity-Dependent Potentials

Some forces that are not conservative in the elementary sense still admit a generalised potential U(q⃗,q⃗˙,t)U(\vec q,\dot{\vec q},t) such that

Qj=−∂U∂qj+ddt∂U∂q˙jQ_j = -\frac{\partial U}{\partial q_j} + \frac{d}{dt}\frac{\partial U}{\partial\dot q_j}

For such forces the Lagrangian L=T−UL = T - U still satisfies ddt∂L∂q˙j−∂L∂qj=0\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j} - \dfrac{\partial L}{\partial q_j} = 0. The decisive case is the electromagnetic force on a charge ee: with scalar potential ϕ\phi and vector potential A⃗\vec A,

U=eϕ−e v⃗⋅A⃗,U = e\phi - e\,\vec v \cdot \vec A,

and a short computation shows that −∂U/∂xk+ddt(∂U/∂x˙k)-\partial U/\partial x_k + \dfrac{d}{dt}(\partial U/\partial\dot x_k) reproduces exactly the Lorentz force e(E⃗+v⃗×B⃗)e(\vec E + \vec v\times\vec B) with E⃗=−∇ϕ−∂A⃗/∂t\vec E = -\nabla\phi - \partial\vec A/\partial t and B⃗=∇×A⃗\vec B = \nabla\times\vec A. This is why a charged particle in a magnetic field has a perfectly good Lagrangian, L=12mv2−eϕ+e v⃗⋅A⃗L = \tfrac12 m v^2 - e\phi + e\,\vec v\cdot\vec A, even though the magnetic force does no work.

7. Dissipative Forces and the Rayleigh Function

Forces that genuinely dissipate energy — kinetic friction, viscous drag F⃗idrag=−kiv⃗i\vec F_i^{\text{drag}} = -k_i \vec v_i — have no potential. Carry them on the right-hand side as an explicit generalised force:

ddt∂L∂q˙j−∂L∂qj=Qjdiss\frac{d}{dt}\frac{\partial L}{\partial\dot q_j} - \frac{\partial L}{\partial q_j} = Q_j^{\text{diss}}

For drag linear in velocity, define the Rayleigh dissipation function

F=12∑i(kixx˙i2+kiyy˙i2+kizz˙i2)\mathcal{F} = \tfrac12 \sum_i \left( k_{ix}\dot x_i^2 + k_{iy}\dot y_i^2 + k_{iz}\dot z_i^2 \right)

Then Qjdiss=−∂F/∂q˙jQ_j^{\text{diss}} = -\partial\mathcal{F}/\partial\dot q_j, and the equations of motion read ddt∂L∂q˙j−∂L∂qj+∂F∂q˙j=0\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j} - \dfrac{\partial L}{\partial q_j} + \dfrac{\partial\mathcal{F}}{\partial\dot q_j} = 0. The rate of energy loss is dE/dt=−2FdE/dt = -2\mathcal{F}, which is the physical meaning of F\mathcal{F}: twice the instantaneous power dissipated.

Worked example — damped oscillator. For a mass on a spring with linear drag, L=12mx˙2−12kx2L = \tfrac12 m\dot x^2 - \tfrac12 k x^2 and F=12bx˙2\mathcal{F} = \tfrac12 b\dot x^2. The equation of motion is mx¨+bx˙+kx=0m\ddot x + b\dot x + k x = 0, the familiar damped harmonic oscillator, produced by the same machinery with one extra term.

8. Form Invariance and Equivalence to Newton

Lagrange's equations are covariant under point transformations: if qj→Qj(q⃗,t)q_j \to Q_j(\vec q,t) is any invertible change of generalised coordinates, the equations in the new coordinates have the identical form ddt∂L∂Q˙j−∂L∂Qj=0\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot Q_j} - \dfrac{\partial L}{\partial Q_j} = 0, with LL the same scalar re-expressed. This is proved by direct substitution using the same two dot identities, now applied to the map q→Qq \to Q. It is the structural reason the method is coordinate-free in a way F⃗=ma⃗\vec F = m\vec a is not: Newton's law changes shape (picks up Christoffel-like terms) in curvilinear coordinates, whereas Lagrange's equations do not.

Equivalence to Newton runs both ways. In Cartesian coordinates with L=∑i12mir⃗˙i 2−VL = \sum_i \tfrac12 m_i \dot{\vec r}_i^{\,2} - V, Lagrange's equations reduce term by term to mir⃗¨i=−∇iVm_i\ddot{\vec r}_i = -\nabla_i V. Conversely the derivation of this chapter shows Newton's law plus ideal constraints implies Lagrange's equations. The two formulations carry the same physical content; the Lagrangian one carries it in a form built for constraints, symmetry and generalisation.

Worked example — free particle in plane polar coordinates. With x=rcos⁡ϕx = r\cos\phi, y=rsin⁡ϕy = r\sin\phi, T=12m(r˙2+r2ϕ˙2)T = \tfrac12 m(\dot r^2 + r^2\dot\phi^2) and V=0V = 0. The rr-equation: ddt(mr˙)−mrϕ˙2=0⇒r¨=rϕ˙2\dfrac{d}{dt}(m\dot r) - m r\dot\phi^2 = 0 \Rightarrow \ddot r = r\dot\phi^2. The ϕ\phi-equation: ddt(mr2ϕ˙)=0⇒mr2ϕ˙=const\dfrac{d}{dt}(m r^2\dot\phi) = 0 \Rightarrow m r^2\dot\phi = \text{const}. The first is the radial equation with its centrifugal term; the second is conservation of angular momentum — both emerging without ever writing an acceleration in polar coordinates by hand.

Common Pitfalls

  • Forgetting the total time derivative acts on everything. In ddt∂L∂q˙j\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j}, the inner quantity depends on q⃗(t)\vec q(t), q⃗˙(t)\dot{\vec q}(t) and possibly tt; use the chain rule fully, do not treat qjq_j as constant.
  • Subtracting VV inside the q˙j\dot q_j derivative when VV depends on velocity. The step T→T−VT \to T - V inside ∂/∂q˙j\partial/\partial\dot q_j is valid only because ∂V/∂q˙j=0\partial V/\partial\dot q_j = 0. For a velocity-dependent potential you must use the generalised-potential formula of Section 6.
  • Using L=T−VL = T - V for dissipative forces. Friction and drag have no potential; put them on the right-hand side as QjdissQ_j^{\text{diss}} or via the Rayleigh function.
  • Expressing TT in mixed coordinates. TT must be written entirely in terms of the chosen qjq_j, q˙j\dot q_j and tt before differentiating; a leftover Cartesian x˙\dot x will give wrong partials.
  • Dropping the ∂r⃗i/∂t\partial\vec r_i/\partial t piece of the velocity for a rheonomic system. It contributes the T1T_1 and T0T_0 parts of the kinetic energy and hence the centrifugal/Coriolis terms; omitting it loses real physics.
  • Sign of the Lagrangian. It is TT minus VV, not TT plus VV. The combination T+VT + V is the energy, a different object that is (sometimes) conserved, not extremised.

Summary

  • Substituting δr⃗i=∑j(∂r⃗i/∂qj) δqj\delta\vec r_i = \sum_j(\partial\vec r_i/\partial q_j)\,\delta q_j into D'Alembert's principle and using the two Chapter 1 identities turns the inertial term into ddt∂T∂q˙j−∂T∂qj\dfrac{d}{dt}\dfrac{\partial T}{\partial\dot q_j} - \dfrac{\partial T}{\partial q_j}.
  • Independence of the δqj\delta q_j then gives Lagrange's equations ddt∂T∂q˙j−∂T∂qj=Qj\dfrac{d}{dt}\dfrac{\partial T}{\partial\dot q_j} - \dfrac{\partial T}{\partial q_j} = Q_j — nn second-order ODEs with no constraint forces.
  • For conservative forces Qj=−∂V/∂qjQ_j = -\partial V/\partial q_j, and with the Lagrangian L=T−VL = T - V the equations become ddt∂L∂q˙j−∂L∂qj=0\dfrac{d}{dt}\dfrac{\partial L}{\partial\dot q_j} - \dfrac{\partial L}{\partial q_j} = 0.
  • A generalised (velocity-dependent) potential UU with Qj=−∂U/∂qj+ddt∂U/∂q˙jQ_j = -\partial U/\partial q_j + \dfrac{d}{dt}\partial U/\partial\dot q_j extends the Lagrangian form to the electromagnetic force, U=eϕ−e v⃗⋅A⃗U = e\phi - e\,\vec v\cdot\vec A.
  • Dissipative linear-drag forces are handled by the Rayleigh function F\mathcal{F}, with Qjdiss=−∂F/∂q˙jQ_j^{\text{diss}} = -\partial\mathcal{F}/\partial\dot q_j and dE/dt=−2FdE/dt = -2\mathcal{F}.
  • Lagrange's equations are form-invariant under point transformations and fully equivalent to Newton's law plus ideal constraints; the advantage is structural, not a difference of physical content.