<p>Just for fun I'll plot the data cited in <a href="https://astronomy.stackexchange.com/a/43916/7982">@planetmaker's answer</a> and use the equation there to plot the gravity.</p>
<p>We'll apply <a href="https://en.wikipedia.org/wiki/Shell_theorem" rel="nofollow noreferrer">Newton's shell theorem</a> to their equation:</p>
<p><span class="math-container">$$g(R) = \frac{G}{R^2}\int_0^R \varrho(r) 4\pi r^2 dr = \frac{Gm(R) }{R^2} $$</span></p>
<p>where <span class="math-container">$m(R)$</span> is the mass enclosed by a sphere of radius <span class="math-container">$R$</span>.</p>
<p><a href="https://i.sstatic.net/6LlCY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6LlCY.png" alt="mass and gravitational acceleration of the Sun vs depth" /></a></p>
<p>I plotted using this script.</p>
<p>It prints out <code>31.1  standard Earth gravities at surface</code> which is close to <a href="https://en.wikipedia.org/wiki/Sun" rel="nofollow noreferrer">Wikipedia's 28 Earth gravities</a>. I didn't use interpolation or numerical integration or even <a href="https://en.wikipedia.org/wiki/Simpson%27s_rule" rel="nofollow noreferrer">Simpson's rule</a>, so a 10% error is not surprising.</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt

G = 6.67430E-11 # m^3/kg/s^2

data = [[float(x) for x in line.split()[:2]] for line in table.splitlines()]
m, r = np.array(data).T

r_solar, m_solar = 696342000., 1.9885E+30 # meters, kilograms

r_real, m_real = r * r_solar, m * m_solar

g = G * m_real[1:] / r_real[1:]**2

print(g[-1]/9.815, 'standard Earth gravities at surface')

plt.figure()
plt.subplot(2, 1, 1)
plt.plot(r, m)
plt.xlabel('r/r_solar')
plt.ylabel('enclosed mass/m_solar')
plt.subplot(2, 1, 2)
plt.plot(r_real[1:]/1000., g)
plt.xlabel('R (km)')
plt.ylabel('g(R) (m/s^2)')
plt.show()
</code></pre>
<p>using the copy pasted text of the table from <a href="http://www.sns.ias.edu/%7Ejnb/SNdata/Export/BP2004/bp2004stdmodel.dat" rel="nofollow noreferrer">here</a> as <code>table</code>.</p>

CC BY-SA 4.0
2021-05-22T02:42:00.987Z
2021-05-22T08:43:06.850Z
2021-05-22T08:43:06.850Z
uhoh
<p>Yes. Insofar as such thing might be possible (perhaps in the style of the novel “The Mote in God’s Eye”), and assuming a star that has a spherically symmetrical mass distribution:</p>
<p>Gravity inside a star acts like if all the stuff in the shell of matter farther from the star’s center than you wasn’t there at all. You feel attraction only from the stuff “beneath you” (the inside sphere of mass closer to the star’s center than your ship). This result is typically proven via Gaussian surfaces.</p>
<p>To paint a mental picture: on an idealized Earth you feel exactly zero gravity from the atmosphere everywhere on the planet, and all the gravity force comes from the ground underneath your feet.</p>
<p>So the formula is the same Newton’s gravity formula and you only need to know the mass density function of the star (which by necessity of the spherical symmetry assumption must depend only on the distance to the star’s center). You integrate that density function from 0 to your ship’s distance from the star’s center, so you know what <span class="math-container">$M_1$</span> to plug into Newton’s gravity equation.</p>
<p>Notice that the spherical symmetry is vital to this result. If the mass density of the star is not spherically symmetrical, the Gaussian surface argument doesn’t hold and you are going to have to integrate the gravity equation for the whole star (below and above you) to find out.</p>
<p>(Also of course we assume that the star is not so dense and close that General Relativity starts to become important)</p>

CC BY-SA 4.0
2021-05-21T14:10:36.990Z
Are there any citations you can provide here?
WarpPrime
CC BY-SA 4.0
2021-05-21T15:00:26.817Z
If you want me to add citations to make it a better answer, yes I can add something, but probably not while I’m at work; I’ll try this evening. If you just want to be convinced, you can search this site or physics.se for the words ‘Gauss gravity’ and you’ll get dozens of matches with a fuller treatment. This is a fairly common question and I wouldn’t be surprised if this question is flagged as a duplicate before the day is over.
Euro Micelli
CC BY-SA 4.0
2021-05-21T13:56:45.470Z
2021-05-21T13:56:45.470Z
Euro Micelli
<p>For an atom of mass <span class="math-container">$m$</span> in the sun to be at a constant radius <span class="math-container">$R$</span>, the centrifugal force due to any non-radial thermal velocity component <span class="math-container">$v$</span> must be equal to the gravitational force, i.e.</p>
<p><span class="math-container">$$m\frac{v^2}{R} = \frac{Gm}{R^2}\int_0^R \varrho(r) 4\pi r^2 dr$$</span></p>
<p>Assuming an isothermal gas (<span class="math-container">$v=const.$</span>), this requires obviously a radial density distribution
<span class="math-container">$$\varrho(r) \propto\frac{1}{r^2}$$</span></p>
<p>This is assuming a collisionless gas ball (undisturbed orbits of the atoms) and may therefore not be a particularly realistic model for a star, but it is interesting that this leads to the same radial density distribution <span class="math-container">$1/r^2$</span>as the condition of hydrostatic pressure equilibrium for an isothermal ideal gas sphere</p>
<p><span class="math-container">$$\frac{1}{\varrho(R)}\frac{dP(R)}{dR}= \frac{kT}{\varrho(R)}\frac{d\varrho(R)}{dR} = \frac{Gm}{R^2}\int_0^R \varrho(r) 4\pi r^2 dr$$</span></p>
<p>The gravitational force in this case is <span class="math-container">$\propto 1/R$</span>.</p>
<p>Any temperature dependence on <span class="math-container">$R$</span> would obviously change the result.</p>

CC BY-SA 4.0
2021-05-29T16:35:18.417Z
@AtmosphericPrisonEscape *A globular cluster is not a star* The difference between them is pretty much irrelevant here. The OP's question can be applied to either of them. An isothermal self-gravitating spherical mass will always have a radial density density $\propto 1/r^2$ in steady state and thus a gravitational force $\propto 1/r$ . Generally speaking, a self-gravitating structure will always adjust its density distribution so that its internal energy balances against gravity everywhere.
Thomas
CC BY-SA 4.0
2021-05-22T16:33:07.277Z
This is a strange answer, why are you bringing the centrifugal force into this? The centrifugal force cannot have anything to do with the structure of a star, as it would flatten out into a disc and the pressure gradient would be set by the velocity, not by density... you cannot separate the three forces, they always exist in simultaneous equilibrium!
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-23T09:02:20.260Z
@AtmosphericPrisonEscape The velocity here is the thermal velocity of the atoms, not the rotational velocity of the star. And in order for an atom to remain at the same radial distance $R$ the gravitational force must equal the centrifugal force. This is assuming a collisionless gas ball (undisturbed orbits of the atoms) and is therefore not a particularly realistic model for a star, but it is interesting that this leads to the same radial density distribution as the condition of hydrostatic pressure equalibrium for an isothermal sphere..
Thomas
CC BY-SA 4.0
2021-05-23T15:22:41.540Z
You are apparently trying to apply stellar orbit theory to a pressure-supported gas, this is so wrong, I don't even know where to start. 1.) Your Eqn. (1) is not a kinetic equation, so you cannot claim for it to have anything to do with the thermal velocity of atoms. 2.) Your Eqn. (1) only implies $mv^2/R=GmM/R^2$, which you might recognize as the force-balance for a centrifugally supported structure (i.e. a disk). It does NOT imply anything for the density profile of the disk, as centrifugally supported structures generally can support ANY density profile. 3.) $F_{centr} + F_{press} + F_G =0$
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-23T15:36:27.160Z
@AtmosphericPrisonEscape The first equation I wrote is for a self-gravitating collisionless gas sphere, so the density profile is vital (as you can check by trying different profiles). And although the gas is of course in reality not collisionless, the answer obtained from this is identical to that obtained from the condition for hydrostatic equilibriun of an ideal gas sphere.
Thomas
CC BY-SA 4.0
2021-05-23T16:12:10.950Z
I know what those equations are, but you're trying to fit a King profile to a star, which couldn't be more wrong. You have not addressed my criticism in any way.
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-23T17:38:04.237Z
@AtmosphericPrisonEscape I did address your criticism where  you falsely stated my equation would not imply anything for the density profile when it in fact explicitly appears there  (the equation in your comment is not the one I wrote). I also mentioned  that it holds for an atom in a collisionless gas, so there is no pressure term, and also that the density profile required from hydrostatic pressure equilibrium is the same. So there is no basis for you to say the approach couldn't be more wrong. It may not be the traditional way of doing it, but it should be helpful to understand the problem
Thomas
CC BY-SA 4.0
2021-05-23T17:46:43.720Z
Your density profiles integrates out to the enclosed mass $M(r)$, and $m$ cancels on both sides. Again, no contraints exist on the density profile for a centrifugally supported structure. You then continue to plug your centrifugal solution into a pressure-supported one, this isn't just non-traditional, it is inconsistent. See the other answers for a correct approach.
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-23T17:58:33.530Z
@AtmosphericPrisonEscape The constraint is that the left hand side of the equation (the centrifugal force an atom in orbit around the center experiences) goes like $1/R$ for constant $v$, This requires that the density in the integral on the right hand side goes like $1/R^2$. The same density profile results completely unrelated if you equate the gravitational force with the radial pressure gradient for an isothermal ideal gas.
Thomas
CC BY-SA 4.0
2021-05-23T18:21:09.493Z
For the latter part, it is true that $\rho(r) \propto r^{-2}$ solves as ansatz for pressure balanced with gravity. Doesn't make first part more sensible, or selectively balancing forces, or assuming isothermality in the first place for a star, does it?
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-23T18:30:37.100Z
I'll try it one last time: A globular cluster is not a star.
AtmosphericPrisonEscape
CC BY-SA 4.0
2021-05-22T15:16:10.750Z
2021-05-23T14:31:22.247Z
2021-05-23T14:31:22.247Z
Thomas
<p>If you consider a radially symmetric mass distribution, the gravity experienced at a distance <span class="math-container">$R$</span> from the center is caused by the mass inside the sphere with radius <span class="math-container">$R$</span>, thus the mass <span class="math-container">$$M(R) = \int_0^R \varrho(r)  4 \pi r^2 dr$$</span> In a radial-symmetric case one can show that the contribution of all masses outside <span class="math-container">$R$</span> cancel each other.</p>
<p>Thus the experienced gravitational acceleration at radius <span class="math-container">$R$</span> is
<span class="math-container">$$g(R) = \frac{G}{R^2}\int_0^R \varrho(r) 4\pi r^2 dr$$</span></p>
<p>The interesting part here is to know the radial density variation <span class="math-container">$\varrho(r)$</span> inside your body, thus the Sun in this case. This depends on the equation of state of the matter - which in turn is one of the least well known equations. Deriving that requires intricate modelling of the Sun. There are at least two nice answers which give the <a href="https://astronomy.stackexchange.com/questions/32729/at-what-depth-below-the-suns-surface-does-the-density-reach-that-of-water/32734#32734">radial</a> <a href="https://physics.stackexchange.com/questions/201235/density-of-the-sun/201239#201239">density</a> variation. There's a link in the first answer to <a href="http://www.sns.ias.edu/%7Ejnb/SNdata/Export/BP2004/bp2004stdmodel.dat" rel="nofollow noreferrer">data</a> for the standard solar model for radius, density, enclosed mass etc.</p>
<p>EDIT to add a way to address the density profile:</p>
<p>One may try to get a handle on the density by assuming a polytropic model for the star, such that the relation between pressure <span class="math-container">$p$</span> and density <span class="math-container">$\varrho$</span> reads like
<span class="math-container">$$ p = K \varrho^\frac{n+1}{n}$$</span></p>
<p>With a constant <span class="math-container">$k$</span> and the polytrope index <span class="math-container">$n$</span>. This is a result of the solutions of the <a href="https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation" rel="nofollow noreferrer">Lane-Emden equation</a>
<span class="math-container">$$\frac{1}{\xi^2} \frac{\mathrm{d}}{\mathrm{d}\xi} \left(\xi^2\frac{\mathrm{d}\theta}{\mathrm{d}\xi}\right) + \theta^n = 0$$</span>which is a dimensionless form of the Poisson equation for a radially-symmetric self-gravitating polytropic fluid, thus where density follows a function of the form <span class="math-container">$\varrho = \varrho_c \theta^n$</span> with a central density <span class="math-container">$\varrho_c$</span>. This equation can be solved <a href="https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Exact_solutions" rel="nofollow noreferrer">exactly</a> for polytrope index 0 (isobaric polytrope), 1 (isothermal polytrope) and 5 (limited use as it results in infinite stellar radius) and can be addressed <a href="https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Analytic_solutions" rel="nofollow noreferrer">analytically</a> via convergent series and can also be solved <a href="https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Numerical_solutions" rel="nofollow noreferrer">numerically</a> for a wide range of cases.</p>
<p>Yet a main sequence star is believed to be around <span class="math-container">$n=3$</span> for the radiation zone. Fully convective stars follow more an adiabatic gradient with n = 5/3 being the ratio of the heat capacity at constant pressure and heat capacity at constant volume for an ideal mono-atomic gas. You will have to integrate the equation numerically for these cases, though.</p>
<p>(<a href="https://de.wikipedia.org/wiki/Reinhard_Meinel" rel="nofollow noreferrer">Reinhard Meinel</a> gives excellent lectures on relativistic astrophysics - and I still use my notes from back then as reference - but I'm sadly not aware of any published form of the notes on this particular topic... maybe <a href="https://doi.org/10.1017/CBO9780511535154" rel="nofollow noreferrer">this</a>)</p>

CC BY-SA 4.0
2021-05-22T02:01:07.683Z
You can mention a [polytrope model](https://en.wikipedia.org/wiki/Polytrope) but I don't know how to get $\rho(r)$ out of that.
uhoh
CC BY-SA 4.0
2021-05-22T07:57:39.530Z
Good point. It moves the problem to picking the right polytrope index, though.
planetmaker
CC BY-SA 4.0
2021-05-23T00:27:38.520Z
Wow, excellent update, thank you! I've made an edit further differentiating the types of solutions using the Wikipedia article's terminology. fyi I've just asked in Math SE [Could there be exact solutions to the Lane-Emden equation for real n≥0 other than 0, 1, or 5?](https://math.stackexchange.com/q/4148101/284619)
uhoh
CC BY-SA 4.0
2021-05-21T15:41:16.370Z
2022-07-04T15:05:07.177Z
2022-07-04T15:05:07.177Z
planetmaker
<p>Recently, I <a href="https://astronomy.stackexchange.com/a/43912/31410">answered this question</a> and need some clarification regarding the gravity when within the radius of a star. I thought that, when something is inside a star (ignoring drag), it will experience less gravity because as it goes deeper inside, more and more mass is outside (in the up direction) the distance left before it reaches the center. Is this true, and is there a formula that needs certain parameters to calculate it?</p>

CC BY-SA 4.0
2021-05-21T15:14:49.350Z
In general relativity, this is how https://en.wikipedia.org/wiki/Tolman%E2%80%93Oppenheimer%E2%80%93Volkoff_equation
Daddy Kropotkin
CC BY-SA 4.0
2021-05-21T15:15:38.193Z
You have to also consider that the star does not have uniform density, so as you go deeper into the interior there is more mass above you, yes, but you're approaching higher densities as well. It is complicated.
Daddy Kropotkin
CC BY-SA 4.0
2021-05-21T21:24:20.150Z
See https://en.wikipedia.org/wiki/Shell_theorem & https://astronomy.stackexchange.com/search?q=+shell+theorem
PM 2Ring
<star><gravity><radius>
Gravity inside a star?
WarpPrime
# Gravity inside a star?

(Asked by: username_0 on 2021-05-21)

Recently, I [answered this question](https://astronomy.stackexchange.com/a/43912/31410) and need some clarification regarding the gravity when within the radius of a star. I thought that, when something is inside a star (ignoring drag), it will experience less gravity because as it goes deeper inside, more and more mass is outside (in the up direction) the distance left before it reaches the center. Is this true, and is there a formula that needs certain parameters to calculate it?

**Tags:** star, gravity, radius

> **Comments:**
> **username_1**: In general relativity, this is how https://en.wikipedia.org/wiki/Tolman%E2%80%93Oppenheimer%E2%80%93Volkoff_equation  
> **username_1**: You have to also consider that the star does not have uniform density, so as you go deeper into the interior there is more mass above you, yes, but you're approaching higher densities as well. It is complicated.  
> **username_2**: See https://en.wikipedia.org/wiki/Shell_theorem & https://astronomy.stackexchange.com/search?q=+shell+theorem  

---

## 4 answers

### Answer by username_7 on 2021-05-21. Score: 6 | Accepted answer

If you consider a radially symmetric mass distribution, the gravity experienced at a distance $R$ from the center is caused by the mass inside the sphere with radius $R$, thus the mass $$M(R) = \int\_0^R \varrho(r) 4 \pi r^2 dr$$ In a radial-symmetric case one can show that the contribution of all masses outside $R$ cancel each other.

Thus the experienced gravitational acceleration at radius $R$ is
$$g(R) = \frac{G}{R^2}\int\_0^R \varrho(r) 4\pi r^2 dr$$

The interesting part here is to know the radial density variation $\varrho(r)$ inside your body, thus the Sun in this case. This depends on the equation of state of the matter - which in turn is one of the least well known equations. Deriving that requires intricate modelling of the Sun. There are at least two nice answers which give the [radial](https://astronomy.stackexchange.com/questions/32729/at-what-depth-below-the-suns-surface-does-the-density-reach-that-of-water/32734#32734) [density](https://physics.stackexchange.com/questions/201235/density-of-the-sun/201239#201239) variation. There's a link in the first answer to [data](http://www.sns.ias.edu/%7Ejnb/SNdata/Export/BP2004/bp2004stdmodel.dat) for the standard solar model for radius, density, enclosed mass etc.

EDIT to add a way to address the density profile:

One may try to get a handle on the density by assuming a polytropic model for the star, such that the relation between pressure $p$ and density $\varrho$ reads like
$$ p = K \varrho^\frac{n+1}{n}$$

With a constant $k$ and the polytrope index $n$. This is a result of the solutions of the [Lane-Emden equation](https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation)
$$\frac{1}{\xi^2} \frac{\mathrm{d}}{\mathrm{d}\xi} \left(\xi^2\frac{\mathrm{d}\theta}{\mathrm{d}\xi}\right) + \theta^n = 0$$which is a dimensionless form of the Poisson equation for a radially-symmetric self-gravitating polytropic fluid, thus where density follows a function of the form $\varrho = \varrho\_c \theta^n$ with a central density $\varrho\_c$. This equation can be solved [exactly](https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Exact_solutions) for polytrope index 0 (isobaric polytrope), 1 (isothermal polytrope) and 5 (limited use as it results in infinite stellar radius) and can be addressed [analytically](https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Analytic_solutions) via convergent series and can also be solved [numerically](https://en.wikipedia.org/wiki/Lane%E2%80%93Emden_equation#Numerical_solutions) for a wide range of cases.

Yet a main sequence star is believed to be around $n=3$ for the radiation zone. Fully convective stars follow more an adiabatic gradient with n = 5/3 being the ratio of the heat capacity at constant pressure and heat capacity at constant volume for an ideal mono-atomic gas. You will have to integrate the equation numerically for these cases, though.

([Reinhard Meinel](https://de.wikipedia.org/wiki/Reinhard_Meinel) gives excellent lectures on relativistic astrophysics - and I still use my notes from back then as reference - but I'm sadly not aware of any published form of the notes on this particular topic... maybe [this](https://doi.org/10.1017/CBO9780511535154))

> **Comments:**
> **username_3**: You can mention a [polytrope model](https://en.wikipedia.org/wiki/Polytrope) but I don't know how to get $\rho(r)$ out of that.  
> **username_7**: Good point. It moves the problem to picking the right polytrope index, though.  
> **username_3**: Wow, excellent update, thank you! I've made an edit further differentiating the types of solutions using the Wikipedia article's terminology. fyi I've just asked in Math SE [Could there be exact solutions to the Lane-Emden equation for real n≥0 other than 0, 1, or 5?](https://math.stackexchange.com/q/4148101/284619)  

---

### Answer by username_3 on 2021-05-22. Score: 4

Just for fun I'll plot the data cited in @username_7's answer and use the equation there to plot the gravity.
We'll apply Newton's shell theorem to their equation:
$$g(R) = \frac{G}{R^2}\int_0^R \varrho(r) 4\pi r^2 dr = \frac{Gm(R) }{R^2} $$
where $m(R)$ is the mass enclosed by a sphere of radius $R$.

I plotted using this script.
It prints out 31.1  standard Earth gravities at surface which is close to Wikipedia's 28 Earth gravities. I didn't use interpolation or numerical integration or even Simpson's rule, so a 10% error is not surprising.
import numpy as np
import matplotlib.pyplot as plt

G = 6.67430E-11 # m^3/kg/s^2

data = [[float(x) for x in line.split()[:2]] for line in table.splitlines()]
m, r = np.array(data).T

r_solar, m_solar = 696342000., 1.9885E+30 # meters, kilograms

r_real, m_real = r * r_solar, m * m_solar

g = G * m_real[1:] / r_real[1:]**2

print(g[-1]/9.815, 'standard Earth gravities at surface')

plt.figure()
plt.subplot(2, 1, 1)
plt.plot(r, m)
plt.xlabel('r/r_solar')
plt.ylabel('enclosed mass/m_solar')
plt.subplot(2, 1, 2)
plt.plot(r_real[1:]/1000., g)
plt.xlabel('R (km)')
plt.ylabel('g(R) (m/s^2)')
plt.show()

using the copy pasted text of the table from here as table.


---

### Answer by username_4 on 2021-05-21. Score: 2

Yes. Insofar as such thing might be possible (perhaps in the style of the novel “The Mote in God’s Eye”), and assuming a star that has a spherically symmetrical mass distribution:

Gravity inside a star acts like if all the stuff in the shell of matter farther from the star’s center than you wasn’t there at all. You feel attraction only from the stuff “beneath you” (the inside sphere of mass closer to the star’s center than your ship). This result is typically proven via Gaussian surfaces.

To paint a mental picture: on an idealized Earth you feel exactly zero gravity from the atmosphere everywhere on the planet, and all the gravity force comes from the ground underneath your feet.

So the formula is the same Newton’s gravity formula and you only need to know the mass density function of the star (which by necessity of the spherical symmetry assumption must depend only on the distance to the star’s center). You integrate that density function from 0 to your ship’s distance from the star’s center, so you know what $M\_1$ to plug into Newton’s gravity equation.

Notice that the spherical symmetry is vital to this result. If the mass density of the star is not spherically symmetrical, the Gaussian surface argument doesn’t hold and you are going to have to integrate the gravity equation for the whole star (below and above you) to find out.

(Also of course we assume that the star is not so dense and close that General Relativity starts to become important)

> **Comments:**
> **username_0**: Are there any citations you can provide here?  
> **username_4**: If you want me to add citations to make it a better answer, yes I can add something, but probably not while I’m at work; I’ll try this evening. If you just want to be convinced, you can search this site or physics.se for the words ‘Gauss gravity’ and you’ll get dozens of matches with a fuller treatment. This is a fairly common question and I wouldn’t be surprised if this question is flagged as a duplicate before the day is over.  

---

### Answer by username_5 on 2021-05-22. Score: 0

For an atom of mass $m$ in the sun to be at a constant radius $R$, the centrifugal force due to any non-radial thermal velocity component $v$ must be equal to the gravitational force, i.e.

$$m\frac{v^2}{R} = \frac{Gm}{R^2}\int\_0^R \varrho(r) 4\pi r^2 dr$$

Assuming an isothermal gas ($v=const.$), this requires obviously a radial density distribution
$$\varrho(r) \propto\frac{1}{r^2}$$

This is assuming a collisionless gas ball (undisturbed orbits of the atoms) and may therefore not be a particularly realistic model for a star, but it is interesting that this leads to the same radial density distribution $1/r^2$as the condition of hydrostatic pressure equilibrium for an isothermal ideal gas sphere

$$\frac{1}{\varrho(R)}\frac{dP(R)}{dR}= \frac{kT}{\varrho(R)}\frac{d\varrho(R)}{dR} = \frac{Gm}{R^2}\int\_0^R \varrho(r) 4\pi r^2 dr$$

The gravitational force in this case is $\propto 1/R$.

Any temperature dependence on $R$ would obviously change the result.

> **Comments:**
> **username_6**: This is a strange answer, why are you bringing the centrifugal force into this? The centrifugal force cannot have anything to do with the structure of a star, as it would flatten out into a disc and the pressure gradient would be set by the velocity, not by density... you cannot separate the three forces, they always exist in simultaneous equilibrium!  
> **username_5**: @username_6 The velocity here is the thermal velocity of the atoms, not the rotational velocity of the star. And in order for an atom to remain at the same radial distance $R$ the gravitational force must equal the centrifugal force. This is assuming a collisionless gas ball (undisturbed orbits of the atoms) and is therefore not a particularly realistic model for a star, but it is interesting that this leads to the same radial density distribution as the condition of hydrostatic pressure equalibrium for an isothermal sphere..  
> **username_6**: You are apparently trying to apply stellar orbit theory to a pressure-supported gas, this is so wrong, I don't even know where to start. 1.) Your Eqn. (1) is not a kinetic equation, so you cannot claim for it to have anything to do with the thermal velocity of atoms. 2.) Your Eqn. (1) only implies $mv^2/R=GmM/R^2$, which you might recognize as the force-balance for a centrifugally supported structure (i.e. a disk). It does NOT imply anything for the density profile of the disk, as centrifugally supported structures generally can support ANY density profile. 3.) $F_{centr} + F_{press} + F_G =0$  
> **username_5**: @username_6 The first equation I wrote is for a self-gravitating collisionless gas sphere, so the density profile is vital (as you can check by trying different profiles). And although the gas is of course in reality not collisionless, the answer obtained from this is identical to that obtained from the condition for hydrostatic equilibriun of an ideal gas sphere.  
> **username_6**: I know what those equations are, but you're trying to fit a King profile to a star, which couldn't be more wrong. You have not addressed my criticism in any way.  
> **username_5**: @username_6 I did address your criticism where  you falsely stated my equation would not imply anything for the density profile when it in fact explicitly appears there  (the equation in your comment is not the one I wrote). I also mentioned  that it holds for an atom in a collisionless gas, so there is no pressure term, and also that the density profile required from hydrostatic pressure equilibrium is the same. So there is no basis for you to say the approach couldn't be more wrong. It may not be the traditional way of doing it, but it should be helpful to understand the problem  
> **username_6**: Your density profiles integrates out to the enclosed mass $M(r)$, and $m$ cancels on both sides. Again, no contraints exist on the density profile for a centrifugally supported structure. You then continue to plug your centrifugal solution into a pressure-supported one, this isn't just non-traditional, it is inconsistent. See the other answers for a correct approach.  
> **username_5**: @username_6 The constraint is that the left hand side of the equation (the centrifugal force an atom in orbit around the center experiences) goes like $1/R$ for constant $v$, This requires that the density in the integral on the right hand side goes like $1/R^2$. The same density profile results completely unrelated if you equate the gravitational force with the radial pressure gradient for an isothermal ideal gas.  
> **username_6**: For the latter part, it is true that $\rho(r) \propto r^{-2}$ solves as ansatz for pressure balanced with gravity. Doesn't make first part more sensible, or selectively balancing forces, or assuming isothermality in the first place for a star, does it?  
> **username_6**: I'll try it one last time: A globular cluster is not a star.  
> **username_5**: @username_6 *A globular cluster is not a star* The difference between them is pretty much irrelevant here. The OP's question can be applied to either of them. An isothermal self-gravitating spherical mass will always have a radial density density $\propto 1/r^2$ in steady state and thus a gravitational force $\propto 1/r$ . Generally speaking, a self-gravitating structure will always adjust its density distribution so that its internal energy balances against gravity everywhere.  

---

