Follow a fluid element with position satisfying . The chain rule gives the material derivative
Apply Newton's second law to a material element of volume and mass . The net pressure force is , and gravity gives . Dividing by the element mass, neglecting viscosity and using the chain rule componentwise gives the Euler equation
For a static spherical isothermal gas, and . Trial density gives enclosed mass , so
This is the singular isothermal sphere. Its central density diverges, although the enclosed mass tends to zero linearly and its total mass inside a finite radius is finite. It is not the finite-central-density regular isothermal solution.
Truncate at with boundary pressure . Then and , giving
The external medium is being treated as a prescribed pressure boundary; its own gravitational field is excluded from the cloud self-energy calculation.
For a monatomic perfect gas, the equilibrium is isothermal but the internal-energy relation still uses its adiabatic index :
The gravitational self-energy follows by assembling shells:
Both integrals remain finite at the singular center. Consequently
The pressure-confined singular isothermal gas sphere therefore satisfies the virial theorem including the work of the confining surface pressure. One can see its origin directly by integrating : integration by parts gives , whose surface term is . An isolated vacuum-boundary version would omit that term and could not truncate this same positive-temperature isothermal profile at finite radius. The equality expresses equilibrium force and energy balance, rather than proving dynamical stability.