How do I integrate the Boltzmann equation for neutrinos? In Sterile Neutrinos as Dark Matter we are given the Boltzmann equation for neutrinos
$$\left( \frac{\partial}{\partial t} - HE \frac{\partial}{\partial E}\right) f_s (E,t) = \left[ \frac{1}{2} \sin ^2 2\theta (E,t)  \Gamma (E,t) \right] f_a (E,t) \tag{2}$$

*

*$f_s$ and $f_a$ are the distribution functions of sterile and active neutrinos.

*$f_a = \left( e^{E/T}+ 1\right)^{-1} \approx \left( e^{p/T}+1\right)^{-1}$

*$\Gamma (E,t)$ is the rate of scattering production of $\nu_s$ through a particular channel

and it's stated that, by changing the time variable from $t$ to $a$ ( the Robertson-Walker scale factor) and integrating $(2)$ over momenta we find that:
$$\frac{dr}{d \ln(a)}= \frac{\gamma}{H}+ r \frac{d \ln(g*)}{d \ln(a)} \tag{4}$$

*

*$\gamma = \displaystyle \frac{1}{n_a} \int \frac{d^3 p}{(2\pi)^3} \sin^2 2\theta (p,T) \Gamma (p,T) \frac{1}{e^{p/T}+1}$

*$ \displaystyle n_i ≡ 2 \int \frac{d ^3p}{(2π) ^3}f_i$ is the number density of sterile (active) neutrinos with $i = s,a  $

*$g^∗a^3T^3= constant$

*$H = \displaystyle \frac{\dot{a}}{a}$ and $r= \displaystyle\frac{n_s}{n_a}$
How do I integrate $(2)$ to get $(4)$? I know that $g^*$ comes from the entropy conservation law but I don't understand why it is brought up in the article or how it helps with this integration and this isn't explained in the article.
I think that in this case, I can consider $E\approx p$ as the mass is negligible (as done in the distribution function for the active neutrinos, above) and so I think I can rewrite $(2)$ as
$$\left( \frac{\partial}{\partial t} - Hp \frac{\partial}{\partial p}\right) f_s (E,t) = \left[ \frac{1}{2} \sin ^2 2\theta (p,t)  \Gamma (p,t) \right] f_a (p,t) \tag{2}$$
Dodelson-Widrow production of sterile neutrino Dark Matter with non-trivial initial abundance  does something similar, but with the equation written slightly differently. But I still do not understand how the integration is done.
 A: Just to summarize all the comments I made above: When you integrate a Boltzmann equation (generally called taking moments) then you simply multiply the whole equation by $\frac{d^3\vec{p}}{(2\pi)^3}$ and integrate over all $\vec{p}$. Most of the terms you then get can be expressed in terms of well known macroscopic quantities (number density $n\propto \int fd^3p$, energy density $\rho\propto \int Efd^3p$, etc.) and derivatives of these. In your case the first term is
$$\int \frac{\partial f_s}{\partial t}\frac{d^3\vec{p}}{(2\pi)^3} = \frac{\partial}{\partial t}\int f_s\frac{d^3\vec{p}}{(2\pi)^3} \equiv \frac{1}{2}\frac{\partial n_s}{\partial t}$$ since only $f_s$ in the integrand depends on time we can pull out the derivative. The right hand side integrated, by definition of $\gamma$, simply becomes $\frac{\gamma n_a}{2}$. The only term that is not automatic is the term
$$-\int HE\frac{\partial f_s}{\partial E}\frac{d^3\vec{p}}{(2\pi)^3}$$
When you see a momentum-derivative of the distribution function in an integral, your first thought should be to get rid of that derivative using integration by parts. For this use that $\frac{d}{dE} = \frac{E}{p}\frac{d}{dp}$ (since $E^2 = p^2 + m^2$) and here we can apply the relativistic approximation $T\gg m$ so $E\approx p$ holds (the distribution function is practically zero in the region where this does not hold so its fine to use this approximation in the whole integral). In the non-relativistic limit, if you need it, you can do a similar approximation: $E\approx m$.
Then change to spherical coordinates $d^3\vec{p} = d\cos\theta_{\vec{p}} d\phi_{\vec{p}} dp$. In this case it simplifies since $f$ is assumed to only depend on $p$ and not the directions so we can simply substitute $d^3\vec{p}$ by $4\pi p^2 dp$. Then
$$-\int HE\frac{\partial f_s}{\partial E}\frac{d^3\vec{p}}{(2\pi)^3} \simeq -\int 4\pi Hp^3\frac{\partial f_s}{\partial p}\frac{dp}{(2\pi)^3} = +\int 4\pi H\cdot 3p^2f_s\frac{dp}{(2\pi)^3} \equiv \frac{3Hn_s}{2}$$
where we have used integration by parts and discarded the boundary term at infinity and in the last integral we have used the definition of $n_s$ (using $d^3\vec{p} \leftrightarrow 4\pi p^2 dp$ in reverse).
The rest is just manipulating the equation to the desired form (using known relations between $n_a$, $T$, $a$ and $g_*$). If you are looking for a textbook that explains all these things in simple terms then see Dodelson "Modern Cosmology" (which happens to be written by one of the authors of that paper).
