# Statistical physics: How do I find the number of particles that have energy above/below a level?

Say I have a gas consist of atoms or molecules. How do I find the number of atoms in that ensemble that have energy above/below a specific amount, say E? I mean, what is the function that I'll have to integrate from 0 to E or E to infinity (if that's what I have to do), to find the percentage of particles in the set that are above an energy level, in the case of microcanonical, canonical and grand canonical ensemble? Is it the Maxwell–Boltzmann distribution to energy? Or the partition function? Or the density of states as a function of energy?

Thank you :D

If your density of states is $D(E)$ and you have a Boltzmann energy distribution $dN=A\exp{(\frac{-E}{kT})}dE$ and a number $N$ of atoms/molecules, then the your total number $N$ determines the constant $A$ by $N=A \int_0^∞{D(E)\exp{(\frac{-E}{kT})}dE}$. You obtain the number of atoms $N_1$ with energies up to $E_1$ by the integral $$N_1=A \int_0^{E_1}{D(E)\exp{(\frac{-E}{kT})}dE}$$ and the number $N_2$ of atoms with energies above $E_1$ by the integral $$N_2=A \int_{E_1}^{∞}{D(E)\exp{(\frac{-E}{kT})}dE}$$
• You can consider $\int_0^∞{D(E)\exp{(\frac{-E}{kT})}dE}$ to be the partition function of the canical ensemble. No problems with any Gaussian integrals! Once you have the density of states $D(E)$, e.g. related to the kinetic energy states of an ideal gas, you obtain a simple integral with an exponential factor which can be solved analytically. – freecharly Oct 16 '16 at 15:46