Solution (source code)

= Solution

At the moving boundary,
$$
Q=4\pi a^2\dot a.
$$
Substitution into the result of part (b) gives the <Rayleigh collapse of a spherical cavity>[Rayleigh collapse equation]
$$
a\ddot a+\frac32\dot a^2=-\frac{p_0}{\rho}.
$$
Treat $v=\dot a$ as a function of $a$, so that $\ddot a=v\,dv/da$. With $w=v^2$, the equation becomes
$$
a\frac{dw}{da}+3w=-\frac{2p_0}{\rho}.
$$
Multiplication by the <integrating factor> $a^3$ after division by $a$ gives
$$
\frac d{da}(a^3w)=-\frac{2p_0}{\rho}a^2.
$$
Using $w(a_0)=0$,
$$
w(a)=\frac{2p_0}{3\rho}
\left(\frac{a_0^3}{a^3}-1\right).
$$
The collapsing branch has negative radial velocity, so
$$
\boxed{
\dot a=-\sqrt{\frac{2p_0}{3\rho}
\left(\frac{a_0^3}{a^3}-1\right)}
}.
$$