I have derived the following expression for t as a function of r:
t = the integral from r to ro of [2/m (E - u(r) - l^2/2mr^2)]^-1/2 dr
I have the equation of a parabola L/r = 1 + cos(theta)
L = l^2 / Gm^2M
u(r) = -GmM / r
I have let E = 0 and substitute into equation for time, then using the fact that
1 year = [2*pi*R^(3/2)] / (GM)^(1/2)
If you calculate the angular momentum by requiring that the point of closest approach is at r = kR, then you should be able to obtain the result. The integral you wrote down gives the time needed to go from R to kR which is half the time the comet spends at radius smaller than R.
Let's start from the beginning. I'll work with quantities per unit mass of the comet. The energy per unit mass of the comet is:
E = 1/2 r-dot^2 + 1/2 r^2theta-dot^2 - GM/r (1)
The angular momentum per unit mass of the comet is:
L = r^2 theta-dot (2)
We can eliminate ...
A detailed solution is given.