# Probability distribution for photon momentum in canonical ensemble

Suppose I have an ideal gas consisting of photons, each photon has an energy $$\varepsilon = cp$$ where $$p = |\vec{p}| = \sqrt{p_x^2 + p_y^2 + p_z^2}$$. I have calculated the single particle partition function $$z_i$$, and the total partition function of the system $$Z = z_i^N / N!$$ where $$N$$ is the total number of particles. The problem is that I now want to find the probability distribution that a single photon has a momentum $$p$$. I know that the probability for a system to occupy a state $$k$$ is given by $$P = \frac{1}{Z} e^{-\beta E_k}$$ where $$E_k$$ is the of energy that state. However in this case I am dealing with a single particle, so my first guess for a probability distribution would be $$\rho(p) = \frac{1}{z_i}e^{-\beta c p}$$ but I don't think this is correct, because $$p$$ is the magnitude of a vector, and there are many possible momentum vectors for which $$|\vec{p}| = p$$. I feel like I have to compute some integral over $$e^{-\beta c p}$$ to take this into account, but I am not sure how to proceed?

• You just need to consider $\rho(\vec{p})$ as a function of a vector $\vec{p}$. – Gec Oct 16 at 18:34
• So $\rho(\vec{p}) = e^{-\beta c |\vec{p}|} / z_i$, I don't know what to do with this? – Just some weirdo Oct 16 at 18:58
• You have the distribution for a three-dimensional momentum. Do you need the distribution for the momentum magnitude actually? If this is the case, then you can use the Maxwell distribution as an example. – Gec Oct 16 at 19:17
• Yes, I need the distribution for the momentum magnitude. I did use the Maxwell distribution as an example when calculating the partition function (I switched to spherical coordinates to integrate over the momenta), but I'm not sure how it will help here. I will try to find a derivation of the Maxwell distribution from the canonical ensemble, maybe that will clear things up (I've only seen it derived from the microanonical ensemble). – Just some weirdo Oct 16 at 19:36
• I meant that it is known for the Maxwell distribution how to obtain the distribution for the momentum magnitude from the distribution fro the three-dimensional momentum. – Gec Oct 16 at 20:02