= Solution
For independent conduction-electron states labelled by band, <wavevector> and spin, combine those labels into $j$. Then
$$
\boxed{U_{el}=\sum_j\epsilon_j f_{\rm FD}(\epsilon_j;\mu,T)=\int g(\epsilon)\,\epsilon\frac{d\epsilon}{e^{(\epsilon-\mu)/k_BT}+1}.}
$$
Here $g$ counts the same spin and band states as the sum, and $\mu(T)$ is fixed by the number constraint $N=\int g f_{\rm FD}\,d\epsilon$. The <energy> zero is a fixed band reference. Use the total DOS for total <internal energy> or the molar DOS for molar <internal energy>; these conventions must not be mixed.
Back to article page