Solution (source code)

= Solution

Let $\mathbf r=\mathbf r_2-\mathbf r_1$ and $r=|\mathbf r|$. <Newton's second law> for the two <planetesimals> gives
$$
\ddot{\mathbf r}_1=Gm_2\frac{\mathbf r}{r^3}+\frac{\mathbf F_1}{m_1},\qquad
\ddot{\mathbf r}_2=-Gm_1\frac{\mathbf r}{r^3}+\frac{\mathbf F_2}{m_2}.
$$
Subtracting yields the forced relative <two-body problem>
$$
\boxed{\ddot{\mathbf r}+G(m_1+m_2)\frac{\mathbf r}{r^3}
=\frac{\mathbf F_2}{m_2}-\frac{\mathbf F_1}{m_1}.}
$$
The internal gravitational forces cancel from the <centre of mass> equation but add in the relative equation; external forces affect the internal orbit through their difference in acceleration.