Show that the equation of motion for an undamped simple pendulum
$y'' + \frac{g}{l}sin(y)=0$
can be written in Hamiltonian form.
So this is the Euler-Lagrange form of the simple pendulum equation, which I know can be written in Hamiltonian form, and from there I can extract the canonical/Hamilton equations, nonetheless, if I attempt to write this as a system of first order differential equations and attempt to define the potential and kinetic energy I become stuck. So far I have the first order equations
$y_1'=y_2$
$y_2'=-\frac{g}{l}sin(y_1)$
nonetheless, if I define the potential as
$y_2'=-\frac{g}{lm}sin(y_1) = -\frac{1}{m}\frac{dU(y)}{dy}$
taking the kinetic energy as T=$\frac{my_2^2}{2}$,
then the total energy would read
$E(y_1,y_2) = U(y_1) + \frac{my_2^2}{2}$,
$E(y_1,y_2) = \frac{g}{l}cos(y_1) + \frac{my_2^2}{2}$,
hence, the Hamiltonian form would read
$y_1' = my_2$ and $y_2' = -\frac{g}{ml}sin(y_1)$
Is the Total energy equation correct? As well as the Hamilton equations? Any help would be greatly appreciated.
Define the potential a bit different
$$ -\frac{gm}{l}\sin y_1 = - \frac{\partial}{\partial y_1}U(y_1) $$
and the kinetic energy as
$$ T = \frac{1}{2}my_2^2 $$
The Hamiltonian is then
$$ H(y_1, y_2) = \frac{1}{2}my_2^2 + U(y_1) $$
and the equations of motion are
\begin{eqnarray} \frac{{\rm d}y_1}{{\rm d}t} &=& \frac{\partial H}{\partial y_2} = my_2 \\ \frac{{\rm d}y_2}{{\rm d}t} &=& -\frac{\partial H}{\partial y_1} = -\frac{\partial U}{\partial y_1} = -\frac{gm}{l}\sin y_1 \end{eqnarray}
That being said, I don't see why you need to introduce the factor $m$. If you truly need it in your equations, remember that $H$ and $H/m$ will lead to the same equations of motion