Solution (source code)

= Solution

Write the initial <mass density> as $\rho=mn$. The <ideal gas law> gives <pressure> $p=nk_BT$, and the sphere has $M=4\pi\rho R^3/3$. Here $k_B$ is the <Boltzmann constant> and $G$ is the <gravitational constant>. First obtain the <gravitational potential energy> by adding concentric shells. The mass inside radius $r$ is $M(r)=Mr^3/R^3$, so
$$
W=-\int_0^R\frac{GM(r)}r\,dM(r)
=-\int_0^R\frac{GMr^3}{R^3r}\frac{3Mr^2}{R^3}\,dr
=-\frac{3GM^2}{5R}.
$$
In a small contraction $dR<0$ at fixed total <mass>, the gravitational <energy> released is $-dW=3GM^2|dR|/(5R^2)$. The positive <work> required against the gas <pressure> is $-p\,dV=4\pi R^2p|dR|$. Equating these gives
$$
\frac{3GM^2}{5R^2}=4\pi R^2nk_BT
=\frac{3Mk_BT}{mR},\qquad
\frac{GMm}{R}=5k_BT.
$$
Use $R=(3M/(4\pi mn))^{1/3}$ to eliminate the radius. The <uniform-sphere pressure-work collapse criterion> is
$$
\boxed{M_{\rm crit}=\left(\frac{5k_BT}{Gm}\right)^{3/2}
\left(\frac{3}{4\pi mn}\right)^{1/2}
=\sqrt{\frac{375}{4\pi}}\frac{(k_BT)^{3/2}}{G^{3/2}m^2\sqrt n}.}
$$
The units are kilograms: $(k_BT/(Gm))^{3/2}$ has units $\mathrm{kg^{3/2}\,m^{-3/2}}$, and $\rho^{-1/2}$ supplies $\mathrm{kg^{-1/2}\,m^{3/2}}$. At fixed initial $n$ and $T$, $M>M_{\rm crit}$ makes gravity stronger than the pressure-work requirement in this model, allowing contraction.

This is a <Jeans mass> estimate for homologous contraction of an initially uniform sphere. It is not an exact stability limit for a hydrostatic gas sphere: uniform <mass density> and uniform <temperature> would give uniform <pressure>, rather than the gradient required by <hydrostatic equilibrium>. The numerical coefficient therefore differs from conventions based on a <Jeans instability> wavelength or a <pressure-confined isothermal sphere>. Subsequent contraction also depends on heat exchange; <isothermal pressure support during gravitational collapse> weakens relative to gravity as the radius decreases.