Why should Rayleigh-Jeans law hold for anything other than cavity radiation? The Rayleigh-Jeans law is derived for a box with reflective walls. This system is designed to be able to accumulate electromagnetic radiation because of reflection for wavelengths that "fit in the box" and so interfere constructively. For this very very specific system, because of this accumulation, these wavelengths can be considered degrees of freedom of the system and therefore we can use statistical mechanics to describe the energy contained within them when the system reaches thermal equilibrium.
It is not obvious that this law should hold for thermal radiation coming from objects that do not cancel radiation in the way a box with reflective walls does. In fact, it should be obvious that it doesn't. Yet I read everywhere that it does as though this were a trivial statement.
Please share your insights.
 A: Imagine we set up an experiment consisting of:

*

*A box with reflecting boundaries

*

*This box also has a small hole, so that some light can escape



*A lump of some material, for simplicity let's assume it is a perfect blackbody, so we can ignore the effect of absorption.

*We place the lump inside a small chamber that is adjacent to the hole in the box, so the light from the box and the lump are in contact with each other.

We assume that the system of reflecting box + lump of black body has reached thermal equilibrium at temperature $T$. We know the spectrum of the light leaving the box, since this is the calculation you refer to in your question.
Now, the black body will absorb and remit the light that is incident on it from the cavity, since that is what black bodies do. Suppose that the black body emitted a spectrum that was different from the spectrum in the cavity. Then some of this light will return to the reflecting cavity. Then the spectrum of light in the cavity will no longer have the equilibrium Planck distribution, and so the cavity will no longer be in thermal equilibrium.
This is a roundabout way of saying that in thermal equilibrium, there must be a detailed balance among processes where energy is absorbed and emitted. This condition means we only need to compute the spectrum of one kind of black body to know how all black bodies will behave, and a cavity with reflecting walls is a very simple system for which the calculation is easy to do.
