The Hamilton equations of motion are $$ \frac{dx}{dt} = p $$ $$ \frac{dp}{dt} = -x $$ The Hamiltonian $H = \frac{1}{2}(x^2 + p^2)$ is conserved, so along a solution it is some constant, say $E$. Then we can solve for $p$: $$ p = \sqrt{2E - x^2}$$ Then Hamilton's equations reduce to $$ \frac{dx}{dt} = \sqrt{2E - x^2}$$ which is a separable first order ODE. We obtain $$ \int \frac{dx}{\sqrt{2E - x^2}} = \int dt$$ which is a solution in "quadratures" (explicit integrals of known functions). The Liouville theorem for integrable systems should be thought of as a generalization of separable ODEs.