Consider a charged particle in a static electromagnetic field. Suppose that the domain is simply connected so that the second law of Newton's dynamics reads: $$ m\frac{\mathrm{d}^2\vec{x}}{\mathrm{d}t^2}=-e\left(\vec{\nabla}\Phi+\frac{\mathrm{d}\vec{x}}{\mathrm{d}t}\times(\vec{\nabla}\times\vec{A})\right) $$ where:
- $m$ is the mass of the particle,
- $\vec{x}$ is position vector,
- $\Phi$ the (scalar) electric potential,
- $\vec{A}$ the (vector) magnetic potential.
My question is how to derive the Hamiltonian formulation from here. The Hamiltonian is: $$ H(\vec{x},\vec{p})=\frac{1}{2m}\left\|\vec{p}-e\vec{A}\right\|^2+e\Phi(\vec{x}) $$ and the Hamilton equations look like: $$ \begin{cases} \frac{\mathrm{d}x_i}{\mathrm{d}t}=\frac{1}{m}(p_i-eA_i)\\ \frac{\mathrm{d}p_i}{\mathrm{d}t}=\frac{e}{m}\sum_{j=1}^3(p_j-eA_j)\frac{\partial A_j}{\partial x^i}-e\frac{\partial\Phi}{\partial x^i} \end{cases} $$ Another question related to this one is why the magnetic potential is "included" in the "generalized" moment $\vec{p}-e\vec{A}$. I undertand why from the Lagrangian of the system but perhaps there is a physical explanation.
EDIT:
Consider a single particle in a conservative force field $F=-\vec{\nabla}V$. Then the Newton's equations are: $$ m\frac{\mathrm{d}^2\vec{x}}{\mathrm{d}t^2}=-\vec{\nabla}V $$ This is a second order differential equation, which we can transform into a system of first order differential equations, by adding a new variable which is usually the speed $v$ in mathematics but here we will take the momentum $p=mv$. The system I am talking about is: $$ \begin{cases} \frac{\mathrm{d}\vec{x}}{\mathrm{d}t}=\frac{\vec{p}}{m}\\ \frac{\mathrm{d}\vec{p}}{\mathrm{d}t}=-\vec{\nabla}V(x) \end{cases} $$ which is just the hamiltonian form of the Newton's equations. Can we do the same kind of trick in the case of the system above?