- #1
pondzo
- 169
- 0
Homework Statement
I am asked to find the Hamiltonian of a system with the following Lagrangian:
##L=\frac{m}{2}[l^2\dot\theta^2+\dot{\tilde{y}}^2+2l\dot{\tilde{y}}\dot{\theta}\sin{\theta}]-mg[\tilde{y}-l\cos{\theta}]##
Homework Equations
##H = \dot{q_i}\frac{\partial L}{\partial \dot{q_i}}-L=\dot{\theta}\frac{\partial L}{\partial \dot{\theta}}-L##
##p_i=\frac{\partial L}{\partial \dot{q_i}}\implies p_{\theta}=\frac{\partial L}{\partial \dot{\theta}}##
The Attempt at a Solution
##H = \dot{\theta}\frac{\partial L}{\partial \dot{\theta}}-L\\
~~~=\dot{\theta}[ml^2\dot{\theta}^2+ml\dot{\tilde{y}}\sin{\theta}]-L\\
~~~=\frac{m}{2}[2l^2\dot{\theta}^2+2ml\dot{\tilde{y}}\dot{\theta}\sin{\theta}]-L\\
~~~=\frac{m}{2}[l^2\dot{\theta}-\dot{\tilde{y}}^2]+mg[\tilde{y}-l\cos{\theta}]\\\\##
##p_{\theta}=\frac{\partial L}{\partial \dot{\theta}}=ml^2\dot{\theta}+ml\dot{\tilde{y}}\sin{\theta}\\
\implies \dot{\theta}=\frac{p_{\theta}-ml\dot{\tilde{y}}\sin{\theta}}{ml^2}\\~~~~~~~~~~~~~=\frac{p_{\theta}}{ml^2}-\frac{\dot{\tilde{y}}}{l}\sin{\theta}\\\\##
After plugging this into the above form of the Hamiltonian and a little simplifying I get:
##H=\frac{m}{2}[\frac{p_{\theta}^2}{m^2l^2}-\frac{2p_{\theta}\dot{\tilde{y}}}{ml}-\dot{\tilde{y}}^2\cos{\theta}^2]+mg[\tilde{y}-l\cos{\theta}]##
I would like to know if this is correct and in particular, if the method is correct.We have not been taught how to take the Legendre transformation of the Lagrangian to get the Hamiltonian so I am unsure of the first equation I have listed in "Relevant equations". Thank you for any help!