Stellar mass conservation equation (source code)

= Stellar mass conservation equation
{title2=$dm/dr=4\pi r^2\rho$}

In spherical <stellar structure>, a shell of <radius> $r$, thickness $dr$ and <mass density> $\rho$ has <mass> $dm=4\pi r^2\rho\,dr$. Integrating outward gives the <enclosed mass>, $m(r)=4\pi\int_0^r\rho(s)s^2ds$.