# Clarifying constraint forces in Lagrangian dynamics

In the Lagrangian formulation, the addition of constraint forces that are unknown can be done with Lagrange multipliers, which allows for the forces to be found. Taking $k$ constraints of the form $f_k(q,t)=0$, we have

$$\frac{d}{dt}\frac{\partial L}{\partial \dot{q}}-\frac{\partial L}{\partial {q}}+\sum{\lambda_k \frac{\partial f_k}{\partial {q}}}=0.$$

So, the questions:

1. Are the $\lambda_k$ the constraint forces (and therefore equal for each $q_i$), or is $\lambda_k \frac{\partial f_k}{\partial {q_i}}$ the $i$th component of the $k$th constraint force?

2. Should the signs of the constraint forces be interpreted as positive along the $\hat{q}$ direction and negative opposing?

I have worked out the Lagrangian for a car going around a banked curve at constant speed, radius, etc., to see if I could derive the constraint forces.

$$L = \frac{m}{2}(\dot{z}^2+R^2\dot{\theta}^2+\dot{R}^2)-mgz$$

with constraint $f = z-R\tan(\alpha)=0$.

I get, from the $z$ equation (after applying $\ddot{z}=0$),

$$\lambda = mg$$

and, from the R equation (after applying $\ddot{R}=0$),

$$\lambda=-\frac{mR\dot{\theta}^2}{\tan(\alpha)}.$$

From the FBD, it's easily seen that $tan(\alpha) = \frac{m\omega^2R}{mg}$, which is consistent with the idea that what I really had above were $\lambda_z$ and $\lambda_R$, leading to $F_z=\lambda \frac{\partial f}{\partial {z}}$ and $F_R=\lambda \frac{\partial f}{\partial {R}}$.

• I'm trying to figure out why I haven't had any bites on my questions. Is it that physicsstack isn't visited by enough folks with this level of experience, that they know it but think that it's trivial, that the question isn't well-posed or relevant (IMHO, I think that it is both), or something else? Jan 30 '14 at 16:38

Your second guess, namely that $\lambda_k \frac{\partial f_k}{\partial {q_i}}$ is the $i$th component (in the generalized coordinate basis) of the $k$th constraint force, is almost the correct answer to your 1st question. There is only a sign error. Probably this sign error is due to the fact that there are two different sign-convention for the Lagrange multipliers (the $\lambda_k$'s); and you used one in setting up the Lagrange equations and the other when writing up the constraint force. Perhaps that's also why your second question is exactly about this sign.

Let's start form the beginning with one choice for the sign convention:

Given a Lagrangian $L$ and constraint functions $f_k(\{q_i\}, t)$ (i.e., $f_k(\{q_i\}, t)=0$ has to be satisfied during the motion), the constraint-modified Lagrangian is as follows:

$$L \mapsto L' = L + \sum_k \lambda_k f_k(\{q_i\}, t).$$

For this system, we have the constraint equations, $\partial L'/\partial \lambda_k=f_k(\{q_i\}, t)=0$, and the Lagrange equations of motion

$$\frac{d}{dt}\frac{\partial L'}{\partial \dot{q}_i}-\frac{\partial L'}{\partial {q}_i}=\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_i}-\frac{\partial L}{\partial {q}_i}-\sum_k{\lambda_k \frac{\partial f_k}{\partial {q}_i}}=0.$$

(Note the sign difference compared to your convention). Or in an other way:

$$\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_i}=\frac{\partial L}{\partial {q}_i}+\sum_k{\lambda_k \frac{\partial f_k}{\partial {q}_i}}$$

Now the term $\frac{\partial L}{\partial {q}_i}$ describes the usual non-constaint forces due to potential energy in the original Lagrangian, hence the additional terms $\lambda_k \frac{\partial f_k}{\partial {q_i}}$ describe the extra forces due to the constraints. Btw, note that the force vector of the $k$th constraint has components $\lambda_k \frac{\partial f_k}{\partial {q_i}}$ which is perpendicular to the constraint surface defined by $f_k(\{q_i\}, t)=0$ - and it is exactly this kind of constraint forces one would expect to arise.

To summarize: the $i$th component (in the generalized coordinate basis) of the $k$th constraint force is $\lambda_k \frac{\partial f_k}{\partial {q_i}}$. (In your sign-convention for the Lagrange multiplier it would be $-\lambda_k \frac{\partial f_k}{\partial {q_i}}$.)

I hope this answer helped a bit.

Cheers, ZZ