Solution (source code)

= Solution

In the nondegenerate regime, $\mu$ lies well inside the gap, with $\mu\gg kT$ and $E_g-\mu\gg kT$. Then conduction occupations are approximately $e^{(\mu-E)/(kT)}$, while the hole <probability> in a valence state is approximately $e^{(E-\mu)/(kT)}$. Using the near-edge <density of states> and the supplied <Gamma integral> gives
$$
n=N_ce^{(\mu-E_g)/(kT)},\qquad
p=N_ve^{-\mu/(kT)},\qquad
N_{c,v}=\frac{\sqrt\pi}{2}A_{c,v}(kT)^{3/2}.
$$
Therefore
$$
\boxed{np=N_cN_ve^{-E_g/(kT)}}.
$$
This assumes the edge approximations are valid over the thermally populated ranges. For an intrinsic <semiconductor> $n=p$, so each carrier density is proportional to $T^{3/2}e^{-E_g/(2kT)}$. Both mobile conduction <Electrons> and holes contribute to conductivity, $\sigma=|e|(nb_e+pb_h)$ with mobilities $b_e,b_h$. The exponentially varying carrier densities explain strong temperature dependence even when the mobilities vary only algebraically.

Donors supply <Electrons> and acceptors remove <Electrons> to create holes. With complete ionization and negligible minority carriers, the majority densities are $n\simeq N_d$ on the n side and $p\simeq N_a$ on the p side. The corresponding isolated <chemical potentials> are
$$
\mu_n=E_g+kT\log(N_d/N_c),\qquad
\mu_p=kT\log(N_v/N_a).
$$
Carrier diffusion at contact leaves positively charged donors and negatively charged acceptors in a depletion layer. At equilibrium the electrochemical potential is constant; the <Electron> <energy> shift is $-|e|\phi$. Hence the n-minus-p electric potential is
$$
\boxed{V_{np}=\frac{\mu_n-\mu_p}{|e|}
=\frac1{|e|}\left[E_g-kT\log\frac{N_vN_c}{N_dN_a}\right]}.
$$
All $N$ quantities must have a consistent normalization: if $N_c,N_v$ are state densities per volume, $N_d,N_a$ are dopant densities rather than bare atom counts. The formula neglects incomplete ionization, degeneracy and changes in band structure.

At a common temperature the two equilibrium junction/contact effects do not drive a perpetual current. At different junction temperatures, <Electrons> and holes transport <entropy> differently, giving different <Seebeck coefficients> on the two sides. The loop has a thermoelectric electromotive force, oriented as $\int_{T_1}^{T_2}(S_n-S_p)\,dT$, and therefore generally carries current when closed. This is the <Seebeck effect>: <energy> is supplied by heat flow from hot to cold. The temperature dependence of the junction barrier is useful intuition, but an exact terminal voltage is not obtained simply by subtracting two equilibrium built-in potentials; it also depends on bulk transport and contact conditions. The given equilibrium density-of-states data do not determine the numerical thermopowers.