Solution (source code)

= Solution

Multiply <hydrostatic equilibrium> by $4\pi r^3dr$ and integrate from centre to surface. <Integration by parts>, neglecting external surface <pressure>, gives
$$
-3\int P\,dV=-\int_0^M\frac{GM_r}{r}\,dM_r=\Omega.
$$
For an <ideal gas> with a constant <adiabatic index>, $U=\int P\,dV/(\gamma-1)$. Consequently
$$
\boxed{3(\gamma-1)U+\Omega=0.}
$$
A fully ionized, nonrelativistic monatomic <gas> has $\gamma=5/3$, provided <gas> rather than radiation or degeneracy dominates the thermal equation of state. It then obeys $\boxed{2U+\Omega=0}$ and $E=U+\Omega=-U=\Omega/2$.

Added nuclear <heat> initially raises <pressure> and causes expansion. The expansion makes gravitational <energy> less negative and can lower the <temperature> of the self-gravitating <gas>, reducing the temperature-sensitive fusion rate. Conversely, a small contraction can raise the core <temperature> and increase burning. This negative feedback explains stable main-sequence burning in an ordinary nondegenerate stellar core; a degenerate core need not respond the same way.

Before <hydrogen> ignition, a cloud loses <energy> by radiation and contracts. Its gravitational <energy> decreases; for the ideal-gas virial relation, roughly half the released binding <energy> <heats> the <gas> and half is radiated. Heating continues until <nuclear reactions> can balance the <luminosity>, explaining the Kelvin-Helmholtz <phase> of pre-main-sequence evolution.

The effective adiabatic response varies with <ionization>, molecular dissociation, <radiation pressure> and degeneracy. Partial <ionization> can absorb compression <energy> and lower the local first adiabatic exponent below $4/3$, encouraging compressibility, convection and pulsational instability. A local outer layer with $\gamma\le4/3$ does \b[not] by itself prove global collapse: ordinary <stars> have <ionization> layers of that kind. The dynamical stability criterion concerns a suitable pressure-weighted global response and its coupling to the eigenmode; an extended <star> with an effectively global exponent below $4/3$ can be dynamically unstable.