It is actually fairly easy to quantify this, and come up with
an expression for the electron distribution within the
p-region. First we have to look a little bit at the diffusion
process however. Imagine that we have a series of bins, each
with a different number of electrons in them. In a given time,
we could imagine that all of the electrons would flow out of
their bins into the neighboring ones. Since there is no reason
to expect the electrons to favor one side over the other, we
will assume that exactly half leave by each side. This is all
shown in Figure 2. We will keep things simple
and only look at three bins. Imagine I have 4, 6, and 8
electrons respectively in each of the bins. After the required
"emptying time," we will have a net flux of exactly one
electron across each boundary as shown.

Now let's raise the number of electrons to 8, 12 and 16
respectively (the electrons may overlap some now in the
picture.) We find that the net flux across each boundary is
now 2 electrons per emptying time, rather than one. Note that
the gradient (slope) of the concentration in the boxes has
also doubled from one per box to two per box. This leads us to a
rather obvious statement that the flux of carriers is
proportional to the gradient of their density. This is stated
formally in what is known as Fick's First Law of
Diffusion:

Flux=(−
D
e
)dnxd
x
Flux
D
e
x
n
x

(1)
Where

De
De
is simply a proportionality constant
called the

diffusion coefficient. Since we are
talking about the motion of electrons, this diffusion flux
must give rise to a current density

Je
diff Je
diff . Since
an electron has a charge

−q
q
associated with it,

J
e
diff
=q
D
e
dnd
x
J
e
diff
q
D
e
x
n

(2)
Now we have to invoke something called the continuity
equation. Imagine we have a volume
V V which is filled with some
charge QQ. It is fairly obvious
that if we add up all of the current density which is flowing
out of the volume that it must be equal to the time rate of
decrease of the charge within that volume. This ideas is
expressed in the formula below which uses a
*closed-surface integral*, along with the
all the other integrals to follow:

∮SJd
S
=−dQd
t
S
S
J
t
Q

(3)
We can write

QQ as

where we are doing a volume integral of the charge density

ρρ over the volume

VV. Now we can use Gauss'
theorem which says we can replace a surface integral of a
quantity with a volume integral of its divergence:

∮SJd
S
=∫divJd
V
S
S
J
V
V
J

(5)
So, combining

Equation 3,

Equation 4
and

Equation 5, we have (note we are still
dealing with surface and volume integrals):

∫divJd
V
=−∫dρd
t
d
V
V
V
J
V
V
t
ρ

(6)
Finally, we let the volume

VV
shrink down to a point, which means the quantities inside the
integral must be equal, and we have the differential form of
the continuity equation (in one dimension)

divJ=∂J∂
x
=−dρxd
t
J
x
J
t
ρ
x

(7)
Comments:"Accessible versions of this collection are available at Bookshare. DAISY and BRF provided."