Take a cavity that is black inside and hold its walls at a fixed temperature. The inside fills with electromagnetic waves that come to equilibrium by trading heat with the walls. What colour the light inside has is the question here.
The amplitude has to vanish at the walls, so only certain waves can stand inside. As in the figure, only those fitting a whole number of half wavelengths are allowed. Each one of them is called a mode.
The modes have nothing to do with one another. So the contents of the cavity may be treated as a collection of independent modes. The previous chapter showed that independence splits a partition function into a product. That is the form we use.
Next we count how many modes there are. For a cavity in 3 dimensions, the number of modes with frequency between \nu and \nu + d\nu goes as \nu^2.
The reason is the one we had when counting phase space. In the space of wave directions and wavelengths, the modes below \nu fill a sphere of radius \nu. The area of that sphere goes as \nu^2, and so does the number in a thin shell.
The curve in the figure is that count. The higher the frequency, the more modes can be packed in, without limit. Here is where the trap lies.
Apply classical physics. By equipartition each mode is an oscillator and so carries kT. The number of modes grows as \nu^2, so the energy per unit frequency is \nu^2 kT.
The faint curve in the figure is that. It grows without ever levelling off. Add it all up and the total is infinite. Look into a cavity and infinite energy would come out, which is absurd. This was the impasse called the ultraviolet catastrophe.
The bright curve is the shape actually measured. At low frequency it agrees with classical physics, then it raises a peak and falls. What exactly is wrong with the classical argument is the next scene.
What was wrong is the claim that each mode carries kT. That is equipartition's answer, and as the previous chapter showed it holds only where kT far exceeds the spacing of the steps.
One mode is a harmonic oscillator. So the answer from the oscillator piece applies as it stands, and the mean energy is \dfrac{h\nu}{e^{\beta h\nu} - 1}. The spacing is h\nu, wider the higher the frequency.
This is the crux. A high frequency mode has wide steps and kT cannot reach them. It is frozen out and can hold no energy. However many modes there are up there, they go unused, so nothing diverges.
Multiply the number of modes by the energy of one mode and you have the answer: the product of \nu^2 and \dfrac{h\nu}{e^{\beta h\nu} - 1}, which is Planck's distribution. It lies on the classical curve at low frequency and falls exponentially at high frequency.
The figure shows the shape at various temperatures. Raise the temperature and the peak moves right and rises at once. That the peak's place goes as the temperature is called Wien's displacement law, and it accounts for heated iron passing from red to white.
Planck wrote this formula in 1900. That the shape would not fit unless energy were taken as discrete is where quantum theory began. Here we have gone the other way, borrowing the result of quantum mechanics, passing it through statistical mechanics and arriving at the same formula.