# Non-uniformly doped semiconductor

I am reading Neamen Semiconductor Physics and Devices. In the topic "Non-Uniformly Doped Semiconductor, the author says if there's, let's say, an N-type semiconductor that is non uniformly doped, the electrons will tend to diffuse from higher concentration towards the lower concentration. leaving behind positively charged donor ions. As a result of the positive ions and negatively charged carriers separation, there will develop an electric field that will hinder any further diffusion of electrons which is kind of obvious as there can be no net current flow in a semiconductor under thermal equilibrium.

As the semiconductor is under thermal equilibrium, the Fermi level will be constant. And the gradient of Ec(or Ev) will give us the induced electric field inside the semiconductor.

Now I have a doubt. How will the energy band diagram look like if a bias is applied to this non uniformly doped semiconductor? (My take? We will start with the thermal equilibrium energy band diagram of the non uniformly doped semiconductor. Ef will be constant while Ec, Ev will be slant gradient of either of which will give the induced electric field inside the semiconductor due to charge separation. Now the part of the semiconductor to which negative terminal of the battery will be connected will rise up while the other part of the semiconductor will come down in the energy band diagram. Simply put, Ecs slope will change. Since the material properties haven't changed, Eg will remain the same and hence, Ev will be parallel to Ec. Also, since the semiconductor isn't now in thermal equilibrium, there's no such thing known as Ef. However, quasi-Fermi level will be there that will simply be an upshifted version of the original Ef by an amount equal to eV, where V is the applied bias.) Am I correct with the thought process?

Also, How will we go about calculating the current through this non uniformly doped semiconductor under an applied bias.

By simple addition of drift and diffusion currents? If so, will we use the applied electric field or the net electric field to calculate the drift current?

You qualitative reasoning, especially regarding the built-in electric field, is correct but the quasi-fermi level will not simply be upshifted over the whole length of the considered inhomogeneous semiconductor. It will upshifted by $q·V$ at the negative contact. To accurately calculate the current through an inhomogenously doped semiconductor is not a trivial task. In the simplest, one-dimensional, stationary case with a given doping profile $n_0(x)$ , you have to simultaneously solve the nonlinear system of ordinary differential equations for $E$ and $n$ given by:
The drift-diffusion equation $$J=nq\mu_n E+qD_n \frac {dn}{dx}=const \tag 1$$ The Poisson equation $$\frac {d^2 \phi}{dx^2}=-\frac {dE}{dx}= \frac {q (n-n_0)}{\epsilon}$$ Furthermore, you have to assume appropriate boundary conditions at the contacts including the applied bias. In general, such a non-linear system of differential equations can only be solved numerically.