Simple Lagrangian for constrained motion - please give your input

AI Thread Summary
To find the Lagrangian for a particle constrained to move along the path defined by y = sin(x), one should not simply substitute the constraint into the Lagrangian. Instead, it is recommended to define the constraint equation and use Lagrange multipliers to account for the constraint properly. This method introduces an additional parameter, the undetermined Lagrange multiplier, which acts as a constraint force in the equations of motion. While substitution may yield correct results in some cases, it is not a reliable method and can lead to incorrect equations of motion. For accurate results, either use Lagrange multipliers or derive the Lagrangian without considering the constraint initially.
LFCFAN
Messages
22
Reaction score
0
Hello fellow PF members

I was wondering how one would go about finding the lagrangian of a problem like the following:

A particle is constrained to move along the a path defined by y = sin(x).


Would you simply do this:

x = x
y = sin(x)

x'^2 = x'^2

y'^2 = x'^2 (cos(x))^2


Kinetic energy = T = (1/2)m(x'^2 (1+ (cos(x))^2))

Potential = V = mgsin(x)


Therefore, the lagrangian is given by

L = T - V = (1/2)m(x'^2 (1+ (cos(x))^2)) - mgsin(x)



Or have a been totally wrong throughout?


Thanks a lot guys. Any input would be greatly appreciated.
 
Physics news on Phys.org
I think it looks fine.
 
Thanks. Would it be similar for all y=f(x)?
 
LFCFAN said:
Thanks. Would it be similar for all y=f(x)?
If there is always the constraint that the particle moves along the curve,then yes. You can also generalise this to surfaces. Consider a particle moving along a surface ##f(r,\theta, \phi) = 0##. This gives you a dependence among ##r, \theta ## and ##\phi## and you can express anyone of them in terms of another to eliminate the number of generalised coordinates and hence the number of Lagrange's equations you have to solve.
 
You can solve this particular constrained problem by substitution y -> sin(x), yes. However, that's not the general way of working with constrained motion. Substitution is not always trivial. Instead, one may define the equation of constraint.

f(x, y) = y - sin(x) = 0

In general, constraint can be any constant function. In this case, y - sin(x) is the obvious choice.

With constraints included, your Lagrangian picks up an extra parameter - Undetermined Lagrange Multiplier. It is customary for undetermined multiplier to be denoted as \lambda.

\mathcal{L}(x, y, \lambda) = T - V - \lambda f(x)

If you have multiple constraints, you can have multiple functions f_i(x, y, ...), each associated with its own multiplier \lambda_i. From here on, the necessary conditions for finding solution are exactly the same. So let's consider your kinetic and potential terms.

\mathcal{L} = \frac{1}{2}m\dot{x}^2 + \frac{1}{2}m\dot{y}^2 - mg~sin(x) - \lambda \left(y - sin(x)\right)

\frac{\partial \mathcal{L}}{\partial x} - \frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot{x}} = -mg~cos(x) + \lambda~cos(x) - m\ddot{x} = 0
\frac{\partial \mathcal{L}}{\partial y} - \frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot{y}} = - \lambda y - m\ddot{y} = 0

Or if we rearrange it into a bit more sightly form, we have the equations of motion.

m\ddot{x} = (\lambda - mg)cos(x)
m\ddot{y} = -\lambda

Here, it's pretty clear why multiplier \lambda works as a constraint force in the EoM. The neat thing about it is that even if you are using generalized coordinates, where trying to think about generalized forces might be a bit tricky, \lambda will continue to work as a generalized constraint force without you having to do any extra work.

Finally, if you solve the above keeping the constraint equation in mind, you should get exactly the same motion you'd get if you solved the problem using the substitution method.
 
K^2 said:
You can solve this particular constrained problem by substitution y -> sin(x), yes. However, that's not the general way of working with constrained motion. Substitution is not always trivial. Instead, one may define the equation of constraint.

f(x, y) = y - sin(x) = 0

In general, constraint can be any constant function. In this case, y - sin(x) is the obvious choice.

With constraints included, your Lagrangian picks up an extra parameter - Undetermined Lagrange Multiplier. It is customary for undetermined multiplier to be denoted as \lambda.

\mathcal{L}(x, y, \lambda) = T - V - \lambda f(x)

If you have multiple constraints, you can have multiple functions f_i(x, y, ...), each associated with its own multiplier \lambda_i. From here on, the necessary conditions for finding solution are exactly the same. So let's consider your kinetic and potential terms.

\mathcal{L} = \frac{1}{2}m\dot{x}^2 + \frac{1}{2}m\dot{y}^2 - mg~sin(x) - \lambda \left(y - sin(x)\right)

\frac{\partial \mathcal{L}}{\partial x} - \frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot{x}} = -mg~cos(x) + \lambda~cos(x) - m\ddot{x} = 0
\frac{\partial \mathcal{L}}{\partial y} - \frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot{y}} = - \lambda y - m\ddot{y} = 0

Or if we rearrange it into a bit more sightly form, we have the equations of motion.

m\ddot{x} = (\lambda - mg)cos(x)
m\ddot{y} = -\lambda

Here, it's pretty clear why multiplier \lambda works as a constraint force in the EoM. The neat thing about it is that even if you are using generalized coordinates, where trying to think about generalized forces might be a bit tricky, \lambda will continue to work as a generalized constraint force without you having to do any extra work.

Finally, if you solve the above keeping the constraint equation in mind, you should get exactly the same motion you'd get if you solved the problem using the substitution method.


Thanks a lot man.

But what I've done is correct, right? Literally can go on to find equations of motion with my lagrangian?
 
No you should not just substitute a constraint into your Lagrangian. Look again at how the Euler-Lagrange equations were derived, they were derived under the assuming that x,y,\dot{x},\dot{y} are independent .

Sometimes what you have done will work, but that's just an accident. In general it's incorrect and there's no guarantee the resulting equations of motion will be correct. What you should do, is either use the method of Lagrange multiplies like described above, or write down the Lagrangian without worrying about the constraint, and then apply it once you have the equations of motion.
 

Similar threads

Replies
2
Views
1K
Replies
3
Views
985
Replies
3
Views
2K
Replies
2
Views
1K
Replies
3
Views
2K
Replies
11
Views
2K
Back
Top