= Solution
Take canonical coordinates $q=x_1$ and $p=x_2$. The <Hamiltonian system> is
$$
\dot q=-\partial_p\phi(t,q,p),\qquad
\dot p=\partial_q\phi(t,q,p).
$$
In the standard <Hamilton's equations> $\dot q=\partial_p H$ and $\dot p=-\partial_qH$, its <Hamiltonian> is
$$
\boxed{H(t,q,p)=-\phi(t,q,p).}
$$
An arbitrary function of $t$ can be added without affecting the <characteristic curves>. The <Hamiltonian> generally depends on time through $\omega$ and need not be conserved along a trajectory.
Back to article page