Lagrange multipliers: pendulum
When analyzing mechanical systems with constraints, we can rely on the method of Lagrange multipliers within the Lagrangian formalism. Constraints like fixed lengths or prescribed paths frequently require more than just the conservative forces that appear naturally in the standard Lagrangian \mathcal{L} = T - V. In such cases, generalized non-conservative forces accounting for constraints are introduced. If a system has k holonomic constraints
f_j(q_1, ..., q_n, t) = 0
for j = 1, ..., k, I include k Lagrange multipliers \lambda_j and construct an extended Lagrangian:
\mathcal{L}^{\prime} = \mathcal{L} + \sum_{j=1}^k \lambda_j f_j
The Euler-Lagrange equations then become
\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial \mathcal{L}^{\prime}}{\partial \dot{q}_i}\right) - \frac{\partial \mathcal{L}^{\prime}}{\partial q_i} = 0
This produces, for each coordinate,
\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial \mathcal{L}}{\partial \dot{q}_i}\right) - \frac{\partial \mathcal{L}}{\partial q_i} = \sum_{j=1}^k \lambda_j \frac{\partial f_j}{\partial q_i}
The right-hand side represents the generalized constraint forces, so each \lambda_j has a direct mechanical interpretation.
For a concrete example, I analyze a simple pendulum of mass m and length l, described in polar coordinates (r, \theta). The kinetic and potential energies are:
T = \frac{1}{2}m(\dot{r}^2 + r^2\dot{\theta}^2) V = -mgr\cos\theta
The constraint r - l = 0 is enforced by a multiplier \lambda_1, so the extended Lagrangian is:
\mathcal{L}^{\prime} = \frac{1}{2}m(\dot{r}^2 + r^2\dot{\theta}^2) + mgr\cos\theta + \lambda_1(r - l)
For \theta the constraint has no effect, and the equation of motion reduces to the classic pendulum equation:
\ddot{\theta} + \frac{g}{l} \sin\theta = 0
For r, the multiplier appears explicitly, and after applying r = l, \dot{r} = 0, and \ddot{r} = 0, I find:
\lambda_1 = -(ml\dot{\theta}^2 + mg\cos\theta)
This is the constraint force required to maintain the length. Interpreted physically, the tension in the rod is:
T_{rod} = -Q_r^{NC} = ml\dot{\theta}^2 + mg\cos\theta
This approach allows to determine constraint forces systematically.
For more insights into this topic, you can find the details here.