Are there likely to be stars for which the average density is greater than the density at the centre? Intuitively, I would say not, as density tends to decrease outwards, but ideally I would appreciate a clear mathematical justification for this.

  • 2
    $\begingroup$ Not an answer, but this may be helpful; look for Hydrostatic Equilibrium in Equations of Stellar Structure and in How Stars Work $\endgroup$
    – uhoh
    Commented Aug 16, 2020 at 22:12
  • $\begingroup$ How would the average of anything be larger than the maximum value over which it is averaged? What am I missing here? $\endgroup$ Commented Sep 24, 2021 at 10:52
  • 1
    $\begingroup$ @AtmosphericPrisonEscape The question is about the central density, which could in principle be zero (e.g. for a hollow object). Of course, no star is going to be like that… $\endgroup$ Commented Sep 24, 2021 at 13:50
  • $\begingroup$ @PeterErwin: Ah yes, if you assume that the maximum can be somewhere else than in the center, the question make sense. $\endgroup$ Commented Sep 24, 2021 at 14:42

3 Answers 3


$$\frac{dP}{dr} = - \rho g,$$ is the equation of hydrostatic equilibrium, where $\rho$ and $g$ are the local density and gravity, $P$ is pressure and $r$ is the radial coordinate. This can be rewritten as $$\frac{d\rho}{dr} \frac{dP}{d\rho} = -\rho g.$$

Since $\rho$ and $g$ are positive numbers, the pressure gradient is negative.

For all types of matter $P = f(\rho)$, such that $dP/d\rho$ is also positive (i.e. pressure increases with density).

Thus $d\rho/dr$ is negative and the density increases towards the middle.

Note that you ask about real stars, where the energy transport is by radiation or convection and the equation of state is that of an ideal, perfect gas. Two well-known results are that $P \propto \rho^{4/3}$ in radiative zones and $P\propto \rho^{5/3}$ in convection zones. So in both cases, pressure increases with density, regardless of what is happening with the temperature.

If instead we consider degenerate stars (either electrons or neutrons), then they tend to be isothermal, because of excellent thermal conductivity. But still $P \propto \rho^{\alpha}$ with $4/3 < \alpha < 5/3$ and $dP/d\rho$ is positive.

So it is impossible to construct a star with a density inversion using standard stellar equations of state and heat transport mechanisms.

EDIT: It might be possible to invent an equation of state that could result in a density inversion, requiring $dP/d\rho<0$. For example you might consider a situation where a sufficiently negative temperature gradient might counterbalance a positive density gradient. i.e. if $P = f(\rho, T)$ then $$ \frac{dP}{d\rho} = \frac{\partial P}{\partial \rho} + \frac{\partial P}{\partial T} \frac{dT}{d\rho}$$
and $dP/d\rho<0$ if $$ \frac{dT}{d\rho} < -\frac{\partial P/\partial \rho}{\partial P/\partial T}$$

  • $\begingroup$ Sorry, but asserting $P = f(\rho)$ for “all types of matter” is just bogus. Case in point, you may have water in your cup at atmospheric pressure with $\rho \approx 1000\:\mathrm{\frac{kg}{m^3}}$. But put that water in an enclosed steam kettle and bring to the boiling point, pressure will increase drastically without $\rho$ increase – on the contrary it decreases. $P = f(\rho,T)$ is closer to being true. So your argument would only hold true if $T$ were constant or increasing with radius, which is not at all true either. $\endgroup$ Commented Aug 17, 2020 at 10:10
  • 2
    $\begingroup$ The real problem with radially-increasing $\rho$ is that absent sufficient viscosity, it immediately spurs convection which reduces the temperature gradient until density is radially-decreasing. $\endgroup$ Commented Aug 17, 2020 at 10:15
  • 1
    $\begingroup$ @leftaroundabout It is not bogus to claim that P is a function of density. It is obviously not ONLY a function of density (an ideal gas being a case in point). However, I see your point and will think about it. In real stars convection zones have $P\propto \rho^{5/3}$ and radiative zone have $P \propto \rho^{4/3}$ independent of any consideration of the temperature. $\endgroup$
    – ProfRob
    Commented Aug 17, 2020 at 10:15

Not as a steady state, for sure. If there happen to be a part less dense than its surroundings it would just float to the surface.

This is called buoyancy and the math is basic enough.

Stars don't have solid parts and cannot sustain a state different from the hydrostatic near-equilibrium.

Then again, some transient event like supernova Ia explosion may create inverse density distribution with a void in the center, but I am not sure it is a legitimate star anymore at this point (AFAIR Ia explosions leave no dense remnant).

  • 1
    $\begingroup$ Apart from “solid parts” or viscosity, magnetohydrodynamic forces can also stabilise a non-hydrostatic density configuration. I think this doesn't happen in stars themselves, but it does happen in space plasma all around. $\endgroup$ Commented Aug 17, 2020 at 10:30
  • $\begingroup$ @leftaroundabout I think you should write an answer. Your comments are quite valid and you might be able to put something together more comprehensive and succinct. I have paused at present (too busy) before reproducing a whole load of stuff about stability against convection. $\endgroup$
    – ProfRob
    Commented Aug 17, 2020 at 10:40
  • $\begingroup$ @leftaroundabout affect yes, stabilise no because these phenomena are dynamic in nature. Sun spots are non-hydrostatic, yes (the whole convection is not hydrostatic by definition, but the spots are even less so). Now that I am thinking about it, there are stars that have convection in their cores so they do have some density variation there. Then again, the convection is extremely efficient mechanism for heat exchange and the goal put in the OP (density less than the average) is unthinkably high. $\endgroup$
    – fraxinus
    Commented Aug 17, 2020 at 10:41
  • $\begingroup$ Not to say that it is, but in principle considering different composition of layers one can imagine a lot of combination in which equilibrium exists so that a heavy layer is "floating" above an ignited and active core. No to say it happens, again I want to be clear on this. Pure gymnastics. $\endgroup$
    – Alchimista
    Commented Aug 18, 2020 at 11:31
  • $\begingroup$ @Alchimista that's how the convection happens. But the density variation is tiny and limited by the adiabatic gradient (or slightly off, depending on the convection efficiency). Then again, our lovely Sun's average density is ~1.4 and in the core it is 100+. The Sun doesn't have a core convection, but other main-sequence stars that do have one can't be extremely different. You need quite a deal of disturbance in order to create a less than 1.4 bubble in a 100+ density core. That's what the supernova events are for (and they happen in even denser star cores). $\endgroup$
    – fraxinus
    Commented Aug 18, 2020 at 13:00

A density increasing with distance from the center is impossible for a star in hydrostatic equlibrium, regardless of the temperature profile (assuming the ideal gas law holds). In fact, the density has to decrease faster than $1/r$, and it has to decrease 2 powers faster than the temperature (e.g. for an isothermal star it would have to decrease like $1/r^2$). This is straightforward to prove from the equation of hydrostatic equilibrium for a self-gravitating gas sphere. Equating the pressure force on an atom with mass $m$

$$\frac{1}{n(R)}\frac{dP(R)}{dR}= -\frac{Gm}{R^2}\int_0^R n(r) 4\pi r^2 dr$$

where $n$ is the number density , $P$ the pressure and $G$ the gravitational constant.

For an ideal gas we have

$$P(R)=n(R)\cdot k\cdot T(R)$$

with $T$ the temperature and $k$ the Boltzmann constant.

Inserting this into the first equation gives

$$\frac{k}{n(R)}\cdot [T(R)\frac{dn(R)}{dR}+n(R)\frac{dT(R)}{dR}] =-\frac{Gm}{R^2}\int_0^R n(r) 4\pi r^2 dr$$

If we now represent the radial dependence of the density and temperature by power laws in the form

$$n(r)=n(R_0)\cdot \left(\frac{r}{R_0}\right)^p$$

$$T(R)=T(R_0)\cdot \left(\frac{R}{R_0}\right)^q$$

we get the following equation

$$k \frac{T(R_0)}{R_0^q}\cdot (p+q)(3+p)\cdot R^{q-1} = -\frac{4\pi Gm\cdot n(R_0)}{R_0^p}\cdot R^{p+1}$$

We see the following from this: since the $R$ dependence on the left and right hand side must be identical, we must have

$$q-1=p+1$$ that is $$q=p+2$$

Also, since the right hand side is always negative, the left hand side must be as well, which means we must have

$$(p+q)(3+p) = 2(p+1)(3+p) <0$$ i.e. $$-3<p<-1$$

In other words, the number density must decrease faster than $1/R$ but slower than $1/R^3$. And it must decrease two powers faster than the temperature ($p=q-2$). Otherwise the star could not be stable.

We also see from this that the temperature could in principle increase from the center outwards (i.e. q>0) (ignoring the question how this could be achieved in practice), but it must increase more slowly than linear (q<1), so the pressure (density times temperature) still decreases going outwards.

  • 1
    $\begingroup$ You can't just assume the perfect gas law (though your analysis is probably ok for that case). $\endgroup$
    – ProfRob
    Commented Sep 26, 2021 at 16:42
  • $\begingroup$ @ProfRob You implicated yourself the ideal gas law in your own answer by implicating a negative temperature gradient could counterbalance a positive density gradient. As my basic analysis shows, this is not possible. If you want to consider deviations from the ideal gas law (which still would need to be justified) you just have to multiply some additional factors to the power indices p and q above. In any case, the OP wanted a clear mathematical justification for the answer, which I think I have given here. Anything more would imply some degree of speculation. $\endgroup$
    – Thomas
    Commented Sep 26, 2021 at 17:17
  • $\begingroup$ White dwarfs are not governed by the perfect gas law. $\endgroup$
    – ProfRob
    Commented Sep 26, 2021 at 17:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .