# The Hamiltoninian function always verifies $H(-p,q)=H(p,q)$?

Is it true that the Hamiltoninian function of a system always verifies $$H(-p,q)=H(p,q)$$? If $$H$$ is the sum of the potential energy plus the kinetic energy then it seems true. But is there a possible case where this does not hold?

• Magnetic fields? Commented Dec 29, 2020 at 1:55

It is not true in the case of the electromagnetic Hamiltonian for a charged particle in an electromagnetic field: $$H = \frac{(\mathbf{p}-q\, \mathbf{A})^2}{2m} + q\phi,$$ where $$\mathbf{A}$$ is the vector (Magnetic) potential, $$\phi$$ is the scalar (Electric) potential, and $$q$$ and $$m$$ are the particle's charge and its mass, respectively.
We can take a free particle, with $$T = \frac{1}{2} m \dot{x}^2$$ & $$U = 0$$, and redefine our coordinates so that $$x \equiv q + u t$$ for some constant $$u$$. In terms of these new coordinates, it works out that $$\mathcal{L} = \frac{1}{2} m (\dot{q} - u)^2$$, and that $$\mathcal{H} = \frac{p^2}{2m} + p u.$$ This Hamiltonian does not have the desired symmetry under $$p \to - p$$.