# Question about the Boltzmann Distribution for an ideal gas

The general statement of the Boltzmann distribution law is that for a system of $$N$$ particles, each having access to energy states $$\varepsilon_1,\varepsilon_2,\dots,\varepsilon_k$$, the ratio the number of particles with energy $$\varepsilon_j$$, $$N_j$$ to the total number of particles is $$\frac{N_j}{N} = \frac{g_j e^{-\beta \varepsilon_j}}{\sum_{i} g_i e^{-\beta \varepsilon_i}}$$ where $$g_i$$ is the degeneracy of the energy state $$i$$. However, when about the kinetic theory of gases, I found the formula for the probability density of the distribution of energies to be $$f(E) = \frac{2\pi}{(\pi k T)^{3/2}}e^{-\frac{E}{kT}}E^{1/2}dE.$$ This formula has extra factors including $$E^{1/2}$$ and $$T^{-3/2}$$ which are not present in the Boltzmann distribution formula so I'm wondering why these two formulas don't contradict each other.

Note that in general energy of the stets $$\epsilon_j$$ could be very close to each other, in that in any interval $$(E,E+dE)$$ there lie a very large number of energy states. Now the question is: $$\textbf{What is the probability of having a particle with energy between (E,E+dE)?}$$
Let's call this probability $$P(E)dE$$. From your first expression, it is clear that $$P(E)dE= \frac{g(E)e^{-\beta E} dE}{\int_{0}^{+\infty}g(E)e^{-\beta E} dE}$$ Here $$g(E)$$ is a system-dependent function. To find that we should recall that instead of searching for particles with energies $$(E,E+dE)$$, we can search for particles with momenta $$(\vec{p},\vec{p}+d\vec{p})$$, where $$E\equiv E(\vec{p})$$. In the simple system of an ideal gas we have $$E=\frac{\vec{p}^2}{2m}$$ and $$P$$ is the Maxwell-Boltzmann distribution: $$P(\vec{p})d^3\vec{p}\sim e^{- \beta \frac{p^2}{2m}}\big(4\pi^2 p^2dp\big)$$ Now using $$p^2 dp=(2mE)\bigg(\sqrt{\frac{2m}{E}}dE\bigg)$$ we arrive at $$P(\vec{p})d^3\vec{p}\equiv P(E) dE\sim e^{-\frac{E}{kT}} E^{1/2} dE$$ This is your second equation. In addition it tells that in an ideal gas in three dimensions, density of state is $$g(E)\sim E^{1/2}$$
Hope this helps. 
Your first relation is a statistical mechanics relation for a system with micro states that are indexable by some index $$j$$. In other words, it is a formula from quantum statistical mechanics where the micro states correspond to discrete energy states. This really has no bearing on the idea of a classical ideal gas from kinetic theory.
The latter formula is a result of classical statistical mechanics where the kinetic energy of a monoatomic ideal gas particle is given by $$E = \frac{1}{2} mv^2$$. This gives a continuous distribution of possible speeds or kinetic energies, and so the normalization term (like the partition function) will be expressed as an integral over all the possible speeds. However, when considering an ideal gas it is typically not beneficial to consider the orientation (i.e. the particular components of the velocity), but only its magnitude. A solid angle analysis yields the result that the probability of a particular speed is proportional to $$v^2$$, which gives the more common form of the Maxwell-Boltzmann distribution of molecular speeds, $$\begin{gather*} p(v) = \left(\frac{m}{2k_BT} \right)^{\frac{3}{2}} v^2 e^{-\frac{mv^2}{2k_BT}} \end{gather*}$$ I am not exactly sure where the formula you got came from, but I can only surmise that it is an alternate attempt at expressing the Maxwell-Boltzmann distribution for an ideal gas.