A standing electrostatic wave has equation
To find the potential energy, note that
and
Now, the equations defining the generalized coordinates x and p do not depend on time. Furthermore, the force is derivable from a conservative potential, so it follows that H is a constant of motion given by