1. The problem statement, all variables and given/known data Calculate the number of modes in a cubic cavity of length a=2.5 cm in the wavelength interval (λ1,λ2) where λ1=500 nm and λ2=501 nm. What's the total energy which radiates from the cavity if it's kept at a constant temperature of T=1500 K. 2. Relevant equations I imagine these would be rather relevant: Number of modes in a cavity N= (8π/3)*(a/λ)^3 and the average energy for each mode which would be either k*T if we work with Rayleigh-Jeans or hν/e^(hν/kT)-1 if we work with Planck's derivation. 3. The attempt at a solution I thought of simply finding the number of modes as N1-N2 where N1 is the number for λ1 and N2 for λ2, and then multiplying by the average energy (Which, could someone please double-check that formula? I might have misinterpreted it as average energy of a mode and it might be something different.) Of course, if we use Planck's formula I would find the frequency as being c/λ so no biggie there. I just want to know if it's the correct way to go about it.