
23 Lagrange’s Equations of Motion for a System of Particles
23.1 Constraints
Put in simple terms, a holonomic constraint is a constraint which can be written in terms of position coordinates, e.g. \(x=0\). A nonholonomic constraint is one which cannot be written in terms of position coordinates, e.g. \({\bf v}\cdot{\bf e}_\theta = 0\).
Question: Consider a particle constrained to move on a horizontal surface \(z=0\). Is this constraint holonomic?
…
Question: Consider two particles connected by a rigid massless rod of length \(\ell\). What constraint is this system of two particles subject to? Is this constraint holonomic or nonholonomic?
…
Question: Consider the system in the previous question where \(m_2\) is subject to a knife-edge constraint \({\bf v}_2\cdot{\bf e}_2=0\). Is this constraint holonomic or nonholonomic.
…
Frobenius’ integrability criteria may be used to determine definitely if a constraint or a system of constraints is holonomic or not. The criterion is beyond the scope of the class. Here, we restrict our attention to holonomic constraints.
23.2 Lagrange’s Prescription on Constraints
Consider a constraint of the form \[\begin{align*} {\bf f}_1\cdot{\bf v}_1+\hdots+{\bf f}_N\cdot{\bf v}_N + e = 0, \end{align*}\] then the associated Lagrange prescription of the constraint force is \(\mu{\bf f}_K\) applied at particle \(K\), \(K=1,\hdots,n\).
Question: Prescribe the constraint force for a particle constrained on a plane \(z = 0\).
This constraint may be written as \({\bf v}\cdot{\bf E}_z = 0\) and the constraint force acting on the particle is \({\bf F} = \mu{\bf E}_z.\)
Question: Prescribe the constraint force acting on a simple pendulum associated with the constraint that the length of the pendulum is constant.
A simple pendulum has the constraint \({\bf r} = 0\) which may be written as \({\bf v}\cdot{\bf e}_r = 0\), then the constraint force acting on the particle is \({\bf F} = \mu{\bf e}_r\).
23.3 Unconstrained Equations
Consider a system of \(n\) particles with \(3n\) coordinates. The system is subject to \(m\) holonomic constraints, so the number of degrees of freedom of the system is \(3n-m\). The generalized coordinates of the system may be listed as \[\begin{align} q = \begin{bmatrix} x^1 & y^1 & z^1 & \cdots & x^n & y^n & z^n \end{bmatrix}^T \end{align}\] and the corresponding generalized velocities are \[\begin{align} u = \begin{bmatrix} v^{x1} & v^{y1} & v^{z1} & \cdots & v^{xn} & v^{yn} & v^{zn} \end{bmatrix}^T \end{align}\] We define \(u\) so that later we set \(u = \dot{q}\).
We arrange the generalized coordinates such that the first \(3n-m\) coordinates are the unconstrained degrees of freedom and the last \(m\) coordinates are equal to the holonomic constraints, and can be later set to zero.
Question: Generalized coordinates for simple harmonic oscillator.
\(q = [x\ y\ z]\), \(u = [v_x\ v_y\ v_z]\).
Question: Generalized coordinates for simple pendulum.
\(q = [\theta\ \beta\ z]\), \(u = [u_\theta\ u_\beta\ u_z]\) where \(\beta = r-\ell\).
The kinetic energy of the system is \(T\), then Lagrange’s equations of motion of the system are \[\begin{align} \frac{d}{dt}\lp\frac{\partial T}{\partial u^i}\rp-\frac{\partial T}{\partial q^i} = \sum_{K=1}^n{\bf F}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i} \end{align}\] Equivalently, using the Lagrangian \(L = T-U\), where \(U\) is the potential energy, the equations of motion of the system may be written as \[\begin{align} \frac{d}{dt}\lp\frac{\partial L}{\partial u^i}\rp-\frac{\partial L}{\partial q^i} = \sum_{K=1}^n{\bf F}_{nonc}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i} \end{align}\] where \({\bf F}^K\) is the sum of external forces acting on particle \(K\) while \({\bf F}_{nonc}^K\) is the sum of nonconservative forces acting on \(K\).
23.3.1 Advantage of Lagrange’s Equations
If the system is subject to \(m\) holonomic constraints, if you choose the last \(m\) generalized coordinates to be equal to the constraints, then the first \(m-n\) Lagrange’s equations of motion will be uncoupled from the holonomic constraint forces, these are the equations of motion. The last \(n-m\) equations can be solved for the holonomic constraint forces. If one does not wish to solve for these forces, one can just use the constrained kinetic energy.
23.4 Constrained Equations
Consider a system of \(n\) particles with \(3n\) degrees of freedom and \(m\) holonomic constraints prescribed using Lagrange’s equations of motion. The unconstrained degrees of freedom of the system are arranged in an array of generalized coordinates \(q\) and generalized velocities \(u\), and the constrained kinetic energy of the system is \(\tilde{T}\), then Lagrange’s equations of motion of the system are \[\begin{align} \frac{d}{dt}\lp\frac{\partial \tilde{T}}{\partial u^i}\rp-\frac{\partial \tilde{T}}{\partial q^i} = \sum_{K=1}^n{\bf F}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i} \end{align}\] Equivalently, using the constrained Lagrangian \(\tilde{L} = \tilde{T}-\tilde{U}\), where \(\tilde{U}\) is the constrained potential energy, the equations of motion of the system may be written as \[\begin{align} \frac{d}{dt}\lp\frac{\partial \tilde{L}}{\partial u^i}\rp-\frac{\partial \tilde{L}}{\partial q^i} = \sum_{K=1}^n{\bf F}_{nonc}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i} \end{align}\] If the forces are prescribed with Lagrange’s prescription, then \(\sum_{K=1}^n{\bf F}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i}\) and \(\sum_{K=1}^n{\bf F}_{nonc}^K\cdot \frac{\partial {\bf r}^K}{\partial q^i}\) reduce to \(\sum_{K=1}^n{\bf F}_{appliedc}\cdot\frac{\partial {\bf r}^K}{\partial q^i}\) and \(\sum_{K=1}^n{\bf F}_{applied, nconc}\cdot\frac{\partial {\bf r}^K}{\partial q^i}\) respectively, that is the applied forces and the nonconservative applied forces.
In many cases, the nonconservative applied forces are zero, hence the commonly known homogeneous form of Lagrange’s equation \[\begin{align} \frac{d}{dt}\lp\frac{\partial \tilde{L}}{\partial u^i}\rp-\frac{\partial \tilde{L}}{\partial q^i} = 0. \end{align}\]
23.5 How to Solve a Problem With Lagrange’s Equations
The examples below all follow the same steps:
- Constraints and coordinates. Write each constraint as a function that must vanish. Choose the generalized coordinates \(q\) so that the free coordinates come first and the constraint functions come last, and define the generalized velocities \(u = \dot{q}\).
- Constraint forces. Differentiate each constraint in time to put it in the form \({\bf f}_1\cdot{\bf v}_1+\hdots+{\bf f}_N\cdot{\bf v}_N+e=0\). By Lagrange’s prescription, the constraint force on particle \(K\) is \(\mu\,{\bf f}_K\).
- Constrained energies. Set the constrained coordinates to zero to get \(\tilde{T}(q,u)\), \(\tilde{U}(q)\) and \(\tilde{L}=\tilde{T}-\tilde{U}\).
- Equations of motion. For each free coordinate, \(\frac{d}{dt}\lp\frac{\partial \tilde{L}}{\partial u^i}\rp-\frac{\partial \tilde{L}}{\partial q^i} = 0\). The constraint forces do not appear.
- Constraint forces (tensions, normal forces). For a constrained coordinate, use the unconstrained Lagrangian \(L\) and keep the constraint forces on the right-hand side: \[\begin{align} \frac{d}{dt}\lp\frac{\partial L}{\partial u^i}\rp-\frac{\partial L}{\partial q^i} = \sum_{K=1}^n{\bf F}_c^K\cdot \frac{\partial {\bf r}^K}{\partial q^i}, \end{align}\] then evaluate it with the constraints satisfied (the constrained coordinates and their rates equal to zero).
23.6 Example: Simple Harmonic Oscillator
Consider a mass \(m\) on a smooth horizontal table, connected to a linear spring of stiffness \(k\) and unstretched length \(\ell_0\) lying along \({\bf E}_x\). Gravity acts in the \(-{\bf E}_z\) direction. The origin is taken at the location of \(m\) when the spring is unstretched, so that \(x\) is the stretch of the spring. Find the equation of motion of \(m\) and the normal force from the table.
Constraints and coordinates. The position of \(m\) is \({\bf r} = x{\bf E}_x+y{\bf E}_y+z{\bf E}_z\). The table keeps the mass on the line of the spring: \[\begin{align} y = 0, \qquad z = 0. \end{align}\] Hence \[\begin{align} q = \leb x \quad y \quad z\reb, \qquad u = \leb u_x \quad u_y \quad u_z\reb. \end{align}\]
Constraint forces. Differentiating the constraints gives \({\bf E}_y\cdot{\bf v} = 0\) and \({\bf E}_z\cdot{\bf v} = 0\). By Lagrange’s prescription, the constraint force on \(m\) is \[\begin{align} {\bf F}_c = \mu_1{\bf E}_y+\mu_2{\bf E}_z. \end{align}\]
Constrained energies. With \(y = z = 0\), \({\bf v} = u_x{\bf E}_x\), so \[\begin{align} \tilde{T} = \frac{1}{2}mu_x^2, \qquad \tilde{U} = \frac{1}{2}kx^2, \qquad \tilde{L} = \frac{1}{2}mu_x^2-\frac{1}{2}kx^2. \end{align}\]
Equation of motion. For \(q^1 = x\): \[\begin{align} \frac{d}{dt}\lp mu_x\rp + kx = 0 \implies m\ddot{x}+kx = 0. \end{align}\]
Normal force. The unconstrained Lagrangian is \[\begin{align} L = \frac{1}{2}m\lp u_x^2+u_y^2+u_z^2\rp-\frac{1}{2}k\varepsilon^2-mgz, \qquad \varepsilon = ||{\bf r}+\ell_0{\bf E}_x||-\ell_0. \end{align}\] For \(q^3 = z\), using \(\frac{\partial {\bf r}}{\partial z} = {\bf E}_z\): \[\begin{align} m\dot{u}_z+k\varepsilon\frac{\partial \varepsilon}{\partial z}+mg = {\bf F}_c\cdot{\bf E}_z = \mu_2. \end{align}\] With the constraints satisfied, \(\dot{u}_z = 0\) and \(\frac{\partial \varepsilon}{\partial z} = \frac{z}{||{\bf r}+\ell_0{\bf E}_x||} = 0\), so \(\mu_2 = mg\): the table pushes up with the weight of the mass. The same steps for \(q^2 = y\) give \(\mu_1 = 0\).
23.7 Example: Simple Pendulum
A particle of mass \(m\) hangs from a fixed point \(O\) on a massless inextensible string of length \(\ell\), and moves in a vertical plane. \({\bf E}_x\) points down, along gravity, \({\bf g} = g{\bf E}_x\). Find the equation of motion and the tension in the string.

Constraints and coordinates. With the corotational basis \({\bf e}_x = \cos(\theta){\bf E}_x+\sin(\theta){\bf E}_y\), \({\bf e}_y = -\sin(\theta){\bf E}_x+\cos(\theta){\bf E}_y\), the position of \(m\) is \({\bf r} = (\ell+\beta){\bf e}_x+z{\bf E}_z\), where \[\begin{align} \beta = ||{\bf r}-{\bf r}_O||-\ell = 0, \qquad z = {\bf r}\cdot{\bf E}_z = 0, \end{align}\] and \[\begin{align} q = \leb \theta \quad \beta \quad z\reb, \qquad u = \leb u_\theta \quad u_\beta \quad u_z\reb. \end{align}\] The velocity is \({\bf v} = u_\beta{\bf e}_x+(\ell+\beta)u_\theta{\bf e}_y+u_z{\bf E}_z\).
Constraint forces. \(\dot{\beta} = {\bf v}\cdot{\bf e}_x = 0\) and \(\dot{z} = {\bf v}\cdot{\bf E}_z = 0\), so \[\begin{align} {\bf F}_c = \mu_1{\bf e}_x+\mu_2{\bf E}_z. \end{align}\]
Constrained energies. With \(\beta = z = 0\): \({\bf r} = \ell{\bf e}_x\) and \({\bf v} = \ell u_\theta{\bf e}_y\), so \[\begin{align} \tilde{T} = \frac{1}{2}m\ell^2u_\theta^2, \qquad \tilde{U} = -m{\bf g}\cdot{\bf r} = -mg\ell\cos(\theta), \qquad \tilde{L} = \frac{1}{2}m\ell^2u_\theta^2+mg\ell\cos(\theta). \end{align}\]
Equation of motion. For \(q^1 = \theta\): \[\begin{align} \frac{d}{dt}\lp m\ell^2u_\theta\rp+mg\ell\sin(\theta) = 0 \implies \ddot{\theta}+\frac{g}{\ell}\sin(\theta) = 0, \end{align}\] the same equation we found with the balance of linear momentum in Example: Nonlinear Pendulum.
Tension. The unconstrained Lagrangian is \(L = \frac{1}{2}m\lp u_\beta^2+(\ell+\beta)^2u_\theta^2+u_z^2\rp+mg(\ell+\beta)\cos(\theta)\). For \(q^2 = \beta\), with \(\frac{\partial {\bf r}}{\partial \beta} = {\bf e}_x\): \[\begin{align} m\dot{u}_\beta-m(\ell+\beta)u_\theta^2-mg\cos(\theta) = {\bf F}_c\cdot{\bf e}_x = \mu_1. \end{align}\] With \(\beta = u_\beta = \dot{u}_\beta = 0\), \(\mu_1 = -m\ell\dot{\theta}^2-mg\cos(\theta)\). The string pulls \(m\) toward \(O\) with tension \(T = -\mu_1\): \[\begin{align} T = m\ell\dot{\theta}^2+mg\cos(\theta). \end{align}\]
23.8 Example: Double Pendulum
A particle of mass \(m_1\) hangs from \(O\) on a massless inextensible string of length \(\ell_1\), and a particle of mass \(m_2\) hangs from \(m_1\) on a second string of length \(\ell_2\). The motion is planar and \({\bf g} = g{\bf E}_x\). Find the equations of motion and equations for the tensions in the strings.

Constraints and coordinates. We set up two corotational bases, \({}_{i}{\bf e}_x = \cos(\theta_i){\bf E}_x+\sin(\theta_i){\bf E}_y\) and \({}_{i}{\bf e}_y = -\sin(\theta_i){\bf E}_x+\cos(\theta_i){\bf E}_y\) for \(i = 1, 2\), following the two strings. The constraints are \[\begin{align} \beta = ||{\bf r}_1-{\bf r}_O||-\ell_1 = 0, \qquad \gamma = ||{\bf r}_2-{\bf r}_1||-\ell_2 = 0, \qquad z_1 = 0, \qquad z_2 = 0, \end{align}\] and the generalized coordinates and velocities are \[\begin{align} q = \leb \theta_1 \quad \theta_2 \quad \beta \quad \gamma \quad z_1 \quad z_2\reb, \qquad u = \leb u_{\theta_1} \quad u_{\theta_2} \quad u_\beta \quad u_\gamma \quad u_{z_1} \quad u_{z_2}\reb. \end{align}\] The first two are free; the last four are constrained. The positions are \[\begin{align} {\bf r}_1 = (\ell_1+\beta)\,{}_{1}{\bf e}_x+z_1{\bf E}_z, \qquad {\bf r}_2 = (\ell_1+\beta)\,{}_{1}{\bf e}_x+(\ell_2+\gamma)\,{}_{2}{\bf e}_x+z_2{\bf E}_z. \end{align}\]
Constraint forces. Differentiating each constraint: \[\begin{align} \beta = 0 &\implies {\bf v}_1\cdot{}_{1}{\bf e}_x = 0,\\ \gamma = 0 &\implies ({\bf r}_2-{\bf r}_1)\cdot({\bf v}_2-{\bf v}_1) = 0,\\ z_1 = 0 &\implies {\bf v}_1\cdot{\bf E}_z = 0,\\ z_2 = 0 &\implies {\bf v}_2\cdot{\bf E}_z = 0. \end{align}\] By Lagrange’s prescription, the constraint forces on \(m_1\) and \(m_2\) are \[\begin{align} {\bf F}_{c1} = \mu_1\,{}_{1}{\bf e}_x+\mu_2({\bf r}_1-{\bf r}_2)+\mu_3{\bf E}_z, \qquad {\bf F}_{c2} = \mu_2({\bf r}_2-{\bf r}_1)+\mu_4{\bf E}_z. \end{align}\] The second string pulls the two particles toward each other with equal and opposite forces, as expected.
Constrained energies. With the constraints satisfied, \[\begin{align} {\bf v}_1 = \ell_1u_{\theta_1}\,{}_{1}{\bf e}_y, \qquad {\bf v}_2 = \ell_1u_{\theta_1}\,{}_{1}{\bf e}_y+\ell_2u_{\theta_2}\,{}_{2}{\bf e}_y, \qquad {}_{1}{\bf e}_y\cdot{}_{2}{\bf e}_y = \cos(\theta_2-\theta_1), \end{align}\] so \[\begin{align} \tilde{T} &= \frac{1}{2}m_1{\bf v}_1\cdot{\bf v}_1+\frac{1}{2}m_2{\bf v}_2\cdot{\bf v}_2 = \frac{1}{2}(m_1+m_2)\ell_1^2u_{\theta_1}^2+\frac{1}{2}m_2\ell_2^2u_{\theta_2}^2+m_2\ell_1\ell_2u_{\theta_1}u_{\theta_2}\cos(\theta_2-\theta_1),\\ \tilde{U} &= -m_1g\ell_1\cos(\theta_1)-m_2g\lp\ell_1\cos(\theta_1)+\ell_2\cos(\theta_2)\rp,\\ \tilde{L} &= \tilde{T}-\tilde{U}. \end{align}\]
Equations of motion. For \(i = 1, 2\), \(\frac{d}{dt}\lp\frac{\partial \tilde{L}}{\partial u^i}\rp-\frac{\partial \tilde{L}}{\partial q^i} = 0\).
For \(q^1 = \theta_1\): \[\begin{align} \frac{d}{dt}\lp(m_1+m_2)\ell_1^2u_{\theta_1}+m_2\ell_1\ell_2u_{\theta_2}\cos(\theta_2-\theta_1)\rp-\lp m_2\ell_1\ell_2u_{\theta_1}u_{\theta_2}\sin(\theta_2-\theta_1)-(m_1+m_2)g\ell_1\sin(\theta_1)\rp = 0, \end{align}\] which simplifies to \[\begin{align} (m_1+m_2)\ell_1^2\ddot{\theta}_1+m_2\ell_1\ell_2\lp\ddot{\theta}_2\cos(\theta_2-\theta_1)-\dot{\theta}_2^2\sin(\theta_2-\theta_1)\rp+(m_1+m_2)g\ell_1\sin(\theta_1) = 0. \end{align}\] For \(q^2 = \theta_2\): \[\begin{align} \frac{d}{dt}\lp m_2\ell_2^2u_{\theta_2}+m_2\ell_1\ell_2u_{\theta_1}\cos(\theta_2-\theta_1)\rp-\lp -m_2\ell_1\ell_2u_{\theta_1}u_{\theta_2}\sin(\theta_2-\theta_1)-m_2g\ell_2\sin(\theta_2)\rp = 0, \end{align}\] which simplifies to \[\begin{align} m_2\ell_2^2\ddot{\theta}_2+m_2\ell_1\ell_2\lp\ddot{\theta}_1\cos(\theta_2-\theta_1)+\dot{\theta}_1^2\sin(\theta_2-\theta_1)\rp+m_2g\ell_2\sin(\theta_2) = 0. \end{align}\] These two coupled, nonlinear equations are solved numerically.
Tensions. The tensions come from the Lagrange equations of the constrained coordinates \(\beta\) and \(\gamma\), using the unconstrained Lagrangian \(L\): \[\begin{align} \text{string 1:} \quad \frac{d}{dt}\lp\frac{\partial L}{\partial u_\beta}\rp-\frac{\partial L}{\partial \beta} &= {\bf F}_{c1}\cdot\frac{\partial {\bf r}_1}{\partial \beta}+{\bf F}_{c2}\cdot\frac{\partial {\bf r}_2}{\partial \beta},\\ \text{string 2:} \quad \frac{d}{dt}\lp\frac{\partial L}{\partial u_\gamma}\rp-\frac{\partial L}{\partial \gamma} &= {\bf F}_{c1}\cdot\frac{\partial {\bf r}_1}{\partial \gamma}+{\bf F}_{c2}\cdot\frac{\partial {\bf r}_2}{\partial \gamma}. \end{align}\]
Since \(\frac{\partial {\bf r}_1}{\partial \beta} = \frac{\partial {\bf r}_2}{\partial \beta} = {}_{1}{\bf e}_x\), the \(\mu_2\) terms cancel in the first equation and its right-hand side is \(\mu_1\). Since \(\frac{\partial {\bf r}_1}{\partial \gamma} = {\bf 0}\) and \(\frac{\partial {\bf r}_2}{\partial \gamma} = {}_{2}{\bf e}_x\), the right-hand side of the second is \(\mu_2\ell_2\). Evaluating the left-hand sides with the constraints satisfied gives \[\begin{align} \mu_1 &= -(m_1+m_2)\lp\ell_1\dot{\theta}_1^2+g\cos(\theta_1)\rp+m_2\ell_2\lp\ddot{\theta}_2\sin(\theta_1-\theta_2)-\dot{\theta}_2^2\cos(\theta_1-\theta_2)\rp,\\ \mu_2\ell_2 &= -m_2\lp g\cos(\theta_2)+\ell_2\dot{\theta}_2^2+\ell_1\ddot{\theta}_1\sin(\theta_1-\theta_2)+\ell_1\dot{\theta}_1^2\cos(\theta_1-\theta_2)\rp. \end{align}\] The string tensions are \(T_1 = -\mu_1\) and \(T_2 = -\mu_2\ell_2\), with \(\ddot{\theta}_1\) and \(\ddot{\theta}_2\) taken from the equations of motion.
23.9 Example: Pendulum With a Spring (Summer 2026 Final)
A particle of mass \(m\) is suspended by a massless inextensible string of length \(d\). The particle is also attached to a linear spring of stiffness \(K\) and unstretched length \(\ell_0\), whose other end is fixed at \(B\), a distance \(d\) from \(O\) along \({\bf E}_y\). The motion of \(m\) is planar, and \({\bf g} = g{\bf E}_x\). We define a corotational basis on the string, \[\begin{align} {\bf e}_x = \cos(\theta){\bf E}_x+\sin(\theta){\bf E}_y, \qquad {\bf e}_y = -\sin(\theta){\bf E}_x+\cos(\theta){\bf E}_y. \end{align}\] The constraints imposed on \(m\) are \[\begin{align} \beta = ||{\bf r}_A-{\bf r}_O||-d = 0, \qquad z = {\bf r}_A\cdot{\bf E}_z = 0. \end{align}\] Hence, we choose the generalized coordinates and generalized velocities respectively as \[\begin{align} q = \leb \theta \quad \beta \quad z\reb, \qquad u = \leb u_\theta \quad u_\beta \quad u_z\reb. \end{align}\]

- Use Lagrange’s prescription to find the constraint forces corresponding to the constraints imposed on \(m\).
- Find expressions for the constrained kinetic energy \(\tilde{T}(q,u)\), constrained potential energy \(\tilde{U}(q)\), and constrained Lagrangian \(\tilde{L}(q,u)\) of \(m\).
- Use Lagrangian mechanics to find the equation of motion of \(m\).
- Write one equation you could use to calculate the tension in the string. Specify what each term of the equation means.
Solution. The position and velocity of \(m\) are \[\begin{align} {\bf r}_A = (d+\beta){\bf e}_x+z{\bf E}_z, \qquad {\bf v}_A = u_\beta{\bf e}_x+(d+\beta)u_\theta{\bf e}_y+u_z{\bf E}_z, \end{align}\] and the fixed end of the spring is at \({\bf r}_B = d{\bf E}_y\).
1. Constraint forces. Differentiating the constraints, \[\begin{align} \beta = 0 \implies {\bf v}_A\cdot{\bf e}_x = 0, \qquad z = 0 \implies {\bf v}_A\cdot{\bf E}_z = 0, \end{align}\] so by Lagrange’s prescription the constraint force on \(m\) is \[\begin{align} {\bf F}_c = \mu_1{\bf e}_x+\mu_2{\bf E}_z. \end{align}\] \(\mu_1{\bf e}_x\) is the force of the string, and \(\mu_2{\bf E}_z\) keeps the motion in the plane.
2. Constrained energies. With \(\beta = z = 0\): \({\bf r}_A = d{\bf e}_x\) and \({\bf v}_A = du_\theta{\bf e}_y\), so \[\begin{align} \tilde{T} = \frac{1}{2}md^2u_\theta^2. \end{align}\] The stretch of the spring is \(\varepsilon = ||{\bf r}_A-{\bf r}_B||-\ell_0\), with \({\bf r}_A-{\bf r}_B = d\cos(\theta){\bf E}_x+d\lp\sin(\theta)-1\rp{\bf E}_y\), so \[\begin{align} ||{\bf r}_A-{\bf r}_B|| = d\sqrt{\cos^2(\theta)+\lp\sin(\theta)-1\rp^2} = d\sqrt{2-2\sin(\theta)}, \qquad \varepsilon = d\sqrt{2-2\sin(\theta)}-\ell_0. \end{align}\] Adding the gravitational potential energy \(-m{\bf g}\cdot{\bf r}_A = -mgd\cos(\theta)\), \[\begin{align} \tilde{U} &= -mgd\cos(\theta)+\frac{1}{2}K\lp d\sqrt{2-2\sin(\theta)}-\ell_0\rp^2,\\ \tilde{L} &= \frac{1}{2}md^2u_\theta^2+mgd\cos(\theta)-\frac{1}{2}K\lp d\sqrt{2-2\sin(\theta)}-\ell_0\rp^2. \end{align}\]
3. Equation of motion. For \(q^1 = \theta\), \(\frac{d}{dt}\lp\frac{\partial \tilde{L}}{\partial u_\theta}\rp-\frac{\partial \tilde{L}}{\partial \theta} = 0\), with \[\begin{align} \frac{\partial \tilde{L}}{\partial u_\theta} = md^2u_\theta, \qquad \frac{\partial \tilde{L}}{\partial \theta} = -mgd\sin(\theta)-K\varepsilon\frac{\partial \varepsilon}{\partial \theta}, \qquad \frac{\partial \varepsilon}{\partial \theta} = -\frac{d\cos(\theta)}{\sqrt{2-2\sin(\theta)}}. \end{align}\] The equation of motion is \[\begin{align} md^2\ddot{\theta}+mgd\sin(\theta)-Kd\cos(\theta)\frac{d\sqrt{2-2\sin(\theta)}-\ell_0}{\sqrt{2-2\sin(\theta)}} = 0. \end{align}\] The spring term is the moment about \(O\) of the spring force: when the spring is stretched, it pulls \(m\) toward \(B\) and increases \(\theta\).
4. Tension. Using the unconstrained Lagrangian \(L = T-U\) for the constrained coordinate \(q^2 = \beta\): \[\begin{align} \frac{d}{dt}\lp\frac{\partial L}{\partial u_\beta}\rp-\frac{\partial L}{\partial \beta} = {\bf F}_c\cdot\frac{\partial {\bf r}_A}{\partial \beta} = \mu_1, \end{align}\] where \(L = \frac{1}{2}m\lp u_\beta^2+(d+\beta)^2u_\theta^2+u_z^2\rp+mg(d+\beta)\cos(\theta)-\frac{1}{2}K\varepsilon^2\) depends on \(\beta\), \(\frac{\partial {\bf r}_A}{\partial \beta} = {\bf e}_x\), and the equation is evaluated at \(\beta = u_\beta = \dot{u}_\beta = 0\). The tension in the string is \(T_s = -\mu_1\).
With \(\frac{\partial \varepsilon}{\partial \beta} = \frac{({\bf r}_A-{\bf r}_B)\cdot{\bf e}_x}{||{\bf r}_A-{\bf r}_B||} = \sqrt{\frac{1-\sin(\theta)}{2}}\) at \(\beta = 0\), the \(\beta\) equation gives \[\begin{align} \mu_1 = -md\dot{\theta}^2-mg\cos(\theta)+K\lp d\sqrt{2-2\sin(\theta)}-\ell_0\rp\sqrt{\frac{1-\sin(\theta)}{2}}, \end{align}\] so \[\begin{align} T_s = md\dot{\theta}^2+mg\cos(\theta)-K\lp d\sqrt{2-2\sin(\theta)}-\ell_0\rp\sqrt{\frac{1-\sin(\theta)}{2}}. \end{align}\] This matches the balance of linear momentum along \({\bf e}_x\): \(-md\dot{\theta}^2 = mg\cos(\theta)+\mu_1+{\bf F}_s\cdot{\bf e}_x\), where \({\bf F}_s\) is the spring force.
23.10 Alternative Principles of Dynamics
Source: O’Reilly’s textbook on Intermediate Dynamics, second edition, Section 4.12
- Jean Bernoulli’s principle of virtual work (1717) - for statics
- D’Alembert’s principle (1743) - extension of the principle of virtual work for dynamics
- Gauss’ principle of least constraint (1829)
- Hamilton’s principle (1835)
23.10.1 Principle of Virtual Work and D’Alembert’s Principle
Consider the principle of virtual work and D’Alembert’s Principle applied to a system of particles. We assume that the particles are subject to a single constraint: \[\begin{align*} {\bf f}_1\cdot{\bf v}_1+\hdots+{\bf f}_N\cdot{\bf v}_N + e = 0. \end{align*}\] The principle of virtual work and D’Alembert’s principle collectively state that the motion of the system of particles is such that the following equation is satisfied: \[\begin{align} \begin{split} \lp {\bf F}_{a1}-m_1\ddot{\bf r}_1\rp\cdot{\bf d}_1+\hdots+\lp {\bf F}_{aN}-m_N\ddot{\bf r}_N\rp\cdot{\bf d}_N = 0, \end{split} \end{align}\] for all possible choices of the vectors \({\bf d}_1, \hdots, {\bf d}_N\) that satisfy the condition \[\begin{align} \begin{split} {\bf f}_1\cdot{\bf d}_1+\hdots+{\bf f}_N\cdot{\bf d}_N = 0. \end{split} \end{align}\] The vectors \({\bf d}_K\) are known as the virtual displacements and are usually denoted by \(\delta {\bf r}_K\). The virtual work performed by the applied force \({\bf F}_{ak}\) is defined as \({\bf F}_{ak}\cdot{\bf d}_K\); thus the equation above states that the combined virtual work of the applied forces \({\bf F}_{aK}\) and the inertial forces \(-m_K\ddot{\bf r}_K\) is zero.
How to obtain the equations of motion of the system of particles from the equation above?
Introduce a Lagrange multiplier, which we denote by the scalar function \(\mu = \mu(t)\), to accommodate the single constraint on the vectors \({\bf d}_K\): \[\begin{align} \begin{split} \sum_{K=1}^N\lp{\bf F}_{aK}-m\ddot{\bf r}_N\rp\cdot{\bf d}_K+\mu\sum_{K=1}^N{\bf f}_K\cdot{\bf d}_K = 0. \end{split} \end{align}\] As a consequence of the Lagrange multiplier \(\mu\), the vectors \({\bf d}_K\) can be varied independently. For the previous equation to hold for all such displacements, it is necessary and sufficient that \[\begin{align} \begin{split} m_K\ddot{\bf r}_K = {\bf F}_{aK}+\mu{\bf f}_K \qquad (K=1,\hdots,N). \end{split} \end{align}\] These equations are none other than the balances of linear momenta for a system of particles subject to the above constraint, for which the constraint forces are prescribed by use of Lagrange’s prescription: \[\begin{align} \begin{split} {\bf F}_{cK} = \mu{\bf f}_K\qquad (K=1,\dots,N). \end{split} \end{align}\]
23.10.2 Gauss’ Principle of Least Action
Suppose we have a system of \(N\) particles that are subject to the constraint \[\begin{align*} {\bf f}_1\cdot{\bf v}_1+\hdots+{\bf f}_N\cdot{\bf v}_N + e = 0. \end{align*}\] and suppose that the constraint forces are prescribed by using Lagrange’s prescription \({\bf F}_{cK} = \mu{\bf f}_K\), \((K=1,\hdots,N)\). Then, in any motion of the system that satisfies the constraint, the constraint forces \({\bf F}_{cK} = \mu{\bf f}_K\) are the least needed to ensure that the constraint is satisfied. That is, Lagrange’s prescription is in a sense optimal!
23.10.3 Hamilton’s Principle
For ease of exposition, we restrict our discussion to a single particle of mass \(m\) and suppose that the coordinates \(q = (q^1,q^2,q^2)\) are used to parametrize the position vector. Hamilton’s principle states that the motion of the system between a given initial configuration \(q(t_0)\) and a given final configuration \(q(t_1)\) is such that it extremizes the integral: \[\begin{align} \begin{split} I = \int_{t_0}^{t_1}Ldt \end{split} \end{align}\] where the Lagrangian \(L = T(q^i,u^i)-U(q^i)\) and \(t_0\) and \(t_1\) are fixed instances of time.
There are an infinite number of paths \(q(t)\) that can connect two possible configurations, and so finding one that extremizes \(I\) appears to be a daunting task.
The necessary conditions for the components of \(q(t)\) to extremize \(I\) are that \(q(t)\) satisfy the following differential equations: \[\begin{align} \frac{d}{dt}\lp\frac{\partial L}{\partial u^i}\rp-\frac{\partial L}{\partial q^i} = 0\qquad (k = 1,2,3). \end{align}\] In the context of extremizing \(I\) (calculus of variations), these are known as the Euler-Lagrange equations.

23.11 Exercises
Double pendulum
