Lagrange multipliers: cylinder on an incline
The method of Lagrange multipliers offers a systematic way for me to handle constraints directly in variational mechanics. Given a system with generalized coordinates \mathbf{q} = (q_1, \dots, q_n) and holonomic constraints g_k(\mathbf{q}, t)=0 (k = 1, \dots, m), and the resulting system describes both the dynamics and the constraint forces systematically, providing flexibility for problems involving holonomic constraints.
For example, we can consider a cylinder rolling on an incline.
The unconstrained Lagrangian for x (center of mass) and \theta (rotation) is:
\mathcal{L} = \frac{1}{2} m \dot{x}^2 + \frac{1}{2} I \dot{\theta}^2 + mgx\sin\varphi
The constraint is: g(x, \theta) = x - R\theta = 0 and we introduce multiplier \lambda, so the Lagrangian is:
\mathcal{L}' = \frac{1}{2} m \dot{x}^2 + \frac{1}{2} I \dot{\theta}^2 + mgx\sin\varphi - \lambda(x - R\theta)
We apply Euler-Lagrange equations for \theta:
I\ddot{\theta} = \lambda R
We apply Euler-Lagrange equations for for x:
m\ddot{x} = mg\sin\varphi - \lambda
We use the constraint:
x = R\theta
We solve the system to find \ddot{x}, \ddot{\theta}, and \lambda.
This approach always yields a closed system encoding both the equations of motion and the constraint forces. The multipliers \lambda_k are interpreted as the generalized forces necessary to maintain the constraints.
For more insights into this topic, you can find the details here.