Hamilton equations#Deriving Hamilton's equations