In this formalism, the dynamics of a system are governed by Hamilton's equations, which express the time derivatives of position and momentum variables in terms of partial derivatives of a function called the Hamiltonian: d q d t = ∂ ∂ H ∂ ∂ p , d p d t = − − ∂ ∂ H ∂ ∂ q . The Hamiltonian is the Legendre transform of the Lagrangian, and in many situations of physical interest it is equal to the total energy of the system.