The first thing we need to remember is Gauss's Law. Gauss's Law, like most of the fundamental laws of electromagnetism comes not from first principle, but rather from empirical observation and attempts to match experiments with some kind of self-consistent mathematical framework. Gauss's Law states that: \[\begin{array}{l} \oint\limits_{s,} D \ dS &= \ Q_{\text{encl}} \\ &= \ \oint \limits_{v,} \rho (v) \ dV \end{array} \nonumber \]

where \(D\) is the electric displacement vector, which is related to the electric field vector, \(E\), by the relationship \(D = \varepsilon E\). \(\varepsilon\) is called the dielectric constant. In silicon it has a value of \(1.1 \times 10^{-12} \ \frac{\mathrm{F}}{\mathrm{cm}}\). (Note that \(D\) must have units of \(\frac{\mathrm{Coulombs}}{\mathrm{cm}^{2}}\) to have everything work out okay.) \(Q_{\mathrm{encl}}\) is the total amount of charge enclosed in the volume \(V\), which is obtained by doing a volume integral of the charge density \(\rho (v)\).

Various positive charges, with a density of rho, enclosed within a surface S are moving out of the surface with displacement vector D. The space within S has a volume of V.
Figure \(\PageIndex{1}\): Pictorial representation of Gauss's Law.

Equation \(\PageIndex{1}\) just says that if you add up the surface integral of the displacement vector \(D\) over a closed surface \(S\), what you get is the sum of the total charge enclosed by that surface. Useful as it is, the integral form of Gauss's Law, (which is what Equation \(\PageIndex{1}\) is) will not help us much in understanding the details of the depletion region. We will have to convert this equation to its differential form. We do this by first shrinking down the volume \(V\) until we can treat the charge density \(\rho (v)\) as a constant \(\rho\), and replace the volume integral with a simple product. Since we are making \(V\) small, let's call it \(\Delta (V)\) to remind us that we are talking about just a small quantity. \[\oint\limits_{\Delta (v),} \rho (v) \ dV \rightarrow \rho \Delta (v) \nonumber \]

And thus, Gauss' Law becomes: \[\begin{array}{l} \oint\limits_{s,} D \ dS &= \varepsilon \oint\limits_{s,} E \ dS \\ &= \rho \Delta (V) \end{array} \nonumber \] or \[\frac{1}{\Delta V} \left(\oint\limits_{s,} E \ dS\right) = \frac{\rho}{\varepsilon} \nonumber \]

Now, by definition the limit of the left hand side of Equation \(\PageIndex{4}\) as \(\Delta (V) \rightarrow 0\) is known as the divergence of the vector \(\mathbf{E}\), or \(\mathrm{div} \mathbf{E}\). Thus we have \[\lim_{\Delta (V) \rightarrow 0} \frac{1}{\Delta (V)} \left(\oint\limits_{s,} E \ dS\right) = \mathrm{div} (\mathbf{E}) = \frac{\rho}{\varepsilon} \nonumber \] Note what this says about the divergence. The divergence of the vector \(\mathbf{E}\) is the limit of the surface integral of \(\mathbf{E}\) over a volume \(V\), normalized by the volume itself, as the volume shrinks to zero. I like to think of as a kind of "point surface integral" of the vector \(\mathbf{E}\).

A box of width Delta x, height Delta y, and depth Delta x has vector E passing through it in the direction of the positive x-axis. The value of E varies with x.
Figure \(\PageIndex{2}\): Small volume for divergence

If \(\mathbf{E}\) only varies in one dimension, which is what we are working with right now, the expression for the divergence is particularly simple. It is easy to work out what it is from a simple picture. Looking at Figure \(\PageIndex{2}\) we see that if \(\mathbf{E}\) is only pointed along one direction (let's say \(x\)) and is only a function of \(x\), then the surface integral of \(\mathbf{E}\) over the volume \(\Delta (V) = \Delta (x) \Delta (y) \Delta (x)\) is particularly easy to calculate. \[\oint\limits_{s,} E \ dS = \mathbf{E} (x+\Delta (x)) \Delta (y) \Delta (z) - \mathbf{E}(x) \Delta (y) \Delta (z) \nonumber \]

We remember that the surface integral is defined as being positive for an outward pointing vector and negative for one which points into the volume enclosed by the surface. Now we use the definition of the divergence \[\begin{array}{l} \mathrm{div} (\mathbf{E}) &= \lim_{\Delta (V) \rightarrow 0} \frac{1}{\Delta (V)} \left(\oint\limits_{s,} E \ dS\right) \\ &= \lim_{\Delta (V) \rightarrow 0} \frac{\left(\mathbf{E} (x+\Delta (x)) - \mathbf{E}(x)\right) \Delta (y) \Delta (z)}{\Delta (x) \Delta (y) \Delta (z)} \\ &= \lim_{\Delta (V) \rightarrow 0} \frac{\mathrm{E} (x+\Delta(x)) - \mathrm{E}(x)}{\Delta (x)} \\ &= \frac{\delta \mathbf{E}(x)}{\delta x} \end{array} \nonumber \]

So, we have for the differential form of Gauss' law: \[\frac{\delta \mathbf{E}(x)}{\delta x} = \frac{\rho (x)}{\varepsilon} \nonumber \] Thus, in our case, the rate of change of \(E\) with \(x\), \(\dfrac{d}{dx} (E)\), or the slope of \(E(x)\) is just equal to the charge density, \(\rho (x)\), divided by \(\varepsilon\).