In Semiconductor Physics and Devices by Donald A. Naemen (pg. 176) the following figure appears:
The donor concentration is a decreasing function of x.
My question: why are the energies of the conduction and valence band ($E_c$ and $E_v$) a function of the concentration? Why is the Fermi-level the only value in the figure that is not affected by the non-uniform distribution of donors?