About a "magical" rearrangement-type inequality (used to prove Chandrasekhar mass limit in Hawking & Ellis' book) The following excerpt from Hawking & Ellis' "The large-scale structure of spacetime" contains a proof of the Chandrasekhar limit to the mass of white dwarfs. The highlighted inequality has been derived in an understandable way, but it is magical to me in the sense that I do not know how to relate it to more standard inequalities and/or systematic methods (or to establish said inequality when the pressure $p$ is less regular than assumed in the excerpt, or if it fails to be 'radially symmetric'). Does anyone have a suggestion?
(Hawking & Ellis do not refer to a source for this particular derivation. Maybe it is a stroke of their personal ingenuity, but if not it would be interesting to know a primary source.)
Some clarifications to avoid confusion:

*

*The symbols $\rho,n,p:(0,+\infty) \to [0,+\infty)$ are respectively a mass density function, nucleon density function and a pressure function which describe a rotationally symmetric static star (their domain variable "$r$" is the Euclidean distance to the center of the star), obeying the constitutive relations $\rho(.) = m_n n(.)$, $p(.)\leq \hbar [n(.)]^{4/3}$ and all three of them locally integrable. Admittedly, the notation in the screenshot is sloppy in that the authors forget to highlight the dependence of $\rho,n,p$ on $r$ at various points where it should have been indicated. $r_0\in (0,+\infty)$ is the radius of the star, although to consider it as an arbitrary radius is equally fine.


*If you have difficulty reading the small print of the exponents: try to discern $1,2,3$ or $4$ among the numerators and denominators. Larger integers do not occur. Clicking on the image of the excerpt improves readability in my opinion.


*The authors get the highlighted inequality from the calculation immediately preceding it (except that they seem to have forgotten the factor $\frac{3\sqrt{2}}{4}$ in the right hand side of that calculation), the fundamental theorem of calculus and an unstated assumption that $\lim_{r\downarrow 0}\int_0^r dr'\,r'^3p(r') =0$ (which is probably justified by demanding $p$ to be locally integrable in a Cartesian coordinate system: a sensible demand).

 A: It might help to formulate this a bit more generally.
Consider a function $p(r)$ with $p(r)\geq 0$ and $p'(r)\leq 0$ for $0<r<r_0$. Then for any pair of coefficients $a>-1$ and $0<b<1$ one has the inequality
$$\left(\int_{0}^{r_0}p(r)r^a\,dr\right)^b\leq b(1+a)^{1-b}\int_0^{r_0}p(r)^b r^{b+ab-1}\,dr.$$
Check that the dimensions match. This doesn't seem to fall in the familiar classes of integral inequalities (Hölder, Minkowski,...).
The OP asks for a possible generalization if $p(r,\Omega)$ is not radially symmetric, but depends also on angular coordinates $\Omega$. I denote the angular average by $\bar{p}(r)=\int p(r,\Omega)\,d\Omega$ and assume $\frac{d}{dr} \bar{p}(r)<0$. Then one has the inequality
$$\left(\int_{0}^{r_0}\bar{p}(r)r^a\,dr\right)^b\leq b(1+a)^{1-b}\int_0^{r_0}\bar{p}(r)^b r^{b+ab-1}\,dr.$$
A: This is to offer a simple "convexity" proof of the inequality
\begin{equation}
    \left(\int_{0}^{r_0}p(r)r^a\,dr\right)^b\le b(1+a)^{1-b}\int_0^{r_0}p(r)^b r^{b+ab-1}\,dr, \tag{$*$}\label{star}
\end{equation}
stated in Carlo Beenakker's answer, as a generalization of the inequality in the OP.

Here is the proof: Rewrite \eqref{star} as
$$\left(\int_{0}^{r_0}q(r)^{1/b}r^a\,dr\right)^b\le b(1+a)^{1-b}\int_0^{r_0}q(r) r^{b+ab-1}\,dr, \tag{$**$}\label{starstar}$$
where $q:=p^b$.
The right-hand side of \eqref{starstar} is linear in  $q$, whereas its left-hand side is convex in $q$ (being a weighted $L^{1/b}$ norm of $q$). Also, $p$ is a nonnegative nonincreasing function, and hence so is $q$. So, $q$ coincides almost everywhere with a mixture $c\int_0^{r_0}\mu(dt)\,q_t$ of functions of the form $q_t:=1_{[0,t]}$, where $\mu$ is some probability measure on $[0,r_0]$ and $c$ is a nonnegative real number. But for $q=cq_t$ with $t\in[0,r_0]$ and real $c\ge0$, \eqref{starstar} turns into an equality.  In view of Jensen's inequality, this completes the proof of  \eqref{starstar} and thus of \eqref{star}.

I think this may explain the "magic". The above proof does not explicitly involve integration by parts or any other re-arrangement. One may argue, though, that integration by parts is an instance of the Fubini–Tonelli theorem, which was tacitly used in the above proof.

Addendum: In comments, the OP offered a generalization of inequality \eqref{star}, for which  the same "convexity" proof given above will work. After that, the OP offered a further generalization: If $F>0$ is $C^1$, $F'\ge0$, $F(0+)=0$, and $g$ is a concave $C^1$ function with $g(0)=0$, then
\begin{equation}
g\Big(\int_0^r ds\,p(s)F'(s)\Big)
\le \int_0^r ds\,p(s)F'(s)g'(p(s)F(s)). \tag{$\clubsuit$}\label{cs} 
\end{equation}
At this point, I do not know if the above "convexity" proof works for \eqref{cs}.
However, here is a simple proof of \eqref{cs}, which is also a convexity-mixture type, but based on somewhat different ideas: First, since $g$ is concave and $g(0)=0$, $g$ is a mixture, with nonnegative coefficients, of functions of the form $g_t(v):=-(v-t)_+=-\max(0,v-t)$ for real $t\ge0$ and the functions $\pm\text{id}$, where $\text{id}(v):=v$. For the latter two functions, $\pm\text{id}$, \eqref{cs} turns into an equality. So, it remains to consider the case $g=g_t$. Performing also the substitution $u:=F(x)$ and $q(u):=q(F(x))=p(x)$, we reduce \eqref{cs} to
\begin{equation}
    L(f):=\Big(\int_0^f du\,q(u)\Big)_+\ge\int_0^f du\,q(u)\,1(q(u)u>t)=:R(f) \tag{$\heartsuit$}\label{hs}
\end{equation}
for real $f\ge0$, which is an inequality with just one "unknown" function, $q$ -- instead of the original three "unknown" functions, $g,p,F$. Note that
\begin{equation}
    L'(f)=q(f)\,1\Big(\int_0^f du\,q(u)>t\Big)
    \ge q(f)\,1(q(f)f>t)=R'(f); \tag{1}\label{1}
\end{equation}
the $\ge$-inequality in \eqref{1} follows because $q$ is a nonnegative decreasing function, so that $\int_0^f du\,q(u)\ge\int_0^f du\,q(f)=q(f)f$. Since $L(0)=0=R(0)$, \eqref{hs} immediately follows, and the proof is complete.
