If gravity were the only force acting, the gas would collapse down to a much smaller size. However, the gas is held up by gas pressure, or more precisely by the gradient of gas pressure. We need two equations, one to describe the hydrostatic equilibrium between the self-gravity and the gas pressure gradient, and one relating the gas pressure and density to the gas temperature T . The mass of the sun is grams, while the gravitational constant . In fact, you could actually calculate it.
P is the gas pressure and T is the temperature of the gas.
These, together with the density, vary throughout the sun. In the same spirit, replace r by . Solve the resulting equation for P . In this problem you will use the equation of hydrostatic equilibrium to find the thickness of the Earth's atmosphere. You will need to use the mass of the Earth, grams, and the radius of the Earth, cm.