function Hval = H_ho(x,p)
  % Harmonic oscillator Hamiltonian
  global k m
  Hval = p^2/(2*m) + k*x^2/2;
end
