Compensated semiconductor (source code)

= Compensated semiconductor
{title2=$n-p=N_D-N_A,\quad np=n_i^2$}

A compensated <semiconductor> contains both <donor impurities> and <acceptor impurities>. In a nondegenerate equilibrium model with both species fully ionized, <charge neutrality> gives $n-p=\Delta=N_D-N_A$, while the semiconductor <semiconductor mass-action law> gives $np=n_i^2$. Solving yields
$$
n=\frac{\Delta+\sqrt{\Delta^2+4n_i^2}}2,\qquad p=\frac{-\Delta+\sqrt{\Delta^2+4n_i^2}}2.
$$
For $\Delta>0$ and $n_i\ll\Delta$, $n\simeq\Delta$ and $p\simeq n_i^2/\Delta$. Numerically the minority concentration is better obtained as $n_i^2/n$ than by subtracting nearly equal numbers. If dopants are only partly ionized, replace $N_D,N_A$ in charge neutrality by their ionized concentrations and determine the <chemical potential> self-consistently.