Evaluate surface integral using divergence theorem

The divergence theorem translates between the flux integral of closed surface [latex]S[/latex] and a triple integral over the solid enclosed by [latex]S[/latex]. Therefore, the theorem allows us to compute flux integrals or triple integrals that would ordinarily be difficult to compute by translating the flux integral into a triple integral and vice versa.

Example: applying the divergence theorem

Calculate the surface integral [latex]\displaystyle\iint_>\cdot d<\bf>[/latex], where [latex]S[/latex] is cylinder [latex]x^2+y^2=1[/latex], [latex]0\leq z\leq2[/latex], including the circular top and bottom, and [latex]>=\left\langle\frac+yz,\frac3-\sin(xz),z-x-y\right\rangle[/latex].

Show Solution

We could calculate this integral without the divergence theorem, but the calculation is not straightforward because we would have to break the flux integral into three separate integrals: one for the top of the cylinder, one for the bottom, and one for the side. Furthermore, each integral would require parameterizing the corresponding surface, calculating tangent vectors and their cross product, and using the equation to calculate scalar surface integrals.

By contrast, the divergence theorem allows us to calculate the single triple integral [latex]\displaystyle\iiint_E\text>dV[/latex], where [latex]E[/latex] is the solid enclosed by the cylinder. Using the divergence theorem and converting to cylindrical coordinates, we have

[latex]\begin \displaystyle\iint_S>\cdot d>&=\displaystyle\iiint_E\text>dV \\ &=\displaystyle\iiint_E(x^2+y^2+1)dV \\ &=\displaystyle\int_0^<2\pi>\displaystyle\int_0^1\displaystyle\int_0^2(r^2+1)r \ dzdrd\theta \\ &=\frac32\displaystyle\int_0^<2\pi>d\theta=3\pi \end[/latex].

Try it

Use the divergence theorem to calculate flux integral [latex]\displaystyle\iint_S>\cdot d>[/latex], where [latex]S[/latex] is the boundary of the box given by [latex]0\leq x\leq2[/latex], [latex]1\leq y\leq4[/latex], [latex]0\leq z\leq1[/latex], and [latex]>=\langle x^2+yz,y-z,2x+2y+2z\rangle[/latex] (see the following figure).

This figure is a vector diagram in three dimensions. The box of the figure spans x from 0 to 2; y from 0 to 4; and z from 0 to 1. The vectors point up increasingly with distance from the origin; toward larger x with increasing distance from the origin; and toward smaller y values with increasing height.

Figure 1. The box given by [latex]0\leq x\leq2[/latex], [latex]1\leq y\leq4[/latex], [latex]0\leq z\leq1[/latex], and [latex]>=\langle x^2+yz,y-z,2x+2y+2z\rangle[/latex]

Show Solution [latex]30[/latex].

Example: applying the divergence theorem

Let [latex]>=\left\langle-\fracz,\fracz,0\right\rangle[/latex] be the velocity field of a fluid. Let [latex]C[/latex] be the solid cube given by [latex]1\leq x \leq4[/latex], [latex]2\leq y\leq5[/latex], [latex]1\leq z\leq4[/latex], and let [latex]S[/latex] be the boundary of this cube (see the following figure). Find the flow rate of the fluid across [latex]S[/latex].

<img src=

Figure 2. Vector field [latex]>=\left\langle-\fracz,\fracz,0\right\rangle[/latex].

Show Solution

The flow rate of the fluid across [latex]S[/latex] is [latex]\displaystyle\iint_s>\cdot d>[/latex]. Before calculating this flux integral, let’s discuss what the value of the integral should be. Based on Figure 2, we see that if we place this cube in the fluid (as long as the cube doesn’t encompass the origin), then the rate of fluid entering the cube is the same as the rate of fluid exiting the cube. The field is rotational in nature and, for a given circle parallel to the [latex]xy[/latex]-plane that has a center on the [latex]z[/latex]-axis, the vectors along that circle are all the same magnitude. That is how we can see that the flow rate is the same entering and exiting the cube. The flow into the cube cancels with the flow out of the cube, and therefore the flow rate of the fluid across the cube should be zero.

To verify this intuition, we need to calculate the flux integral. Calculating the flux integral directly requires breaking the flux integral into six separate flux integrals, one for each face of the cube. We also need to find tangent vectors, compute their cross product, and use the equation to calculate scalar surface integrals. However, using the divergence theorem makes this calculation go much more quickly:

[latex]\begin \displaystyle\iint_s>\cdot d>&=\displaystyle\iiint_C\text(>)dV \\ &=\displaystyle\iiint_C0 \ dV=0 \end[/latex].

Therefore the flux is zero, as expected.

try it

Let [latex]>=\left\langle\fracz,\fracz,0\right\rangle[/latex] be the velocity field of a fluid. Let [latex]C[/latex] be the solid cube given by [latex]1\leq x\leq4[/latex], [latex]2\leq y\leq5[/latex], [latex]1\leq z\leq4[/latex], and let [latex]S[/latex] be the boundary of this cube (see the following figure). Find the flow rate of the fluid across [latex]S[/latex].

This is a figure of a diagram of the given vector field in three dimensions. The x components are x/z, the y components are y/z, and the z components are 0.

Figure 3. The solid cube given by [latex]1\leq x\leq4[/latex], [latex]2\leq y\leq5[/latex], [latex]1\leq z\leq4[/latex]

Show Solution [latex]9\ln(16)[/latex]

Watch the following video to see the worked solution to the above Try It

Example “Applying the Divergence Theorem” illustrates a remarkable consequence of the divergence theorem. Let [latex]S[/latex] be a piecewise, smooth closed surface and let [latex]>[/latex] be a vector field defined on an open region containing the surface enclosed by [latex]S[/latex]. If [latex]>[/latex] has the form [latex]>=\langle f(y,z),g(x,z),h(x,y)\rangle[/latex], then the divergence of [latex]>[/latex] is zero. By the divergence theorem, the flux of [latex]>[/latex] across [latex]S[/latex] is also zero. This makes certain flux integrals incredibly easy to calculate. For example, suppose we wanted to calculate the flux integral [latex]\displaystyle\iint_S>\cdot d>[/latex] where [latex]S[/latex] is a cube and

Calculating the flux integral directly would be difficult, if not impossible, using techniques we studied previously. At the very least, we would have to break the flux integral into six integrals, one for each face of the cube. But, because the divergence of this field is zero, the divergence theorem immediately shows that the flux integral is zero.

We can now use the divergence theorem to justify the physical interpretation of divergence that we discussed earlier. Recall that if [latex]>[/latex] is a continuous three-dimensional vector field and [latex]P[/latex] is a point in the domain of [latex]>[/latex], then the divergence of [latex]>[/latex] at [latex]P[/latex] is a measure of the “outflowing-ness” of [latex]>[/latex] at [latex]P[/latex]. If [latex]>[/latex] represents the velocity field of a fluid, then the divergence of [latex]>[/latex] at [latex]P[/latex] is a measure of the net flow rate out of point [latex]P[/latex] (the flow of fluid out of [latex]P[/latex] less the flow of fluid in to [latex]P[/latex]). To see how the divergence theorem justifies this interpretation, let [latex]B_r[/latex] be a ball of very small radius [latex]r[/latex] with center [latex]P[/latex], and assume that [latex]B_r[/latex] is in the domain of [latex]>[/latex]. Furthermore, assume that [latex]B_r[/latex] has a positive, outward orientation. Since the radius of [latex]B_r[/latex] is small and [latex]>[/latex] is continuous, the divergence of [latex]>[/latex] is approximately constant on [latex]B_r[/latex]. That is, if [latex]P'[/latex] is any point in [latex]B_r[/latex], then [latex]\text>(P)\approx\text>(P^\prime)[/latex]. Let [latex]S_r[/latex] denote the boundary sphere of [latex]B_r[/latex]. We can approximate the flux across [latex]S_r[/latex] using the divergence theorem as follows:

As we shrink the radius [latex]r[/latex] to zero via a limit, the quantity [latex]\text>(P)V(B_r)[/latex] gets arbitrarily close to the flux. Therefore,

and we can consider the divergence at [latex]P[/latex] as measuring the net rate of outward flux per unit volume at [latex]P[/latex]. Since “outflowing-ness” is an informal term for the net rate of outward flux per unit volume, we have justified the physical interpretation of divergence we discussed earlier, and we have used the divergence theorem to give this justification.

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, and the divergence theorem allows us to give these equations in both integral and differential forms.

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]>[/latex], then the flux of [latex]>[/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[/latex]. Let [latex]>_r[/latex] denote radial vector field [latex]>_r=\frac1\left\langle\fracy,\fracr,\fracr\right\rangle[/latex]. The vector at a given position in space points in the direction of unit radial vector [latex]\left\langle\fracy,\fracr,\fracr\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]>[/latex] given by

where the approximation [latex]\varepsilon=8.854\times10^[/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]>[/latex] is a radial vector field similar to the gravitational field described in Example “A Unit Vector Field”. The difference is that this field points outward whereas the gravitational field points inward. Because

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]>_r[/latex] is zero and then we show that the flux of [latex]>_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.

Example: the divergence of [latex]F_r[/latex] is Zero

Verify that the divergence of [latex]>_r[/latex] is zero where [latex]>_r[/latex] is defined (away from the origin).

Show Solution

Since [latex]r=\sqrt[/latex], the quotient rule gives us