I start from the defintion of H, and then plug in that p is the partial derivative of L wrt q dot.
The next stage is a bit iffy. I assume that the Kinetic energy can be assumed to be 1/2 m * ((q dot) squared), where q is the position vector. I argue that any other velocity dependent terms in the total energy should be be attributed to a time dependent potential. Then we get that the partial derivative of T wrt (q dot) is m*(q dot). Therefore H = T + V plus the scalar product of q dot with the partial derivative of V wrt (q dot).
This would indicate that H = E only if V is velocity independent. The only problem is I'm not sure if my assumption of the form of T is correct.
I have another related question.
"A bead of mass m slide without friction under gravity on a massless circular hoop of radius a which is set spinning with angular speed w about a vertical diameter. Show that it H = 1/2 m (a* (theta dot))^2 + Veff and write out Veff."
The bead clearly has two perpendicular velocities; in the plane of the ring (due to theta dot) and perp. to this plane (due to w), as well as the gpe.
We set L = T - V, but I'm unsure whether to consider the kinetic energy due to w as a part of T or V.
According to the (possibly eroneous) definition of T =1/2 m * ((q dot) squared), the w kinetic term should be considered an addition to V, and therefore should be subtracted in the Lagrangian, but obviously if it is considered an addition to T is should be added in L.
We are also asked to "explain why the energy of the bead is not constant". I'm confused about this because even the augmented potential is not velocity dependent, therefore we should get H = E, and the partial derivative of L wrt t is zero, therefore the total derivative of H should be zero, therefore E should be conserved.