The Divergence Theorem: Learn It 4

Application to Electrostatic Fields

The divergence theorem has many applications in physics and engineering. It allows us to write many physical laws in both an integral form and a differential form (in much the same way that Stokes’ theorem allowed us to translate between an integral and differential form of Faraday’s law).

Areas of study such as fluid dynamics, electromagnetism, and quantum mechanics have equations that describe the conservation of mass, momentum, or energy. The divergence theorem allows us to give these equations in both integral and differential forms.

Gauss’ Law

One of the most common applications of the divergence theorem is to electrostatic fields. An important result in this subject is Gauss’ law. This law states that if [latex]S[/latex] is a closed surface in electrostatic field [latex]\mathbf{E}[/latex], then the flux of [latex]\mathbf{E}[/latex] across [latex]S[/latex] is the total charge enclosed by [latex]S[/latex] (divided by an electric constant).

We now use the divergence theorem to justify the special case of this law in which the electrostatic field is generated by a stationary point charge at the origin.

If [latex](x, y, z)[/latex] is a point in space, then the distance from the point to the origin is [latex]r=\sqrt{x^2+y^2+z^2}[/latex]. Let [latex]{\bf{F}}_r[/latex] denote radial vector field:

[latex]{\bf{F}}_r=\frac1{r^2}\left\langle\frac{x}y,\frac{y}r,\frac{z}r\right\rangle[/latex].

The vector at a given position in space points in the direction of unit radial vector [latex]\left\langle\frac{x}y,\frac{y}r,\frac{z}r\right\rangle[/latex] and is scaled by the quantity [latex]1/r^2[/latex]. Therefore, the magnitude of a vector at a given point is inversely proportional to the square of the vector’s distance from the origin.

Suppose we have a stationary charge of [latex]q[/latex] Coulombs at the origin, existing in a vacuum. The charge generates electrostatic field [latex]{\bf{E}}[/latex] given by:

[latex]{\bf{E}}=\frac{q}{4\pi\varepsilon_0}{\bf{F}}_r[/latex],

where the approximation [latex]\varepsilon_0 = 8.854 \times 10^{-12}[/latex] farad (F)/m is an electric constant. (The constant [latex]\varepsilon_0[/latex] is a measure of the resistance encountered when forming an electric field in a vacuum.)

Notice that [latex]\mathbf{E}[/latex] is a radial vector field. The difference from a gravitational field is that this field points outward whereas the gravitational field points inward. Because:

[latex]{\bf{E}}=\frac{q}{4\pi\varepsilon_0}{\bf{F}}_r=\frac{q}{4\pi\varepsilon_0}\left(\frac1{r^1}\left\langle\frac{x}y,\frac{y}r,\frac{z}r\right\rangle\right)[/latex],

we say that electrostatic fields obey an inverse-square law. That is, the electrostatic force at a given point is inversely proportional to the square of the distance from the source of the charge (which in this case is at the origin).

Given this vector field, we show that the flux across closed surface [latex]S[/latex] is zero if the charge is outside of [latex]S[/latex], and that the flux is [latex]q/\varepsilon_0[/latex] if the charge is inside of [latex]S[/latex]. In other words, the flux across [latex]S[/latex] is the charge inside the surface divided by constant [latex]\varepsilon_0[/latex]. This is a special case of Gauss’ law, and here we use the divergence theorem to justify this special case.

To show that the flux across [latex]S[/latex] is the charge inside the surface divided by constant [latex]\varepsilon_0[/latex], we need two intermediate steps. First we show that the divergence of [latex]{\bf{F}}_r[/latex] is zero and then we show that the flux of [latex]{\bf{F}}_r[/latex] across any smooth surface [latex]S[/latex] is either zero or [latex]4\pi[/latex]. We can then justify this special case of Gauss’ law.

Verify that the divergence of [latex]{\bf{F}}_r[/latex] is zero where [latex]{\bf{F}}_r[/latex] is defined (away from the origin).

Notice that since the divergence of [latex]\mathbf{F}_r[/latex] is zero and [latex]\mathbf{E}[/latex] is [latex]\mathbf{F}_r[/latex] scaled by a constant, the divergence of electrostatic field [latex]\mathbf{E}[/latex] is also zero (except at the origin).

flux across a smooth surface

Let [latex]S[/latex] be a connected, piecewise smooth closed surface and let [latex]{\bf{F}}_r=\frac{1}{r^2}\left\langle\frac{x}r,\frac{y}r,\frac{z}r\right\rangle[/latex]. Then,

[latex]\begin{equation*} \displaystyle\iint_S{\bf{F}}\cdot d{\bf{S}} = \left\{ \begin{array}{ll} 0 & \quad \text{if }S\text{ does not encompass the origin} \\ 4\pi & \quad \text{if }S\text{ encompasses the origin.} \end{array} \right. \end{equation*}[/latex]

In other words, the flux of [latex]\mathbf{F}_r[/latex] across any piecewise smooth closed surface [latex]S[/latex] depends only on whether the origin is inside of [latex]S[/latex].

Proof


The logic of this proof follows the logic of using Green’s theorem on a region with holes, only we use the divergence theorem rather than Green’s theorem.

First, suppose that [latex]S[/latex] does not encompass the origin. In this case, the solid enclosed by [latex]S[/latex] is in the domain of [latex]{\bf{F}}_r[/latex], and since the divergence of [latex]{\bf{F}}_r[/latex] is zero, we can immediately apply the divergence theorem and find that [latex]\displaystyle\iint_S{\bf{F}}\cdot d{\bf{S}}[/latex] is zero.

Now suppose that [latex]S[/latex] does encompass the origin. We cannot just use the divergence theorem to calculate the flux, because the field is not defined at the origin. Let [latex]S_a[/latex] be a sphere of radius [latex]a[/latex] inside of [latex]S[/latex] centered at the origin. The outward normal vector field on the sphere, in spherical coordinates, is

[latex]\large{{\bf{t}}_\phi\times{\bf{t}}_\theta=\langle a^2\cos\theta\sin^2\phi,a^2\sin\theta\sin^2\phi,a^2\sin\phi\cos\phi\rangle}[/latex].

Therefore, on the surface of the sphere, the dot product [latex]{\bf{F}}_r\cdot{\bf{N}}[/latex] (in spherical coordinates) is

[latex]\begin{aligned} {\bf{F}}_r\cdot{\bf{N}}&=\left\langle\frac{\sin\phi\cos\theta}{a^2},\frac{\sin\phi\sin\theta}{a^2},\frac{\cos\phi}{a^2}\right\rangle\cdot\langle a^2\cos\theta\sin^2\phi,a^2\sin\theta\sin^2\phi,a^2\sin\phi\cos\phi\rangle \\ &=\sin\phi(\langle\sin\phi\cos\theta,\sin\phi\sin\theta,\cos\phi\rangle\cdot\langle\sin\phi\cos\theta,\sin\phi\sin\theta,\cos\phi\rangle) \\ &=\sin\phi \end{aligned}[/latex].

The flux of [latex]{\bf{F}}_r[/latex] across [latex]S_a[/latex] is

[latex]\large{\displaystyle\iint_{S_a}{\bf{F}}_r\cdot{\bf{N}}dS=\displaystyle\int_0^{2\pi}\displaystyle\int_0^\pi\sin\phi d\phi d\theta=4\pi}[/latex].

Now, remember that we are interested in the flux across [latex]S[/latex], not necessarily the flux across [latex]S_a[/latex]. To calculate the flux across [latex]S[/latex], let [latex]E[/latex] be the solid between surfaces [latex]S_a[/latex] and [latex]S[/latex]. Then, the boundary of [latex]E[/latex] consists of [latex]S_a[/latex] and [latex]S[/latex]. Denote this boundary by [latex]S-S_a[/latex] to indicate that [latex]S[/latex] is oriented outward but now [latex]S_a[/latex] is oriented inward. We would like to apply the divergence theorem to solid E. Notice that the divergence theorem, as stated, can’t handle a solid such as [latex]E[/latex] because [latex]E[/latex] has a hole. However, the divergence theorem can be extended to handle solids with holes, just as Green’s theorem can be extended to handle regions with holes. This allows us to use the divergence theorem in the following way. By the divergence theorem,

[latex]\begin{aligned} \displaystyle\iint_{S-S_a}{\bf{F}}_r\cdot{\bf{N}}dS&=\displaystyle\iint_S{\bf{F}}_r\cdot{\bf{N}}dS-\displaystyle\iint_{S_a}{\bf{F}}_r\cdot{\bf{N}}dS \\ &=\displaystyle\iiint_E\text{div }{\bf{F}}_r dV \\ &=\displaystyle\iiint_E0 \ dV=0 \end{aligned}[/latex].

Therefore,

[latex]\large{\displaystyle\iint_S{\bf{F}}_r\cdot{\bf{N}}dS=\displaystyle\iint_{S_a}{\bf{F}}_r \cdot dS=4\pi}[/latex],

and we have our desired result.

[latex]_\blacksquare[/latex]

Applying Gauss’ Law

Now we return to calculating the flux across a smooth surface in the context of electrostatic field [latex]{\bf{E}}=\frac{q}{4\pi\varepsilon_0}{\bf{F}}_r[/latex] of a point charge at the origin. Let [latex]S[/latex] be a piecewise smooth closed surface that encompasses the origin. Then:

[latex]\begin{aligned} \displaystyle\iint_S{\bf{E}}\cdot d{\bf{S}}&=\displaystyle\iint_S\frac{q}{4\pi\varepsilon_0}{\bf{F}}_r\cdot d{\bf{S}} \\ &=\frac{q}{4\pi\varepsilon_0}\displaystyle\iint_S{\bf{F}}_r\cdot d{\bf{S}} \\ &=\frac{q}{\varepsilon_0} \end{aligned}[/latex].

If [latex]S[/latex] does not encompass the origin, then:

[latex]\large{\displaystyle\iint_S{\bf{E}}\cdot d{\bf{S}}=\frac{q}{4\pi\varepsilon_0}\displaystyle\iint_S{\bf{F}}_r\cdot d{\bf{S}}=0}[/latex].

Therefore, we have justified the claim that we set out to justify: the flux across closed surface [latex]S[/latex] is zero if the charge is outside of [latex]S[/latex], and the flux is [latex]q/\varepsilon_0[/latex] if the charge is inside of [latex]S[/latex].

This analysis works only if there is a single point charge at the origin. In this case, Gauss’ law says that the flux of [latex]\mathbf{E}[/latex] across [latex]S[/latex] is the total charge enclosed by [latex]S[/latex].

Gauss’ law can be extended to handle multiple charged solids in space, not just a single point charge at the origin. The logic is similar to the previous analysis, but beyond the scope of this text. In full generality, Gauss’ law states that if [latex]S[/latex] is a piecewise smooth closed surface and [latex]Q[/latex] is the total amount of charge inside of [latex]S[/latex], then the flux of [latex]\mathbf{E}[/latex] across [latex]S[/latex] is [latex]Q/\varepsilon_0[/latex].

Suppose we have four stationary point charges in space, all with a charge of 0.002 Coulombs (C). The charges are located at [latex](0, 1, 1)[/latex], [latex](1, 1, 4)[/latex], [latex](-1, 0, 0)[/latex], and [latex](-2, -2, 2)[/latex]. Let [latex]{\bf{E}}[/latex] denote the electrostatic field generated by these point charges. If [latex]S[/latex] is the sphere of radius 2 oriented outward and centered at the origin, then find [latex]\displaystyle\iint_S{\bf{E}}\cdot d{\bf{S}}[/latex].