Consider a simple plane pendulum consisting of a mass m attached to a string of length l. After the pendulum is set into motion, the length of the string is shortened at a constant rate
dtdl=−α=constant
The suspension point remains fixed. Compute the Lagrangian and Hamiltonian functions. Compare the Hamiltonian and the total energy, and discuss the conservation of energy for the system.