The charge carriers in semiconductors are electrons ($n$ from "negative" with charge $-e$) and holes ($p$ from "positive" with charge $e$), whose chaotic thermal motion is slightly distorted by external fields. The elementary charge $e=1.60 \cdot 10^{-19}~\text{C}$. To describe the transfer processes, the carrier mobility $\mu$ is introduced, which determines the dependence of its average velocity $v$ on the applied external electric field $\mathcal{E}$:
\[ |v| = \mu |\mathcal{E}|.\]
The mobility depends on the temperature and the concentration of defects in the crystal lattice. In this case, the volume concentration of electrons $n$ (units $1/\text{m}^3$) and the volume concentration of holes $p$ (units $1/\text{m}^3$) under conditions of thermodynamic equilibrium are related to each other by the relation $np = n_i^2$, where $n_i$ is the concentration of carriers of both types in a semiconductor without impurities.
If there is spatial inhomogeneity in the distribution of charge carriers in a semiconducting sample, diffusion currents with corresponding volume densities flow in addition to conduction currents:
\[j_{Dp} = - eD_p \frac{dp}{dx}, \quad j_{Dn} = eD_n \frac{dn}{dx}.\]
And from Einstein's relation $D = \mu k_\text{B} T/e$, so the total current density inside the semiconductor is
\[ j =\mu_p \left[ \mathcal{E} e p - k_\text{B} T \frac{dp}{dx} \right] + \mu_n \left[ \mathcal{E} e n + k_\text{B} T \frac{dn}{dx} \right]. \tag{1}\]
Let us denote $\mu_p/ \mu_n=\alpha$, for silicon we will consider this value to be $3.1$ and independent of impurities. The concentration of impurity-donors increasing the number of electrons will be called $N_D$ and the concentration of impurity-acceptors increasing the number of holes will be called $N_A$.
We will consider a one-dimensional problem, for inhomogeneously doped silicon at temperature $T=300~\text{K}$, then $n_i=1.1 \cdot 10^{10}~\text{cm}^{-3}$.
We will also assume that all processes are stationary, i.e., charge does not accumulate anywhere and therefore $dj/dx=0$. The electric potential is denoted by the letter $\varphi$. For nondimensionalization, let's work in terms of relative concentrations $u=p/n_i$, $v=n/n_i$. The relative permittivity of a semiconductor is $\varepsilon$.
First, let us consider an equilibrium PN junction with no current flowing. In such a case, holes and electrons are in thermodynamic equilibrium at every point, i.e. $v=1/u$.
We have obtained a nonlinear differential equation on $\Psi$ and will solve it numerically.To set the initial conditions, we consider the behavior of $\Psi$ away from the pn junction, where $\Psi = \operatorname{asinh} \frac{N_A-N_D}{2n_i} + \delta \Psi$ and $|\delta \Psi| \ll |\Psi|$.
Inside the pn junction there is a region where $p,n \ll N_p, N_n$. To obtain the analytical result, we will assume that the charge density $\rho=e(p - N_A - n + N_D)$ has the form shown in the graph below. That is
If we connect the pn junction to a source of voltage $U$ (plus to $p$ and minus to $n$) and infinite internal resistance, the potential difference across at the pn junction becomes $V_{bi} - U$.
The capacitance of the system $C$ is defined as $C=dQ/dU$, where $dQ$ is the change in charge on each side of the pn junction (they have different signs). In our model, when voltage $U$ is applied, the size of the spatial charge distribution region decreases from $[-x_p,x_n]$ to $[-x_p',x_n']$. In particular, when voltage $U$ is applied, the value of $u$ (relative hole concentration) in the vicinity of the junction itself changes slightly, so these changes do not affect the appearance of the charge and field distributions.
Thus, a pn junction can be used as a capacitor whose capacitance depends on the applied voltage - such devices are called varicaps.
When an external voltage is applied, the charge carrier distribution picture changes significantly only at the edges of the pn junction, where the concentration of non-main carriers (i.e., electrons in p-silicon and holes in n-silicon) changes significantly.
In the domain $[-x_p, x_n]$ the expression from A1 remains valid, since the current density $j$ is a small correction relative to the other terms. We denote the recombination rate (the rate of the process of mutual annihilation of holes and electrons) by $R$ and the formula for it follows from the consideration that the case $nv=1$ must correspond to the equilibrium:
\[R = \frac{uv-1}{\tau_p (u+1) + \tau_n(v+1)} n_i,\]where $\tau_p$ and $\tau_n$ are the characteristic lifetimes of the corresponding particles.
C1 Suppose that due to the presence of the voltage $U$, the concentrations of holes and electrons have changed with respect to the equilibrium $U=0$ as follows $u \to u+ \delta u$, $v \to v + \delta v$. Express the current density $j$ through $\delta u$, $\delta v$, their derivatives, and the field $\mathcal{E}$.
You should find that $\delta v$ and $\delta u$ are of the same order of magnitude, so the majority carrier density is approximately unchanged from equilibrium.