Boltzmann equation in cosmology I have a question about the Boltzmann equation in cosmology. 
Im trying to understand how this can hold? Where does the logarithmic terms come from?

It is explained quite well here http://www.damtp.cam.ac.uk/user/db275/Cosmology/Chapter3.pdf
But I still don't understand the steps. 
 A: For some function $f$ of $x$, the logarithmic derivative is simply
$$ \frac{\mathrm{d}\log f}{\mathrm{d}\log x} = \frac{x}{f} \frac{\mathrm{d}f}{\mathrm{d}x}. $$
You can check that this follows from the chain rule applied to $\mathrm{d}g/\mathrm{d}y$, where $g = \log f$ and $y = \log x$. This is a common thing to see in astrophysics, since if we have a power law $f \propto x^k$ (and we often do), then $\mathrm{d}\log f/\mathrm{d}\log x = k$.
In this case, we have
$$ \frac{\mathrm{d}\log(n_1a^3)}{\mathrm{d}\log a} = \frac{a}{n_1a^3} \frac{\mathrm{d}(n_1a^3)}{\mathrm{d}a} = \frac{a}{n_1a^3} \frac{\mathrm{d}(n_1a^3)}{\mathrm{d}t} \frac{\mathrm{d}t}{\mathrm{d}a}. $$
By definition, the Hubble parameter is $H = \dot{a}/a = (1/a)(\mathrm{d}t/\mathrm{d}a)^{-1}$.
Thus we have
$$ \frac{\mathrm{d}\log(n_1a^3)}{\mathrm{d}\log a} = \frac{1}{Hn_1} \frac{1}{a^3} \frac{\mathrm{d}(n_1a^3)}{\mathrm{d}t}. $$
Using the first equation, as well as the definition $\Gamma_1 \equiv n_2 \langle \sigma v \rangle$, we recover the second equation:
$$ \frac{\mathrm{d}\log(n_1a^3)}{\mathrm{d}\log a} = -\frac{\Gamma_1}{H} \left(1 - \frac{n_1^\mathrm{eq}n_2^\mathrm{eq}}{n_3^\mathrm{eq}n_4^\mathrm{eq}} \frac{n_3n_4}{n_1n_2}\right). $$
