Solution (source code)

= Solution

Write $\varepsilon_s=\epsilon_0\epsilon$ and take $e>0$, $\alpha>0$, so the p side is $x<0$. In the <depletion approximation>, mobile <Electrons> and <electron holes> are negligible compared with the fixed ionized dopants. Their <charge density> is
$$
\rho(x)=e[n_D^+(x)-n_A^-(x)]\simeq e\alpha x.
$$
Applying <Poisson equation> gives
$$
\boxed{\frac{d^2V}{dx^2}=-\frac{\rho(x)}{\varepsilon_s}=-\frac{e\alpha x}{\epsilon_0\epsilon}.}
$$
Outside the <depletion region>, mobile carriers approximately neutralize the dopants, so $\rho\simeq0$ and $V''\simeq0$. Full dopant ionization alone does not remove the mobile-carrier charge: the result also requires the <depletion approximation>.