Solution (source code)

= Solution

The <one-particle distribution function> is a scalar function on the future mass shell. Choose its normalization so that, in a local <orthonormal tetrad>, $f\,d^3x\,d^3p$ is the expected photon number in a phase-space cell on a constant-time slice. Spin degeneracy and any phase-space normalization factors are included in $f$; with an occupation-number convention they would instead appear explicitly in the measure.

More covariantly, the photon number crossing a spacelike element is $f\,p^\mu d\Sigma_\mu\,d^3p/E$. The factor $p^\mu d\Sigma_\mu$ reduces to $E\,d^3x$ on a local constant-time slice, recovering the cell interpretation. The measure $d^3p/E$ is <Lorentz invariant> on the mass shell.

A photon carries energy $E$ and momentum $p^i$, while its velocity is $p^i/E$. Energy density, momentum density and momentum flux are therefore
$$
T^{\hat0\hat0}=\int d^3p\,fE,\qquad T^{\hat0\hat i}=\int d^3p\,fp^i,\qquad
T^{\hat i\hat j}=\int d^3p\,f\frac{p^ip^j}{E}.
$$
They assemble into the <stress-energy tensor>
$$
\boxed{T^{\mu\nu}=\int\frac{d^3p}{E}\,f\,p^\mu p^\nu.}
$$
The tetrad momenta are related to coordinate components by the tetrad basis. For an isotropic distribution, angular averaging gives $T^{\hat i\hat j}=\rho_\gamma\delta^{ij}/3$ and $T^{\hat0\hat i}=0$. Thus the photon gas has pressure $\rho_\gamma/3$, consistent with its massless <equation of state>.