Solution (source code)

= Solution

Impose periodic <boundary conditions> on a large cubic box. The allowed <wavevectors> occupy a lattice of cell volume $(2\pi)^3/V$ in <wavevector> space. Including the two spin states, the number of states with magnitude at most $k$ is
$$
\mathcal N(k)=2\frac{V}{(2\pi)^3}\frac{4\pi k^3}{3}=\frac{Vk^3}{3\pi^2}.
$$
Using $k=\sqrt{2m_e\epsilon}/\hbar$ and differentiating gives the total, spin-summed <three-dimensional free-electron density of states>,
$$
\boxed{g(\epsilon)=\frac{V}{2\pi^2}\left(\frac{2m_e}{\hbar^2}\right)^{3/2}\sqrt\epsilon},\qquad \epsilon\geq0.
$$
It counts states per unit <energy>; divide by $V$ for states per unit <volume> per unit <energy>. At zero <temperature>, the <Fermi-Dirac distribution> fills all states up to the <Fermi energy>, giving
$$
N=\int_0^{E_F}g(\epsilon)\,d\epsilon
=\frac{V}{3\pi^2}\left(\frac{2m_eE_F}{\hbar^2}\right)^{3/2}.
$$
Writing $n=N/V$ gives
$$
\boxed{k_F=(3\pi^2n)^{1/3}},\qquad
\boxed{E_F=\frac{\hbar^2}{2m_e}(3\pi^2n)^{2/3}},\qquad
\boxed{g(E_F)=\frac{3N}{2E_F}}.
$$
The <energy> zero is the bottom of the free-electron band. The <electron Fermi temperature> is $T_F=E_F/k_B$.