# Hamiltonian for the two-body problem

References: Shankar, R. (1994), Principles of Quantum Mechanics, Plenum Press. Section 2.5; Exercise 2.5.4.

Here we derive the equations of motion of the two-body problem using the Hamiltonian formalism.

The Hamiltonian is given by

$\displaystyle H\left(q,p\right)=\sum_{i}p_{i}\dot{q}_{i}-L\left(q,\dot{q}\right) \ \ \ \ \ (1)$

where the velocities ${\dot{q}_{i}}$ are expressed in terms of the positions ${q_{i}}$ and momenta ${p_{i}}$. In this case, we start with the Lagrangian in terms of the centre of mass position ${\mathbf{r}_{CM}}$ and the relative position ${\mathbf{r}}$ of mass 2 to mass 1.

 $\displaystyle L$ $\displaystyle =$ $\displaystyle \frac{1}{2}\left(m_{1}+m_{2}\right)\left|\dot{\mathbf{r}}_{CM}\right|^{2}+\frac{1}{2}\frac{m_{1}m_{2}}{m_{1}+m_{2}}\left|\dot{\mathbf{r}}\right|^{2}-V\left(\mathbf{r}\right)\ \ \ \ \ (2)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{M}{2}\left|\dot{\mathbf{r}}_{CM}\right|^{2}+\frac{\mu}{2}\left|\dot{\mathbf{r}}\right|^{2}-V\left(\mathbf{r}\right) \ \ \ \ \ (3)$

where ${M=m_{1}+m_{2}}$ is the total mass and ${\mu=\frac{m_{1}m_{2}}{m_{1}+m_{2}}}$ is the reduced mass.

There are potentially 6 velocity components and 6 coordinate components in the Lagrangian, but the 3 components of ${\mathbf{r}_{CM}}$ do not appear, which simplifies things a bit. To convert to a Hamiltonian, we need the momenta

$\displaystyle p_{i}=\frac{\partial L}{\partial\dot{q}_{i}} \ \ \ \ \ (4)$

The ${x}$ component of momentum of the centre of mass is

$\displaystyle p_{CM,x}=\frac{\partial L}{\partial\dot{r}_{CM,x}}=M\dot{r}_{CM,x} \ \ \ \ \ (5)$

The other two components of the centre of mass velocity, and of the relative velocity, have a similar form, and in general we can write

 $\displaystyle p_{CM,i}$ $\displaystyle =$ $\displaystyle M\dot{r}_{CM,i}\ \ \ \ \ (6)$ $\displaystyle p_{i}$ $\displaystyle =$ $\displaystyle \mu\dot{r}_{i} \ \ \ \ \ (7)$

In vector notation, this becomes

 $\displaystyle \dot{\mathbf{r}}_{CM}$ $\displaystyle =$ $\displaystyle \frac{\mathbf{p}_{CM}}{M}\ \ \ \ \ (8)$ $\displaystyle \dot{\mathbf{r}}$ $\displaystyle =$ $\displaystyle \frac{\mathbf{p}}{\mu}\ \ \ \ \ (9)$ $\displaystyle \left|\dot{\mathbf{r}}_{CM}\right|^{2}$ $\displaystyle =$ $\displaystyle \frac{\left|\mathbf{p}_{CM}\right|^{2}}{M^{2}}\ \ \ \ \ (10)$ $\displaystyle \left|\dot{\mathbf{r}}\right|^{2}$ $\displaystyle =$ $\displaystyle \frac{\left|\mathbf{p}\right|^{2}}{\mu^{2}} \ \ \ \ \ (11)$

The Lagrangian thus becomes

$\displaystyle L=\frac{\left|\mathbf{p}_{CM}\right|^{2}}{2M}+\frac{\left|\mathbf{p}\right|^{2}}{2\mu}-V\left(\mathbf{r}\right) \ \ \ \ \ (12)$

The Hamiltonian is

 $\displaystyle H$ $\displaystyle =$ $\displaystyle \mathbf{p}\cdot\dot{\mathbf{r}}+\mathbf{p}_{CM}\cdot\dot{\mathbf{r}}_{CM}-L\ \ \ \ \ (13)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{\left|\mathbf{p}\right|^{2}}{\mu}+\frac{\left|\mathbf{p}_{CM}\right|^{2}}{M}-\left[\frac{\left|\mathbf{p}_{CM}\right|^{2}}{2M}+\frac{\left|\mathbf{p}\right|^{2}}{2\mu}-V\left(\mathbf{r}\right)\right]\ \ \ \ \ (14)$ $\displaystyle$ $\displaystyle =$ $\displaystyle \frac{\left|\mathbf{p}_{CM}\right|^{2}}{2M}+\frac{\left|\mathbf{p}\right|^{2}}{2\mu}+V\left(\mathbf{r}\right) \ \ \ \ \ (15)$

Once we’ve got the Hamiltonian, we can apply Hamilton’s canonical equations to get the equations of motion.

 $\displaystyle \frac{\partial H}{\partial p_{i}}$ $\displaystyle =$ $\displaystyle \dot{r}_{i}\ \ \ \ \ (16)$ $\displaystyle -\frac{\partial H}{\partial r_{i}}$ $\displaystyle =$ $\displaystyle \dot{p}_{i} \ \ \ \ \ (17)$

Since ${\mathbf{r}_{CM}}$ does not appear in the Hamiltonian, we have

 $\displaystyle \dot{\mathbf{p}}_{CM}$ $\displaystyle =$ $\displaystyle 0\ \ \ \ \ (18)$ $\displaystyle \mathbf{p}_{CM}$ $\displaystyle =$ $\displaystyle \mbox{constant} \ \ \ \ \ (19)$

so the momentum of the centre of mass does not change, as expected.

For ${\mathbf{r}}$, we have

 $\displaystyle \frac{\partial H}{\partial p_{i}}$ $\displaystyle =$ $\displaystyle \frac{p_{i}}{\mu}=\dot{r}_{i}\ \ \ \ \ (20)$ $\displaystyle \frac{\partial H}{\partial r_{i}}$ $\displaystyle =$ $\displaystyle \frac{\partial V}{\partial r_{i}}=-\dot{p}_{i} \ \ \ \ \ (21)$

The first equation tells us nothing new, while the second is just Newton’s law for a central force: ${\mathbf{\dot{p}}=-\nabla V}$.