Solution (source code)

= Solution

For $V=-km/r$, one has $dV/dr=kmu^2$, so
$$
u''+u=K,
\qquad K=\frac{km^2}{\ell^2}.
$$
After choosing the angular origin, the solution is
$$
u=K(1+e\cos\theta),
\qquad
r=\frac{p}{1+e\cos\theta},
\qquad p=\frac1K.
$$
For $0\leq e<1$, using $r=\sqrt{x^2+y^2}$ and $r+ex=p$ gives
$$
(1-e^2)\left(x+\frac{ep}{1-e^2}\right)^2+y^2
=\frac{p^2}{1-e^2}.
$$
This is an ellipse, with the force centre at one focus, as described by a <Kepler orbit>.