## Modelling Pressure at in a Star

We can simply model a star as made up of shells of gas held in equilibrium by gravity pulling+ the shell in, at gas pressure pushing the shell out - or rather a greater gas pressure acting on the inside of the shell over the outside.
$\frac{Gmdm}{r^2}= -4 \pi r^2 dp$

where
$r$
is the distance from the centre of the star to the shell of mass
$dm$
and
$m$
is the mass inside the sphere with this radius, and
$4 \pi r^2$
is the surface area of one side of the shell, and
$dp$
is the pressure difference between the inside and outside of the shell. The negative sign indicates the forces are opposed.
We can write the above equation as
$dp= - \frac{Gn}{4 \pi r^4} dm$
then integration gives
$p(M)-p(0)= - \int^M_0 \frac{Gm}{r^4} dm$

We can obtain a lower limit for the pressure
$P(0)$
at the centre of the by taking
$p(M)=0$
at
$r=R$
in the integral to give
$p(0) \gt \frac{GM^2}{8 \pi R^4}$