How to calculate the force of gravity that wants to collapse a star?

In astrophysics, the pressure created by the outflow of energy from the interior of the star counteracts the force of gravity that wants to collapse the star. If I want to calculate this force for a star of given Mass and Radius how should I do it?

At the moment, I think that Newton's Law of Gravitation might be employed to solve this problem, but I don't know which pair of masses to consider. One mass could be the entire mass of the star. But what is the other mass?

-
By considering the stellar structure equations? – Kyle Kanos Mar 11 at 12:35
Am I not thinking things through completely; but since a non-variable star is radiating energy at the same rate that countering collapse is requiring fusion to produce it can't you derive the force of gravity from its luminosity? – Dan Neely Mar 11 at 16:04
@DanNeely No, not quite. For a star of a given mass, the same luminosity can be produced by different combinations of temperature and surface area (radius), but as gravity only depends on radius then a range of gravities are possible. You can estimate the gravity of a star if you know its effective temperature and its nuclear burning stage. – Rob Jeffries Mar 11 at 16:13

The basic concept here is that of hydrostatic equilibrium.

If you consider a thin slab of material of density $\rho$ and thickness $\Delta r$ in the star. It has a pressure of $P$ below the slab and a pressure $P + \Delta P$ above the slab. The weight of the slab will be $\rho g A \Delta r$, where $A$ is the area covered by the slab and $g$ is the local value of gravity. To keep the slab in equilibrium you need to balance this weight with the force exerted upwards on the slab due to the pressure difference between the top and bottom. i.e. $$\rho g\ A\ \Delta r = -\Delta P\ A$$ Thus $\rho g\ \Delta r = -\Delta P$ and as $\Delta r \rightarrow 0$, we can say $$\frac{dP}{dr} = -\rho(r) g(r) = - \rho \frac{GM(<r)}{r^2},$$ where $\rho(r)$ and $g(r)$ are functions of radius within the star and $M(<r)$ is the mass contained within radius $r$.

To solve this differential equation requires a self-consistent solution of the equations of stellar structure (involving the energy generation and energy transport equations), since the pressure also depends on temperature and composition.

To make progress with this in a back-of-the-envelope kind of way then some vast simplifications are required, namely an assumption about how the density depends on radius. If we assume that the density is constant (awful, but it does give the right proportionalities) then $$\frac{dP}{dr} = - \frac{G \rho}{r^2} \frac{4\pi}{3} \rho r^3$$ $$\int^{0}_{P(r)} dP = - \frac{4\pi G \rho^2}{3} \int^{R}_{r} r\ dr,$$ where $P=0$ at the surface of the star where $r=R$.
$$P(r) = \frac{2\pi G \rho^2}{3} (R^2 - r^2)$$

Then we could put this in terms of the mass of the star $M$ by noting that $\rho =3M/4\pi R^3$ $$P(r) = \frac{2\pi G}{3}\left(\frac{3M}{4\pi R^3}\right)^2 (R^2 - r^2) = \frac{3G}{8\pi}\left(\frac{M^2}{R^4}\right)\left(1 -\frac{r^2}{R^2}\right),$$ and the central pressure (at $r=0$) would be $$P(0) = \frac{3G}{8\pi} \left(\frac{M^2}{R^4}\right)$$

The proportionality is correct here, but comparison with a real star, like the Sun reveals that whilst the average pressure is reasonable, the central pressure is a couple of orders of magnitude too low, because the density of the Sun is not constant - the pressure and density are much higher in the centre.

-

What you are asking for is something called Gravitational collapse

Gravitational collapse is the condensing of an astronomical object due to the influence of its own gravity, which tends to draw matter inward toward the center of mass. Gravitational collapse is a fundamental mechanism for structure formation in the universe. Over time an initial relatively smooth distribution of matter will collapse to form pockets of higher density, typically creating a hierarchy of condensed structures such as clusters of galaxies, stellar groups, stars and planets.

For a more mathematical answer check out the pressure term in Einstein's equation here: http://math.ucr.edu/home/baez/einstein/node6.html

Update:

Jean's Mass

The concept of the Jean's Mass as the critical mass for collapse into a star is an important concept. The "Jean's mass" is the minimum mass that can overcome the radiation pressure for a given energy density in radiation.

Virial theorem

Gravity can be applied to a finite collection of particles which interact with each other by gravitational attraction. We can attribute to the collection of particles a total gravitational potential energy and a total kinetic energy. The virial theorem states that

Average kinetic energy = $\boldsymbol {-\frac {1}{2} \times}$ Average potential energy

One application of this theorem would be to a known mass of hydrogen gas in a proto-star. If you had a good estimate of the mass of the gas and could measure a sample of particle velocities to determine the kinetic energy, then you could predict the kinetic energy as the gas cloud underwent gravitational collapse. So for a given radius of collapse, you could make a prediction of the temperature of the hydrogen gas in terms of the kinetic energy and could make a prediction about when it would reach the ignition temperature for hydrogen fusion.

-
I don't see how this post answers the question. You mention the terminology of what OP wants, but not how to calculate it, which is what was asked. – Kyle Kanos Mar 11 at 12:47
@KyleKanos given the complexity of a full calculation, I'm willing to give the responder some slack here. – Carl Witthoft Mar 11 at 13:40
@Carl: yes, let's stop wanting actual answers to questions because they're 'complex' (nevermind that Rob managed to give a good answer). – Kyle Kanos Mar 11 at 16:03