# Help with solving Hamilton's equations for example in 3d

So I am trying to do the following example: $H(\vec{p},\vec{x}) = \sqrt{m_o^2c^4 + |\vec{p}|^2c^2} + V(\vec{x})$

$H$ is the Hamiltonian, $\vec{x},\vec{p}$ are position/momentum vectors respectively, $V$ is a potential and the other terms are mass and speed of light. I know that Hamilton's equations are: $\dot{x} = \partial H/\partial p$ and also $\dot{p} = - \partial H / \partial x$ I need to solve for $\vec{p}$ but I don't know where to go from here. That absolute value is really bugging me. Do I do this component-wise, i.e replace $|\vec{p}|^2$ with $p_x^2 + p_y^2 + p_z^2$? but then what do Hamilton's equations become? Please don't give me the answer, just set me on the right track :). Thanks.

• Yes, you can do it componentwise. – Blazej Aug 25 '16 at 10:17
• Further to Reghu Krishnan G's answer, bear in mind that the momenta used in Hamilton's equations are canonical momenta, which in general Hamiltonian systems differ from the kinetic momenta $p_i = m\dot{x}_i$. – J.G. Aug 26 '16 at 20:50

## 1 Answer

Yes, you can do it component-wise. As you have three momenta, you have to write Hamilton's equations for all of them.

\begin{align}\dot{x} &= \partial H/\partial p_x\\ \dot{y} &= \partial H/\partial p_y \\ \dot{z} &= \partial H/\partial p_z\end{align}

Similarly for the momenta

\begin{align}\dot{p_x} &= -~\partial H/\partial x\\ \dot{p_y} &= -~\partial H/\partial y\\ \dot{p_z} &= -~\partial H/\partial z\end{align}

• You need $-$ signs in the second set of equations. (Also you've written $\dot{p_x}$ instead of $\dot{p}_x$. – J.G. Aug 26 '16 at 20:48