D’Alembert’s principle can be used to extend the Principle of Virtual Work to dynamics problems. Starting with Newton’s Second Law:
\begin{align}
\vec{F}=m\vec{a}\end{align}
we introduce a new vector, for the “negative force of inertia”, \(I\):
\begin{align}
\vec{I}\equiv-m\vec{a}\\
\therefore \vec{F}+\vec{I}=0
\tag{3.10}\end{align}
With the introduction of the this “force of inertia”, we have effectively changed the mathematics of a problem of dynamics to the formalism of statics, where the sum of the forces and torques must be zero. One can also think of finding a frame of reference where the body is instantaneously at rest (imagine the force of inertia on a body inside a car going around a turn). D’Alembert’s Principle thus consists of applying the principle of virtual work to a system when the forces of inertia are included. This means that the total virtual work done by all the forces must be zero. Again, considering virtual displacements \(\delta\vec{r}\) that are in harmony with the constraints of motion, we can write:
\begin{align}
\sum_{i=1}^N\delta W_i&= \sum_{i=1}^N (\vec{F}_i+\vec{I}_i)\cdot\delta\vec{r}_i=0\end{align}
where the sum is over the \(N\) particles in the system, and we have introduced the effective forces \(\vec{\mathcal{F}}_i\). In principle, the \(F_i\) contain both “applied forces” and “forces of constraint” (internal forces). However, most forces of constraint cannot perform virtual work, and it is safe to generally ignore them. We can thus state that \(F_i\) are only the applied forces without any substantial loss in generality (although D’Alembert’s priniciple does apply in general). Note that for a system of particles, \(F_i\) can be identified with the net force applied on particle \(i\).
D’Alembert’s principle thus extends the principle of virtual work to the realm of dynamics (and removes the need to worry about internal forces). This leads to the (differential) equations of motion for the particles, since the inertial force will contain the derivatives associated with acceleration.
The effective individual forces in equation 3.11 are not necessarily all equal to zero, as the virtual displacements \(\delta\vec{r}_i\) are not necessarily independent. As we did for the principle of virtual work, we can change coordinates to express D’Alembert’s principle using the \(n\) independent generalized coordinates (if this is a holonomic system).
\begin{align}
\sum_{i=1}^N\delta W_i&= \sum_{i=1}^N (\vec{F}_i+\vec{I}_i)\cdot\delta\vec{r}_i=0\\
&=\sum_{i=1}^N \vec{F}_i\cdot\delta\vec{r}_i+\sum_{i=1}^N \vec{I}_i\cdot\delta\vec{r}_i=0\\
&=\sum_{j=1}^nQ_j\delta q_j+\sum_{i=1}^N \vec{I}_i\cdot\delta\vec{r}_i=0
\tag{3.12}\end{align}
where we have introduced the generalized forces from from equation 3.7:
\begin{align}
Q_j\equiv \sum_{i=1}^N\vec{F}_i\cdot\frac{\partial\vec{r}_i}{\partial q_j}
\tag{3.13}\end{align}
The second term in the virtual work must also be transformed to generalized coordinates, it is however a little more tricky because it contains the acceleration vectors \(\vec{a}=\ddot{\vec{r}}\):
\begin{align}
\sum_{i=1}^N \vec{I}_i\cdot\delta\vec{r}_i&=-\sum_{i=1}^N m_i\ddot{\vec{r}}_i\cdot\delta\vec{r}_i\\
&=-\sum_{i=1}^N m_i\ddot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j \end{align}
Consider the following way to re-write this term using the product rule:
\begin{align}
\frac{d}{dt}\left(m_i\dot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j \right)&=m_i\ddot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j + m_i\dot{\vec{r}}_i\cdot\frac{d}{dt}\left(\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j \right)\\
&=m_i\ddot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j + m_i\dot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial}{\partial q_j}\frac{d\vec{r}_i}{dt}\delta q_j \end{align}
where we have use the fact that we can interchange \(\frac{d}{dt}\) and \(\frac{\partial}{\partial q_j}\). We can now re-arrange and remove the summation sign and the (\(\delta q_j\)) (since the term in front of the sum can be brought into the sum, the equality must be true for each term:
\begin{align}
\therefore 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{\partial}{\partial q_j}\frac{d\vec{r}_i}{dt}\\
&=\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{\partial\dot{\vec{r}}_i}{\partial q_j}\end{align}
Also note the following relation:
\begin{align}
\frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}&=\frac{\partial}{\partial \dot{q}_j}\frac{d\vec{r}_i}{dt}\\
&=\frac{\partial}{\partial \dot{q}_j}\left(\sum_{k=1}^n\frac{\partial\vec{r}_i}{\partial q_k}\dot{q}_k+\frac{\partial\vec{r}_i}{\partial t}\right )\\
&=\frac{\partial\vec{r}_i}{\partial q_k}\delta_{jk} \\
\therefore \frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}&=\frac{\partial\vec{r}_i}{\partial q_j}\end{align}
where we have used the Kronecker Delta (\(\delta_{jk}\)). We can put this back into equation 3.16:
\begin{align}
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\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}\end{align}
Note the following relation that can be used to modify the first term:
\begin{align}
\frac{\partial}{\partial \dot{q}_j}\dot{\vec{r}}_i\cdot\dot{\vec{r}}_i&=\dot{\vec{r}}_i\cdot\frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}+\frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}\cdot\dot{\vec{r}}_i=2\dot{\vec{r}}_i\cdot\frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}\\
\therefore \dot{\vec{r}}_i\cdot\frac{\partial\dot{\vec{r}}_i}{\partial \dot{q}_j}&=\frac{1}{2}\frac{\partial}{\partial \dot{q}_j}\dot{\vec{r}}_i\cdot\dot{\vec{r}}_i\\
&=\frac{1}{2}\frac{\partial}{\partial \dot{q}_j}\dot{r}_i^2
\tag{3.19}\end{align}
Similarly:
\begin{align}
\dot{\vec{r}}_i\cdot\frac{\partial\dot{\vec{r}}_i}{\partial q_j}
=\frac{1}{2}\frac{\partial}{\partial q_j}\dot{r}_i^2
\tag{3.20}\end{align}
Thus:
\begin{align}
m_i\ddot{\vec{r}}_i\cdot\frac{\partial\vec{r}_i}{\partial q_j} &= \frac{d}{dt}\left(m_i\frac{1}{2}\frac{\partial}{\partial \dot{q}_j}\dot{r}_i^2\right) - m_i\frac{1}{2}\frac{\partial}{\partial q_j}\dot{r}_i^2\\
&=\frac{d}{dt}\left(\frac{\partial}{\partial \dot{q}_j}(\frac{1}{2}m_i\dot{r}_i^2)\right) - \frac{\partial}{\partial q_j}(\frac{1}{2}m_i\dot{r}_i^2)\\
&=\frac{d}{dt}\left(\frac{\partial T_i}{\partial \dot{q}_j} \right) - \frac{\partial T_i}{\partial q_j}\end{align}
where we have introduced:
\begin{align}
T_i\equiv\frac{1}{2}m_i\dot{r}_i^2
\tag{3.22}\end{align}
which we can recognize as the kinetic energy of particle \(i\). We are now ready to put this back into the equation for the virtual work of the inertial force (remember, we got a little side-tracked at equation 3.14!):
\begin{align}
\sum_{i=1}^N \vec{I}_i\cdot\delta\vec{r}_i&=-\sum_{i=1}^N m_i\ddot{\vec{r}}_i\cdot\delta\vec{r}_i\\
&=-\sum_{i=1}^N m_i\ddot{\vec{r}}_i\cdot\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\delta q_j \\
&=-\sum_{i=1}^N\sum_{j=1}^n\left(\frac{d}{dt}\left(\frac{\partial T_i}{\partial \dot{q}_j} \right) - \frac{\partial T_i}{\partial q_j}\right)\delta q_j \\
&=-\sum_{j=1}^n\left(\frac{d}{dt}\left(\frac{\partial\sum_{i=1}^N T_i}{\partial \dot{q}_j} \right) - \frac{\partial\sum_{i=1}^N T_i}{\partial q_j}\right)\delta q_j \\
&=-\sum_{j=1}^n\left(\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j} \right) - \frac{\partial T}{\partial q_j}\right)\delta q_j \end{align}
where we have introduced the “total kinetic energy” of the particles in the system (and taken the liberty of swapping the order of summation, and bringing the summation into the derivatives):
\begin{align}
T=\sum_{i=1}^N T_i=\sum_{i=1}^N\frac{1}{2}m_i\dot{r}_i^2
\tag{3.24}\end{align}
Finally, the total virtual work from the external forces and the inertial forces is given by:
\begin{align}
\sum_{i=1}^N\delta W_i&= \sum_{i=1}^N (\vec{F}_i+\vec{I}_i)\cdot\delta\vec{r}_i=0\\
&=\sum_{j=1}^nQ_j\delta q_j+\sum_{i=1}^N \vec{I}_i\cdot\delta\vec{r}_i\\
&=\sum_{j=1}^nQ_j\delta q_j-\sum_{j=1}^n\left(\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j} \right) - \frac{\partial T}{\partial q_j}\right)\delta q_j \\
&=\sum_{j=1}^n \left[ Q_j-\left(\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j} \right) - \frac{\partial T}{\partial q_j}\right)\right]\delta q_j
\tag{3.25}\end{align}
Since the virtual displacements of the generalized coordinates are independent (they can be varied independently from each other), each term in square brackets must be zero. We thus have one equation per degree of freedom \(q_j\):
\begin{align}
\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j} \right) - \frac{\partial T}{\partial q_j}=Q_j
\tag{3.26}\end{align}
which holds for a holonomic system (since we were able to transform to \(n\) independent generalized coordinates). This equation is equivalent to Newton’s second law and thus gives the differential equations of motion for the system. Note the similarity of equation 3.26 and the equation that we obtained when calculating the variation of an integral subject to a constraint (equation 2.66 from Chapter ?). In Chapter ?, we had found that the integral of a function \(L(q_1,q_2,\dots,\dot{q_1}, \dot{q_2},\dots,t)\) subject to constraints \(f_k(q_1,q_2,\dots ,t)=0\) was stationary if:
\begin{align}
\delta S=\int_a^b L(q_1,q_2,\dots,\dot{q_1}, \dot{q_2},\dots,t)dt&=0\\
\left(\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_j}\right)-\frac{\partial L}{\partial q_j}\right) &=Q_j\\
Q_j&\equiv \sum_{i=1}^k\lambda_i \frac{\partial f_i}{\partial q_j}
\tag{3.27}\end{align}
Thus, D’Alembert’s principle is equivalent to requiring that the integral of of the kinetic energy, \(T\), is stationary subject to a constraints related to how the position of the particles can vary with respect to the generalized coordinates:
\begin{align}
\delta S=\int_a^b T(q_1,q_2,\dots,\dot{q_1}, \dot{q_2},\dots,t)dt&=0\\
\left(\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_j}\right)-\frac{\partial L}{\partial q_j}\right) &=Q_j\\
Q_j\equiv \sum_{i=1}^N\vec{F}_i\cdot\frac{\partial\vec{r}_i}{\partial q_j}
\tag{3.28}\end{align}
where the applied forces appear to be related to Lagrange multipliers and the equations for the constraints are related to the coordinate transformations.
For completeness, we can re-write the total kinetic energy in terms of the generalized coordinates:
\begin{align}
T&=\sum_{i=1}^N\frac{1}{2}m_i\dot{r}_i^2\\
&=\sum_{i=1}^N\frac{1}{2}m_i\frac{d\vec{r}_i}{dt}\frac{d\vec{r}_i}{dt}\\
&=\sum_{i=1}^N\frac{1}{2}m_i\left(\sum_{j=1}^n\frac{\partial\vec{r}_i}{\partial q_j}\dot{q}_j+\frac{\partial\vec{r}_i}{\partial t} \right) \left( \sum_{k=1}^n\frac{\partial\vec{r}_i}{\partial q_k}\dot{q}_k+\frac{\partial\vec{r}_i}{\partial t}\right)\\
&=\sum_{j=1}^n\sum_{k=1}^n A_{jk}\dot{q}_j\dot{q}_k+\sum_{k=1}^n B_{k}\dot{q}_k +C\\
&=T(q_1,\dots ,q_n, \dot{q}_1, \dots, \dot{q}_n,t)
\tag{3.29}\end{align}
where the derivation of the terms \(A_{jk}\), \(B_k\), \(C\), are left as an exercise. Note that if the coordinate transformations do not explicitly depend on time (\(\frac{\partial\vec{r}_i}{\partial t}=0\)), then the kinetic energy reduces to:
\begin{align}
T=\sum_{j=1}^n\sum_{k=1}^n A_{jk}\dot{q}_j\dot{q}_k
\tag{3.30}\end{align}
and is said to be quadratic in the velocities.
Example 3-6
Find the terms \(A_{jk}\), \(B_k\), \(C\) for expressing the kinetic energy in polar coordinates for a system composed of a single particle in free space.
To express the kinetic energy in polar coordinates, we start by expressing the transformation equations between the Cartesian and polar coordinates of the particle:
\begin{align*}
x&=r\cos\phi\\
y&=r\sin\phi\\
z&=z\\
\end{align*}
The velocities are thus:
\begin{align*}
\dot x&=\dot r\cos\phi-r\sin\phi\dot\phi\\
\dot y&=\dot r\sin\phi+r\cos\phi\dot\phi\\
\dot z&&\dot z\\
\end{align*}
The kinetic energy is thus:
\begin{align*}
T&=\frac{1}{2}m(\dot x^2+\dot y^2+\dot z^2)\\
&=\frac{1}{2}m \left( (\dot r\cos\phi-r\sin\phi\dot\phi)^2+(\dot r\sin\phi+r\cos\phi\dot\phi)^2+\dot z^2 \right)\\
&=\frac{1}{2}m (\dot r^2+r^2\dot\phi^2+\dot z^2)
\end{align*}
If we let {\(q_1\),\(q_2\),\(q_3\)}={\(r\),\(\phi\),\(z\)}, we can then identify:
\begin{align*}
A_{11}&=\frac{1}{2}m\\
A_{22}&=\frac{1}{2}mr^2\\
A_{33}&=\frac{1}{2}m\\
B_k&=0\\
C&=0
\end{align*}
and all the other \(A\) terms are zero.
Example 3-7
We can use D’Alembert’s principle to obtain the equations of motion for a particle in a conservative field (such as gravity).
Recall that a conservative field results in a force that does no net work on a closed path. Conservative forces can be written in terms of the gradient of a scalar field, \(\phi\), called a ’potential’:
\begin{align*}
\vec{F}=-\nabla\phi
\end{align*}
The particle has 3 degrees of freedom. We can use the standard Cartesian coordinates as generalized coordinates. The kinetic energy in generalized coordinates is given by:
\begin{align*}
T=\frac{1}{2}m(\dot{x}^2+\dot{y}^2+\dot{z}^2)
\end{align*}
The generalized force is given by:
\begin{align*}
Q_j=\sum_{i=1}^N\vec{F}_i\cdot\frac{\partial\vec{r}_i}{\partial q_j}\nonumber\\
\end{align*}
where we have only 1 particle (\(N=1\)) and \(j\) corresponds to the Cartesian coordinates. The position vector, \(\vec{r}\) is given:
\begin{align*}
\vec{r}=x\hat{x}+y\hat{y}+z\hat{z}
\end{align*}
Thus:
\begin{align*}
Q_x&=\vec{F}\cdot\frac{\partial\vec{r}}{\partial x}\nonumber\\
&=\vec{F}\cdot\hat{x}=F_x=-\frac{\partial \phi}{\partial x}\nonumber\\
Q_y&=-\frac{\partial \phi}{\partial y}\nonumber\\
Q_z&=-\frac{\partial \phi}{\partial z}\nonumber\\
\end{align*}
Using equation 3.26, we can get the equations of motion:
\begin{align*}
\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j} \right) - \frac{\partial T}{\partial q_j}&=Q_j\nonumber\\
\therefore \frac{d}{dt}\left(\frac{\partial T}{\partial \dot{x}} \right) - \frac{\partial T}{\partial x}&=Q_x\nonumber\\
\frac{d}{dt}\left(m\dot{x} \right) - 0&=-\frac{\partial \phi}{\partial x}\nonumber\\
\therefore m\ddot{x}=-\frac{\partial \phi}{\partial x}=F_x\nonumber\\
\therefore m\ddot{y}=-\frac{\partial \phi}{\partial y}=F_y\nonumber\\
\therefore m\ddot{z}=-\frac{\partial \phi}{\partial z}=F_z\nonumber\\
\end{align*}
which of course are the three components of Newton’s second law, so the method is equivalent.
Just for fun, let’s assume that the potential \(\phi\) only depends on position (and not on velocity), which is reasonable (but not always true, as the magnetic force depends on velocity). In that case, if we build a new function \(L=T-\phi\), and use the Euler-Lagrange process to find the stationary points of \(\int_a^b L dt\):
\begin{align*}
\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}_j} \right) - \frac{\partial L}{\partial q_j} &=0\nonumber\\
\frac{d}{dt}\left(\frac{\partial}{\partial \dot{q}_j} (T-\phi) \right) - \frac{\partial }{\partial q_j} (T-\phi)&=0\nonumber\\
\therefore\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{x}} \right) + \frac{\partial}{\partial x}\phi&=0\nonumber\\
\frac{d}{dt}\left(m\dot{x} \right)+\frac{\partial \phi}{\partial x}&=0\nonumber\\
m\ddot{x}=-\frac{\partial \phi}{\partial x}\nonumber\\
\end{align*}
and we recover the same equations as before.
It is easy to show that \(\phi\) is what we usually call the potential energy. The quantity \(L=T-\phi\) is called the “Lagrangian” and is often simply equal to the kinetic energy minus the potential energy of the system. The integral \(\int_a^b L dt\) is called the “action”. Hamilton’s principle, which is exactly equivalent to D’Alembert’s principle (as we just saw) states that the system will choose a path in configuration space for which the action is stationary. Also note the similarity between the potential energy term and that of Lagrange multipliers applying a constraint to the kinetic energy.