Average energy for a free electron gas, at T=0K For a free electron gas at $T=0K$, the average energy per electron is known to be $ \frac {3}{5} E_F$ where $E_F$ is the Fermi Energy. When first attempting to derive this, I thought that the average energy per electron could be expressed as $(\int_0^{E_F} dE*D(E)*E)/N$ where $N$ is the total number of electrons. But for some reason it is needed to divide this quantity (without the $N$) by $\int_0^{E_F} dE*D(E)$. Is this true because $\int_0^{E_F} dE*D(E) = N$? 
 A: Let's say you have some distribution $D(x)$. If we want this to represent probabilities, then it must be that 
$$A=\int D(x) dx=1$$ 
So what we can do is just define a new function in terms of $D(x)$ and this integral over the domain of $D$:
$$P(x)=\frac{1}{A}D(x)$$
So that the integral over the domain of $P$ is $1$.
Now, when we want to find the average of $x$ described by this distribution, we use the definition of the average
$$\langle x \rangle=\int x P(x) dx=\frac{1}{A}\int xD(x) dx=\frac{\int xD(x) dx}{\int D(x) dx}$$
So as you can see, writing the average like this is beneficial when the integral of your distribution does not equal $1$ over the entire domain of the distribution, but you still want to use the distribution as a probability distribution.
Physically, if we are at $T=0$ then integrating over the density of states is the same as counting electrons, so $\int D(E) dE$ will be equal to $N$. So long story short, you are correct.
A: Let's begin with the Fermi-Dirac distribution function $$n_k(T) = n(\epsilon_k, T) = \frac{1}{e^{(\epsilon_k - \mu(T))/T}+1}.$$ The subscript $k$ labels the states of the system, and I have explicitly included the temperature dependence of both $n_k$ and the chemical potential $\mu$. Also, I use units such that the Boltzman constant $k_B = 1$.
At $T = 0$, the chemical potential of a system of $\textit{fermions}$ is approximately constant and equal to the Fermi energy $E_F$ of the system: $\mu(T=0) \approx E_F$. Qualitatively we understand this since $E_F$ is the lowest energy (above the ground state $E_0 = 0$) unoccupied state of the system, and $\mu$ in general can be thought of as the energy required to create or add a particle to a system. At zero temperature then, $\mu = E_F$ to a lowest order approximation. Now, a careful examination of the FDD will reveal that as $T \rightarrow 0$ it acts like a step function: $n(\epsilon_k, 0) = 1$ for $\epsilon_k < E_F$ and $n(\epsilon_k, 0) = 0$ for $\epsilon_k > E_F$. This is enough for our calculation. See https://en.wikipedia.org/wiki/Sommerfeld_expansion for more detail. 
Now, you've asked about the energy per electron of such a system. We need two things (1) the total energy of the system $E$ and (2) the number of particle $N$. To calculate both, you've appealed to an integral over energies of an energy-density of state function $D(\epsilon)$. This method works wonderfully but can be a bit obtuse. Instead, let's return to the Fermi-Dirac distribution (FDD) function I wrote at the start of the post to calculate $E$ and $N$.
In the definition of the FDD, I included a state label $k$. For system at temperature $T$, an average number $n_k$ of particles will occupy the state $k$ with energy $\epsilon_k$. To find the total number of particles in the system, we thus need only to sum $n_k$ over all states $k$: $$N = \sum_k n_k.$$ For our system of electrons, we can label each state by its position $\vec{x}$ and momentum $\vec{p}$ and spin, which takes one of two values. Thus, the sum over all states $k$ is equivalent to an integral over position and momentum times a spin-degeneracy factor of 2: $$\sum_k = 2 \int \frac{d^3\vec{x}d^3\vec{p}}{h^3}.$$ The normalization of the integral measure by Planck's constant $h$ is necessary for dimensional reasons and, in a sense, defines the "size" of one state in phase space. 
Now, recall our result for $n_k$ at $T = 0$: $n_k$ is only non-zero for states with energy less than $E_F$. If the energy of a state with momentum $\vec{p}$ is given by $\epsilon(p) = \frac{p^2}{2m}$, then our integral will be restricted to momentum of magnitude less than $\sqrt{2mE_F}$. Then our expression for $N$ becomes $$N = \int_{p < \sqrt{2mE_F}}\frac{d^3\vec{x}d^3\vec{p}}{h^3} = \frac{4\pi V}{h^3} \int_0^{\sqrt{2mE_F}} p^2 dp = \frac{4\pi V}{3 h^3}(2mE_F)^{3/2}.$$ Here, $V$ is the volume of the system.
We can perform the same game with the energy. The logic does not change: $$E = \sum_k \epsilon_k n_k = \int_{p < \sqrt{2mE_F}}\frac{d^3\vec{x}d^3\vec{p}}{h^3} \frac{p^2}{2m}$$.
I'll leave this evaluation as an exercise. The ratio $\frac{E}{N}$ is what you seek. 
