Hi! As my professor is a bit crazy (in a good way), he derived Stefan-Boltzman's law in my intro thermodynamics class. However, since he introduced loads of concepts from statistical mechanics and such I got a bit confused on some points. Anyway:

The first part of the derivation:

My question: Ehm, what happened here? ##df## is a frequency band, ##U## is the total EM energy inside the cavity and ##V## its Volume. Then shouldn't ##N## be the number of photons, and ##<E>## be the mean energy of the photons? Can somebody explain to me how he linked that to "swinging modes" and "density of states" ??

Later he starts talking about frequency space, and density of states and so on. This confuses me. I should probably ask him personally about that once I've got the stuff above cleared up.

Don't know if you had it explained to you already, but here's what I dusted off from very old memories of this:
Point is that photon wavelengths quantummechanically no longer have a continuous spectrum, but have to "fit" in the cavity. Consequence is that the possible ##\vec k## are grid points in 3D k space. Energy is proportional to k^{2}, so the number of allowed photons with an energy between E and E + dE is proportional to the number of grid points in a shell between radius k and k+dk.

The step you "Ehm" about the most would be ##{d(U/V)\over df}={ d(N<E>/V)\over df}## ? This just says that total EM energy ##U## in a frequency band f to f+df is the number of photons that can have this energy times the energy per photon. Classically this number is infinite, QM says it's limited to this number of grid points between E and E + dE.