Hamiltonian of the double pendulum