I've been trying to follow the procedure that some books give in order to prove that the entropy of the universe is conserved (S is constant). It usually goes like this:
Consider the second law of thermodynamics: $$ TdS=dU+PdV. $$ Now, using $U=\rho V$, we get:
$$dS=\frac{1}{T} \left( d[(\rho + P)V]-VdP \right) $$
From this moment on, to continue proving the conservation of entropy, I need to use:
$$\frac{\partial P}{\partial T}=\frac{\rho+P}{T},$$ which is the equation I'm struggling to get.
In some books, like Kolb and Turner's Early Universe, they argue that this comes from the following Maxwell relation: $$ \frac{\partial S}{\partial T\partial V}=\frac{\partial S}{\partial V\partial T}. $$ This, for me, seems a little harder to grasp (although I'm open to hear responses that are related to this way of dealing with the problem), therefore I tried looking into other books which may have another ways of going through this. In the book Modern Cosmology by Scott Dodelson, we are told to assume $f=f(E/T)$, where $f$ is the distribution function, and subsitute this into the integral expression of $P$, $$P=g\int \frac{d^3p}{(2\pi)^3}f(p)\frac{p^2}{3E(p)}.$$ Then in order to find $dP/dT$, we rewrite $df/dT$ under the integral sign as $-(E/T)df/dE$ (I don't get this), and by integrating by parts we should get our result. I've been trying to work it out but I don't know how to procced.
References: Cosmology by Baumann pages 55-56, "The Early Universe" by E. Kolb and M. Turner pages 65-66, Modern Cosmology by Scott Dodelson pages 44-45, page 56 exercise 14.