Blackbody entropy There are several ways to find that the entropy of thermal photon gas in a blackbody cavity takes the from
$$
S=V\int d\nu \frac{8\pi\nu^2}{c^3} \left( (1+n_\nu)\log(1+n_\nu) - n_\nu \log n_\nu \right)
$$
where $n_\nu=(\exp(\frac{h\nu}{kT})-1)^{-1}$ is the average number of photons with energy $h\nu$.
From this expression, it should be possible to calculate$$S=\frac{4}{3}\frac{U}{T}$$ where $$
U=V\int d\nu \frac{8\pi\nu^2}{c^3} h\nu . n_\nu 
$$ is the internal energy of the gas
However, I don't know how to tacle this derivation. Do you know how to do it, or is there a good reference for it ?
 A: Found the answer to my own question :)
We first re-write the entropy density as $$s_{E}(E,\Omega)=\frac{k_{B}}{4\pi^{3}\hbar^{3}c^{3}}\left[\frac{1}{k_{B}T}\frac{E^{3}}{e^{\frac{E}{k_{B}T}}-1}+\frac{1}{k_{B}T}E^{3}+E^{2}\log\left(\frac{1}{e^{\frac{E}{k_{B}T}}-1}\right)\right]$$
The first term is $u(E,\Omega)/T$ and its integration gives $\sigma T^{3}$. The second and third terms can be integrated by parts
$$\int dE\,E^{2}\log\left(\frac{1}{e^{\frac{E}{k_{B}T}}-1}\right)=\left[\frac{E^{3}}{3}\log\left(\frac{1}{e^{\frac{E}{k_{B}T}}-1}\right)\right]_{0}^{\infty}-\int dE\,\frac{E^{3}}{3}\left(1+\frac{1}{e^{\frac{E}{k_{B}T}}-1}\right)$$ which gives an additionnal $\sigma T^{3}/3$ contribution, hence the result.
A: You can use this reference
http://physics.ucsc.edu/~drip/5D/photons/photons.pdf
The propability for a photon in energy $E_{n, \nu} = h \nu (n + \frac{1}{2})$ is given by $P(n) = exp(-E_n/kT)$. Use the Definition of the free energy
$F_\nu = -kT \ln Z =-kT \ln \sum_{n=0}^\infty P(n)=kT\ln(1-e^{-h \nu/kT})+\frac{1}{2}h \nu$
and derive this Expression by $T$. This yields the entropy for a photon with frequency $\nu$, say $S_\nu$. To obtain the total entropy, calculate
$S = \int d \nu \rho(\nu) S_\nu$
with the density of states with frequency $\nu$. This density you obtain by the following Argument: suppose you have modes $n_x,n_y,n_z$ in three-dimensional space. To sum up These modes you assume that every frequency $\nu$ lies on a "radial coordinate" $\sqrt{n_x^2+n_y^2+n_z^2}$. Therefore you choose spherical coordinates and you will have the spherical shell element
$4 \pi (\frac{\nu}{\nu_0})^2$,
but if you take into account the 2 polarizations of the photons multiply by 2. The "radial coordinate" we can express by the dimensionless increment $d\frac{\nu}{\nu_0}$. The specific frequency of the first mode $\nu_0$ is given by $\nu_0 = \frac{c}{\lambda}$ with characteristic wavelength $\lambda$. Combining These considerations yields
$\rho(\nu) = \frac{8 \pi \lambda^2 \nu^2}{c^2} \frac{1}{\nu_0} = \frac{8 \pi \lambda^3 \nu^2}{c^3}$.
Therefore total energy can be obtained with the same procedure by
$E = \int d \nu \rho(\nu) E_{n,\nu}$
and ground state energy can be ignored; see the Wiki article for "Casimir effect" if you want to know more what this is; ground state energy $\frac{1}{2}h \nu$ is purely Quantum-theoretical and can be neglected for simplicity.
From the energy-momentum thensor of the photon field $T^{\mu \nu}$ it holds the identity $\sum_{\mu = 0}^4 T^{\mu \mu} = e-3p = 0$ ($e$ is energy density per volume) and thus $p = \frac{1}{3}e$ and to obtain the total energy in a volume $V$ you have $pdV = \frac{1}{3}e dV = \frac{1}{3} dU$. Finally
$dU = - pdV + TdS$
or
$dS = \frac{4}{3T} dU$.
This is the way how the equations are derived.
