# 6.3: Lagrange Equations from d’Alembert’s Principle


## d’Alembert’s Principle of virtual work

The Principle of Virtual Work provides a basis for a rigorous derivation of Lagrangian mechanics. Bernoulli introduced the concept of virtual infinitessimal displacement of a system mentioned in chapter $$5.9.1$$. This refers to a change in the configuration of the system as a result of any arbitrary infinitessimal instantaneous change of the coordinates $$\delta \mathbf{r}_{i},$$ that is consistent with the forces and constraints imposed on the system at the instant $$t$$. Lagrange’s symbol $$\delta$$ is used to designate a virtual displacement which is called "virtual" to imply that there is no change in time $$t$$, i.e. $$\delta t=0$$. This distinguishes it from an actual displacement $$d\mathbf{r} _{i}$$ of body $$i$$ during a time interval $$dt$$ when the forces and constraints may change.

Suppose that the system of $$n$$ particles is in equilibrium, that is, the total force on each particle $$i$$ is zero. The virtual work done by the force $$\mathbf{F}_{i}$$ moving a distance $$\delta \mathbf{r}_{i}$$ is given by the dot product $$\mathbf{F}_{i}\cdot \delta \mathbf{r}_{i}$$. For equilibrium, the sum of all these products for the $$N$$ bodies also must be zero

$\label{6.18}\sum_{i}^{N}\mathbf{F}_{i}\cdot \delta \mathbf{r}_{i}=0$

Decomposing the force $$\mathbf{F}_{i}$$ on particle $$i$$ into applied forces $$\mathbf{F}_{i}^{A}$$ and constraint forces $$\mathbf{f}_{i}^{C}$$ gives

$\label{6.19}\sum_{i}^{N}\mathbf{F}_{i}^{A}\cdot \delta \mathbf{r}_{i}+\sum_{i}^{N} \mathbf{f}_{i}^{C}\cdot \delta \mathbf{r}_{i}=0$ The second term in Equation \ref{6.19} can be ignored if the virtual work due to the constraint forces is zero. This is rigorously true for rigid bodies and is valid for any forces of constraint where the constraint forces are perpendicular to the constraint surface and the virtual displacement is tangent to this surface. Thus if the constraint forces do no work, then \ref{6.19} reduces to

$\label{6.20}\sum_{i}^{N}\mathbf{F}_{i}^{A}\cdot \delta \mathbf{r}_{i}=0$

This relation is the Bernoulli’s Principle of Static Virtual Work and is used to solve problems in statics.

Bernoulli introduced dynamics by using Newton’s Law to related force and momentum.

$\label{6.21}\mathbf{F}_{i}=\mathbf{ \dot{p}}_{i}$

Equation \ref{6.21} can be rewritten as $\mathbf{F}_{i}-\mathbf{\dot{p}}_{i}=0\label{6.22}$

In 1742, d’Alembert developed the Principle of Dynamic Virtual Work in the form

$\sum^N_i (\mathbf{F}_i-\mathbf{\dot{p}}_i) \cdot \delta \mathbf{r}_i = 0 \label{6.23}$

Using equations \ref{6.19} plus \ref{6.23} gives

$\sum^N_i (\mathbf{F}^A_i-\mathbf{\dot{p}}_i) \cdot \delta \mathbf{r}_i + \sum^N_i (\mathbf{f}^C_i \cdot \delta \mathbf{r}_i = 0 \label{6.24}$

For the special case where the forces of constraint are zero, then Equation \ref{6.24} reduces to d’Alembert’s Principle

$\label{6.25}\sum_{i}^{N}(\mathbf{F}_{i}^{A}-\mathbf{ \dot{p}}_{i})\cdot \delta \mathbf{r}_{i}=0$

d’Alembert’s Principle, by a stroke of genius, cleverly transforms the principle of virtual work from the realm of statics to dynamics. Application of virtual work to statics primarily leads to algebraic equations between the forces, whereas d’Alembert’s principle applied to dynamics leads to differential equations.

## Transformation to generalized coordinates

In classical mechanical systems the coordinates $$\delta \mathbf{r}_{i}$$ usually are not independent due to the forces of constraint and the constraint-force energy contributes to Equation \ref{6.24}. These problems can be eliminated by expressing d’Alembert’s Principle in terms of virtual displacements of $$n$$ independent generalized coordinates $$q_{i \text{ }}$$of the system for which the constraint force term $$\sum_{i}^{n} \mathbf{f}_{i}^{C}\cdot \delta \mathbf{q}_{i}=0$$. Then the individual variational coefficients $$\delta q_{i}$$ are independent and $$(\mathbf{F} _{i}^{A}-\mathbf{\dot{p}}_{i})\cdot \delta \mathbf{q}_{i}=0$$ can be equated to zero for each value of $$i$$.

The transformation of the $$N$$-body system to $$n$$ independent generalized coordinates $$q_{k}$$ can be expressed as

$\label{6.26}\mathbf{r}_{i}=\mathbf{r}_{i}(q_{1},q_{2},q_{3} \dots ,q_{n},t)$

Assuming $$n$$ independent coordinates, then the velocity $$\mathbf{v}_{i}$$ can be written in terms of general coordinates $$q_{k}$$ using the chain rule for partial differentiation.

$\label{6.27}\mathbf{v}_{i}\equiv \frac{d\mathbf{r}_{i}}{dt}=\sum_{j}^{n}\frac{\partial \mathbf{r}_{i}}{ \partial q_{j}}\dot{q}_{j}+\frac{\partial \mathbf{r}_{i}}{\partial t}$

The arbitrary virtual displacement $$\delta \mathbf{r}_{i}$$ can be related to the virtual displacement of the generalized coordinate $$\delta q_{j}$$ by

$\label{6.28}\delta \mathbf{r}_{i}=\sum_{j}^{n}\frac{\partial \mathbf{r}_{i}}{\partial q_{j}}\delta q_{j}$

Note that by definition, a virtual displacement considers only displacements of the coordinates, and no time variation $$\delta t$$ is involved.

The above transformations can be used to express d’Alembert’s dynamical principle of virtual work in generalized coordinates. Thus the first term in d’Alembert’s Dynamical Principle, \ref{6.25} becomes

$\label{6.29}\sum_{i}^{n}\mathbf{F}_{i}^{A}\cdot \delta \mathbf{r}_{i}=\sum_{i,j}^{n} \mathbf{F}_{i}^{A}\cdot \frac{\partial \mathbf{r}_{i}}{\partial q_{j}}\delta q_{j}=\sum_{j}^{n}Q_{j}\delta q_{j}$

where $$Q_{j}$$ are called components of the generalized force,1 defined as

$\label{6.30}Q_{j}\equiv \sum_{i}^{n}\mathbf{F}_{i}^{A}\cdot \frac{\partial \mathbf{r}_{i}}{\partial q_{j}}$

Note that just as the generalized coordinates $$q_{j}$$ need not have the dimensions of length, so the $$Q_{j}$$ do not necessarily have the dimensions of force, but the product $$Q_{j}\delta q_{j}$$ must have the dimensions of work. For example, $$Q_{j}$$ could be torque and $$\delta q_{j}$$ could be the corresponding infinitessimal rotation angle.

The second term in d’Alembert’s Principle \ref{6.25} can be transformed using Equation \ref{6.28}

$\label{6.31}\sum_{i}^{n}\mathbf{\dot{p}}_{i}\cdot \delta \mathbf{r}_{i}=\sum_{i}^{n}m_{i} \mathbf{\ddot{r}}_{i}\cdot \delta \mathbf{r}_{i}=\left( \sum_{i}^{n}m_{i} \mathbf{\ddot{r}}_{i}\cdot \frac{\partial \mathbf{r}_{i}}{\partial q_{j}} \right) \delta q_{j}$

The right-hand side of \ref{6.31} can be rewritten as

$\label{6.32}\left( \sum_{i}^{n}m_{i}\mathbf{\ddot{r}}_{i}\cdot \frac{\partial \mathbf{r} _{i}}{\partial q_{j}}\right) \delta q_{j}=\sum_{i}^{n}\left\{ \frac{d}{dt} \left( m_{i}\mathbf{\dot{r}}_{i}\cdot \frac{\partial \mathbf{r}_{i}}{ \partial q_{j}}\right) -m_{i}\mathbf{\dot{r}}_{i}\cdot \frac{d}{dt}\left( \frac{\partial \mathbf{r}_{i}}{\partial q_{j}}\right) \right\} \delta q_{j}$ Note that Equation \ref{6.27} gives that

$\label{6.33}\frac{\partial \mathbf{v}_{i}}{\partial \dot{q}_{j}}=\frac{\partial \mathbf{r }_{i}}{\partial q_{j}}$

therefore the first right-hand term in \ref{6.32} can be written as

$\label{6.34}\frac{d}{dt}\left( m_{i}\mathbf{\dot{r}}_{i}\cdot \frac{\partial \mathbf{r} _{i}}{\partial q_{j}}\right) =\frac{d}{dt}\left( m_{i}\mathbf{v}_{i}\cdot \frac{\partial \mathbf{v}_{i}}{\partial \dot{q}_{j}}\right)$

The second right-hand term in \ref{6.32} can be rewritten by interchanging the order of the differentiation with respect to $$t$$ and $$q_{j}$$

$\label{6.35}\frac{d}{dt}\left( \frac{\partial \mathbf{r}_{i}}{\partial q_{j}}\right) = \frac{\partial \mathbf{v}_{i}}{\partial q_{j}}$

Substituting \ref{6.34} and \ref{6.35} into \ref{6.32} gives

$\label{6.36}\sum_{i}^{n}\mathbf{\dot{p}}_{i}\cdot \delta \mathbf{r}_{i}=\left( \sum_{i}^{n}m_{i}\mathbf{\ddot{r}}_{i}\cdot \frac{\partial \mathbf{r}_{i}}{ \partial q_{j}}\right) \delta q_{j}=\sum_{i}^{N}\left\{ \frac{d}{dt}\left( m_{i}\mathbf{v}_{i}\cdot \frac{\partial \mathbf{v}_{i}}{\partial \dot{q}_{j}} \right) -m_{i}\mathbf{v}_{i}\cdot \frac{\partial \mathbf{v}_{i}}{\partial q_{j}}\right\} \delta q_{j}$ Inserting \ref{6.29} and \ref{6.36} into d’Alembert’s Principle \ref{6.25} leads to the relation

$\label{6.37}\sum_{i}^{n}(\mathbf{F}_{i}^{A}-\mathbf{\dot{p}}_{i})\cdot \delta \mathbf{r} _{i}=-\sum_{j}^{N}\left\{ \frac{d}{dt}\left( \frac{\partial }{\partial \dot{q }_{j}}\left( \sum_{i}\frac{1}{2}m_{i}v_{i}^{2}\right) \right) -\frac{ \partial }{\partial q_{j}}\left( \sum_{i}^{N}\frac{1}{2}m_{i}v_{i}^{2} \right) -Q_{j}\right\} \delta q_{j}=0$

The $$\sum_{i}^{n}\frac{1}{2}m_{i}v_{i}^{2}$$ term can be identified with the system kinetic energy $$T$$. Thus d’Alembert Principle reduces to the relation

$\label{6.38}\sum_{j}^{N}\left[ \left\{ \frac{d}{dt}\left( \frac{\partial T}{\partial \dot{q}_{j}}\right) -\frac{\partial T}{\partial q_{j}}\right\} -Q_{j}\right] \delta q_{j}=0$

For cartesian coordinates $$T$$ is a function only of velocities $$(\dot{x}, \dot{y},\dot{z})$$ and thus the term $$\frac{\partial T}{\partial q_{j}}=0.$$ However, as discussed in appendix $$19.3$$, for curvilinear coordinates $$\frac{\partial T}{\partial q_{j}}\neq 0$$ due to the curvature of the coordinates as is illustrated for polar coordinates where $$\mathbf{v=}\dot{r} \mathbf{\hat{r}}+r\dot{\theta}\mathbf{\hat{\theta}}$$.

$\label{6.39}\left\{ \frac{d}{dt}\left( \frac{\partial T}{\partial \dot{q}_{j}}\right) - \frac{\partial T}{\partial q_{j}}\right\} =Q_{j}$

where $$n\geq j\geq 1$$. That is, this leads to $$n$$ Euler-Lagrange equations of motion for the generalized forces $$Q_{j}$$. As discussed in chapter $$5.8,$$ when $$m$$ holonomic constraint forces apply, it is possible to reduce the system to $$s=n-m$$ independent generalized coordinates for which Equation \ref{6.25} applies.

In $$1687$$ Leibniz proposed minimizing the time integral of his “vis viva", which equals $$2T.$$ That is,

$\label{6.40}\delta \int_{t_{1}}^{t_{2}}Tdt=0$

The variational Equation \ref{6.39} accomplishes the minimization of Equation \ref{6.40}. It is remarkable that Leibniz anticipated the basic variational concept prior to the birth of the developers of Lagrangian mechanics, i.e., d’Alembert, Euler, Lagrange, and Hamilton.

## Lagrangian

The handling of both conservative and non-conservative generalized forces $$Q_{j}$$ is best achieved by assuming that the generalized force $$Q_{j}=\sum_{i}^{n}\mathbf{F}_{i}^{A}\cdot \frac{\partial \mathbf{\bar{r}}_{i} }{\partial q_{j}}$$ can be partitioned into a conservative velocity-independent term, that can be expressed in terms of the gradient of a scalar potential, $$-\mathbf{\nabla }U_{i},$$ plus an excluded generalized force $$Q_{j}^{EX}$$ which contains the non-conservative, velocity-dependent, and all the constraint forces not explicitly included in the potential $$U_{j}$$. That is,

$\label{6.41}Q_{j}=-\mathbf{\nabla }U_{j}+Q_{j}^{EX}$

Inserting \ref{6.41} into \ref{6.38}, and assuming that the potential $$U$$ is velocity independent, allows \ref{6.38} to be rewritten as

$\label{6.42}\sum_{j}\left[ \left\{ \frac{d}{dt}\left( \frac{\partial (T-U)}{\partial \dot{q}_{j}}\right) -\frac{\partial (T-U)}{\partial q_{j}}\right\} -Q_{j}^{EX}\right] \delta q_{j}=0$

The standard definition of the Lagrangian is

$\label{6.43}L\equiv T-U$

then \ref{6.42} can be written as $\label{6.44}\sum_{j}^{N}\left[ \left\{ \frac{d}{dt}\left( \frac{\partial L}{\partial \dot{q}_{j}}\right) -\frac{\partial L}{\partial q_{j}}\right\} -Q_{j}^{EX} \right] \delta q_{j}=0$

Note that if all the generalized coordinates are independent, then the square bracket terms are zero for each value of $$j$$, which leads to the general Euler-Lagrange equations of motion.

$\label{6.45}\left\{ \frac{d}{dt}\left( \frac{\partial L}{\partial \dot{q}_{j}}\right) - \frac{\partial L}{\partial q_{j}}\right\} =Q_{j}^{EX}$

where $$n\geq j\geq 1$$.

Chapter $$6.5.3$$ will show that the holonomic constraint forces can be factored out of the generalized force term $$Q_{j}^{EX}$$ which simplifies derivation of the equations of motion using Lagrangian mechanics. The general Euler-Lagrange equations of motion are used extensively in classical mechanics because conservative forces play a ubiquitous role in classical mechanics.

1This proof, plus the notation, conform with that used by Goldstein [Go50] and by other texts on classical mechanics.

This page titled 6.3: Lagrange Equations from d’Alembert’s Principle is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Douglas Cline via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.