Legendre transformation
A Legendre transformation then produces the Hamiltonian