# 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. Aug 25, 2016 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, 2016 at 20:50

• You need $-$ signs in the second set of equations. (Also you've written $\dot{p_x}$ instead of $\dot{p}_x$.