Energy density and pressure in thermal quantum field theory In QFT, energy density and pressure can be defined from Noether current due to Poincare translation invariance. What if we are considering a system at finite temperature? 
For a scalar field, we have
$\rho=\frac{1}{2}\dot{\phi}^2+V_0(\phi)$ and $p=\frac{1}{2}\dot{\phi}^2-V_0(\phi)$. After considering temperature, we can naively replace $V_0$ with temperatuer-corrected potential energy $V_T$. This is what I assumed at first. Then from some cosmology textbooks, there is a relation:
$T\frac{d p(T)}{d T}=\rho(T)+p(T)$.
I don't see why this relation is satisfied for $\rho$ and $p$ defined earlier. Actually Kolb & Turner in "The early universe" mention that $p=-V_T$ and $\rho=-p+T\frac{d p(T)}{d T}$. So I am confused about how to define $\rho$ and $p$. The definition in Kolb&Turner does not account for the kinetic energy in scalar field. Also, I always thought $\rho$ and $p$ should be obtained from stress energy tensor in order to satisfy equation like Friedman equations in cosmology. 
 A: 1) What you call $\rho$ should really be called $\epsilon$ (this is the energy density, not the particle density). 
2) The thermodynamic variables $\epsilon$ and $P$ are expectation values of certain operators in a thermal ensemble. You should not confuse equations for the operators with equations for thermodynamic quantities. 
3) The operator that corresponds to the pressure is (are) the spatial components of the stress tensor $T_{ii}=\frac{1}{2}\nabla_i\phi\nabla_i\phi+g_{ii}V(\phi)$, so $P=\langle T_{ii}\rangle$.
4) An equation like $P=-V(\phi_0)$ is some kind of mean field approximation. Similarly, something like $P=-V_T(\phi_0)$ is a one-loop improved mean field approximation. One has to be careful with these approximations, they are frequently not thermodynamically consistent, that is they don't satisfy a thermodynamic relation like $\epsilon=-P+sT=-P+T(dP)/(dT)$.
5) The correct way to go about this is to compute the partition function at some level of approximation, and then derive thermodynamic quantities by taking partial derivatives. Since $PV=T\log[Z]$, a poor man's version of this is to compute the pressure, and then get the energy density from a thermodynamic relation.
