Solution (source code)

= Solution

For an inviscid fluid of constant <density>, with irrotational <velocity> $\mathbf u=\nabla\Phi$ and conservative body-force potential $\Psi$, the <Unsteady Bernoulli equation> is
$$
\boxed{\Phi_t+\frac12|\mathbf u|^2+\frac p\rho+\Psi=C(t)}.
$$
It holds throughout a connected irrotational fluid region, up to the time-dependent gauge of $\Phi$. Indeed the <Euler equations> and $\nabla\times\mathbf u=0$ imply that the gradient of the left side is zero. In the bubble problem there is no body-force contribution compatible with the assumed spherical symmetry.

Spherical incompressibility gives $\partial_r(r^2u_r)=0$. The moving interface imposes $u_r(R,t)=\dot R$, so
$$
\boxed{\mathbf u(r,t)=\frac{R^2\dot R}{r^2}\mathbf e_r,\qquad\Phi(r,t)=-\frac{R^2\dot R}{r}},\qquad r>R(t).
$$
This potential tends to zero at infinity, where the <velocity> tends to zero and $C(t)=p_\infty/\rho$. Differentiate $\Phi$ at fixed spatial $r$, not along the moving interface: $\Phi_t=-(2R\dot R^2+R^2\ddot R)/r$. At $r=R$, <pressure> <continuity> without <surface tension> gives $p=p_\infty-\Delta p$. Bernoulli therefore yields $-2\dot R^2-R\ddot R+\dot R^2/2-\Delta p/\rho=0$, or the <Rayleigh equation for an inviscid spherical bubble>
$$
\boxed{R\ddot R+\frac32\dot R^2=-\frac{\Delta p}{\rho}}.
$$

Integrating the <kinetic energy> over the exterior fluid gives
$$
K=\frac12\rho\int_R^\infty\left(\frac{R^2\dot R}{r^2}\right)^24\pi r^2\,dr=\boxed{2\pi\rho R^3\dot R^2}.
$$
Differentiate and use the radius equation:
$$
\dot K=4\pi\rho R^2\dot R\left(R\ddot R+\frac32\dot R^2\right)=-4\pi\Delta pR^2\dot R.
$$
With $R(0)=R_0$ and $\dot R(0)=0$, the <pressure-work energy balance for a spherical bubble> integrates to
$$
\boxed{2\pi\rho R^3\dot R^2=\frac{4\pi\Delta p}{3}(R_0^3-R^3)},
$$
or
$$
\boxed{\dot R^2=\frac{2\Delta p}{3\rho}\left(\frac{R_0^3}{R^3}-1\right)}.
$$
The collapsing branch takes the negative square root for $\dot R$. The energy gain is exactly the <pressure> difference times the lost bubble volume, providing a check on the sign and numerical factor.