If $(y(t), p(t))$ satisfies Hamilton's equations with Hamiltonian $H$, and $(Y, P) = \Phi(y, p)$ is a canonical transformation, then $(Y(t), P(t))$ satisfies Hamilton's equations with the transformed Hamiltonian $\tilde H(x, Y, P) = H(x, y(Y, P), p(Y, P))$.