Gauss' Divergence Theorem for Regions between Function Graphs
Text According to Gauss' Divergence Theorem,
∫∫∫_{W}(div F)dV = ∫∫_{∂W}F⋅n)dS.
for some region W in 3space and its boundary ∂W.
For a proof of Gauss' Divergence Theorem, please expand:
In proving Green's Theorem and Stokes' Theorem, we used the Fundamental Theorem of Calculus to determine how the value of some function changes from one point to another and then used integration to relate some twodimensional region to its onedimensional boundary.
We will again use the Fundamental Theorem of Calculus in proving Gauss' Theorem, but this time our result will relate a threedimensional region to its twodimensional boundary.
Consider two points (x_{0}, y_{0}, e) and (x_{0}, y_{0}, f) and some function R(x, y, z). From the Fundamental Theorem of Calculus, we know that the difference between R at these two points is given by the integral of R_{z} from one to the other:
R(x_{0}, y_{0}, f)  R(x_{0}, y_{0}, e) = ∫_{e}^{f}R_{z}(x_{0}, y_{0}, z)dz
Now if instead of considering two points, we consider two surfaces e(x, y) and f(x, y) defined for the domain a≤x≤b and c≤y≤d, with e(x, y) ≤ f(x, y), we can relate the values of R on these surfaces by performing a double integral over this domain:
∫_{c}^{d}∫_{a}^{b}(R(x, y, f)  R(x, y, e))dxdy = ∫_{c}^{d}∫_{a}^{b}∫_{e}^{f}R_{z}(x, y, z)dzdxdy
Suppose that the function R is the magnitude of the z component of some vector field. The vector form of this component, then, is Rk. It is useful to consider the dot product of this component with the unit normal vector to the surface, Rk⋅n as this represents the flux of the z component of some field across a surface (flux across surfaces is useful, for example, in the study of electric fields).
For pieces dS of surface f(x, y) over some piece of the domain, it turns out that Rk⋅ndS = Rdxdy. In general, for some function g(x, y) the unit normal n is given as (g_{x}, g_{y}, 1)/√(g_{x}^{2} + g_{y}^{2} + 1). dS is equal to √(g_{x}^{2} + g_{y}^{2} + 1)dxdy, so ndS = (g_{x}, g_{y}, 1)dxdy. This means that k⋅ndS = (0 * g_{x} + 0 * g_{y} + 1 * 1)dxdy = dxdy, so Rk⋅ndS = Rdxdy.
Surface e(x, y) is below surface f(x, y). If we are considering the region in 3space above surface e(x, y) and below surface f(x, y) and we want the normal to be pointing outward from this region, then the unit normal for e(x, y) must be defined as 1 * (g_{x}, g_{y}, 1)/√(g_{x}^{2} + g_{y}^{2} + 1). The end result is that, for surface e(x, y), Rk⋅ndS = Rdxdy.
Now we can make a substitution:
∫∫_{S1 + S2}Rk⋅ndS = ∫∫∫_{W}R_{z}(x, y, z)dV
, where S1 and S2 represent surfaces e(x, y) and f(x, y).
If we want to close the boundary of W with surfaces S3, S4, S5, and S6, we know that these surfaces are all vertical because they are given either constant x or constant y (x = a, x = b, y = c, y = d). This means that the unit normals on these surfaces are perpendicular to k, so
∫∫_{S3 + S4 + S5 + S6}Rk⋅ndS = 0
Now add this to
∫∫_{S1 + S2}Rk⋅ndS = ∫∫∫_{W}R_{z}(x, y, z)dV
to get
∫∫_{∂W}Rk⋅ndS = ∫∫∫_{W}R_{z}(x, y, z)dV
Where W is the region in 3space above e(x, y) and below f(x, y) and ∂W is its boundary.
If Q(x, y, z) is the magnitude of the y component of a vector field and W lies between two functions of x and z, then we can make a similar statement:
∫∫_{∂W}Qj⋅ndS = ∫∫∫_{W}Q_{y}(x, y, z)dV
Finally, if P(x, y, z) is the magnitude of the x component of a vector field and W lies between two functions of y and z, then:
∫∫_{∂W}Pi⋅ndS = ∫∫∫_{W}P_{x}(x, y, z)dV
It turns out that each of the statements above works for limits that are not constants. For example, the first of the three statements would work for a triangular domain. It is thus possible to find certain types of pyramids, triangular prisms, and rectangular prisms which work as regions for all three statements. We can compose any desired region W of infinitesimally small regions of these shapes. This makes the three statements compatible, which means we can add them to get Gauss' Divergence Theorem:
∫∫∫_{W}(div F)dV = ∫∫_{∂W}F⋅n)dS.
Demos
Gauss' Divergence Theorem (RdS term)
 
This demo verifies the statement R(x_{0}, y_{0}, f)  R(x_{0}, y_{0}, e) = ∫_{e}^{f}R_{z}(x_{0}, y_{0}, z)dz. You can move the hotspot to different points in the domain to see that the statement is true for the whole domain, which allows us to integrate twice to get ∫_{c}^{d}∫_{a}^{b}(R(x, y, f)  R(x, y, e))dxdy = ∫_{c}^{d}∫_{a}^{b}∫_{e}^{f}R_{z}(x, y, z)dzdxdy.

Gauss' Divergence Theorem (QdS term)
 
This demo resembles the first, but instead deals with the statements
Q(x_{0}, d, z_{0})  Q(x_{0}, c, z_{0}) = ∫_{c}^{d}R_{z}(x_{0}, y, z_{0})dy and ∫_{e}^{f}∫_{a}^{b}(Q(x, d, z)  Q(x, c, z))dxdz = ∫_{e}^{f}∫_{a}^{b}∫_{c}^{d}Q_{y}(x, y, z)dydxdz.

Gauss' Divergence Theorem (PdS term)
 
This demo resembles the first, but instead deals with the statements
P(b, y_{0}, z_{0})  P(a, y_{0}, z_{0}) = ∫_{a}^{b}P_{x}(x, y_{0}, z_{0})dy and ∫_{e}^{f}∫_{c}^{d}(P(b, y, z)  P(a, y, z))dydz = ∫_{e}^{f}∫_{c}^{d}∫_{a}^{b}P_{x}(x, y, z)dxdydz.

Gauss' Divergence Theorem
 
This demo shows that for some function f(x, y), k⋅ndS = 1 * dxdy, as the vertical component (shown in green) of ndS (shown in white) is always 1. We could make similar statements for functions of x and z and for functions of y and z, and can combine these statements with those illustrated in the previous three demos to get Gauss' Theorem.

Exercises Having seen Green's Theorem applied to divergence in the plane and Gauss' Divergence Theorem, can you make any conjectures regarding divergence in 4 or more dimensions?
