Solution (source code)

= Solution

Exclude collisions from the ejection count. The effective collision width is $2R_p$, while the favorable noncolliding ejection width is $(b_{\rm ej}-R_p)_+$. Define the first flyby-ejection threshold and the equal-rate crossover by
$$
Q_{\rm hit}=\frac{\gamma R_p}{2\mu_p\kappa},\qquad
\boxed{Q_{\rm crit}=3Q_{\rm hit}=\frac{3[3-2\sqrt{2q/a_p}]R_p}{2\mu_p\sqrt{2(1-q/a_p)}}.}
$$
There are no direct noncolliding ejections in this weak-deflection model for $Q\leq Q_{\rm hit}$. Above that threshold, comparison of the two rates gives \b[collision is more likely for $Q<Q_{\rm crit}$, while ejection is more likely for $Q>Q_{\rm crit}$.] In the deep-crossing limit $Q_{\rm crit}\simeq[9/(2\sqrt2)](M_\star/M_p)R_p$, so its scaling at fixed density is $M_\star M_p^{-2/3}\rho_p^{-1/3}$. Order-one factors depend on encounter geometry; the robust condition compares $(M_p/M_\star)Q$ with $R_p$.

Adding the mutually exclusive rare-event loss rates gives the <collision-ejection lifetime of a comet>:
$$
\boxed{t_{\rm life}\simeq\frac{t_{\rm col}}{1+\tfrac12(Q/Q_{\rm hit}-1)_+}.}
$$
For $Q\leq Q_{\rm hit}$ this is $t_{\rm col}\propto Q^{3/2}$. For $Q\gg Q_{\rm hit}$ it approaches $t_{\rm ej}\propto Q^{1/2}$. A logarithmic sketch therefore bends from slope $3/2$ to slope $1/2$, with no maximum. At the equal-rate crossover the lifetime is half either individual loss time.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2018/iii/paper-316-comet-lifetime.png]
{title=<Collision-ejection lifetime of a comet>}
{description=The mutually exclusive collision and flyby-ejection times and their combined lifetime, scaled to the equal-rate crossover.}

These asymptotic branches use the corrected residence density from part iii and require $Q\gg a_p$ and a local encounter scale below the <Hill radius>. They cannot be extrapolated indefinitely to arbitrarily distant weakly bound orbits.