THE DIVERGENCE AND THE DIVERGENCE THEOREM

10. THE DIVERGENCE AND THE DIVERGENCE THEOREM

We have defined (in Section 7) the divergence of a vector function V(x, y, z) as

We now want to investigate the meaning and use of the divergence in physical applications.

Consider a region in which water is flowing. We can imagine drawing at every point a vector v equal to the velocity of the water at that point. The vector function v then represents a vector field. The curves tangent to v are called stream lines. We could in the same way discuss the flow of a gas, of heat, of electricity, or of particles (say from a radioactive source). We are going to show that if v represents the velocity of flow of any of these things, then div v is related to the amount of the substance which flows out of a given volume. This could be different from zero either because of a change in density (more air flows out than in as a room is heated)

Section 10 The Divergence and the Divergence Theorem 315

or because there is a source or sink in the volume (alpha particles flow out of but not into a box containing an alpha-radioactive source). Exactly the same mathematics applies to the electric and magnetic fields where v is replaced by E or B and the quantity corresponding to outflow of a material substance is called flux.

Figure 10.1

For our example of water flow, let V = vρ, where ρ is the density of the water. Then the amount of water crossing in time t an area A ′ which is perpendicular to the direction of flow, is (see Figure 10.1) the amount of water in a cylinder of cross section A ′ and length vt. This amount of water is

(vt)(A ′ )(ρ).

The same amount of water crosses area A (see Figure 10.1) whose normal is inclined at angle θ to v. Since A ′ = A cos θ,

vtA ′ ρ = vtρA cos θ.

Then if water is flowing in the direction v making an angle θ with the normal n to

a surface, the amount of water crossing unit area of the surface in unit time is (10.4)

vρ cos θ = V cos θ = V · n

if n is a unit vector. Now consider an element of volume dx dy dz in the region through which the water is flowing (Figure 10.2). Water is flowing either in or out of the volume dx dy dz through each of the six surfaces of the volume element; we shall calculate the net outward flow. In Figure 10.2, the rate at which water flows into dx dy dz

Figure 10.2

through surface 1 is [by (10.4)] V · i per unit area, or (V · i) dy dz through the area dy dz of surface 1. Since V · i = V x , we find that the rate at which water flows across surface 1 is V x dy dz. A similar expression gives the rate at which water flows out through surface 2, except that V x must be the x component of V at surface 2 instead of at surface 1. We want the difference of the two V x values at two points, one on surface 1 and one on surface 2, directly opposite each other, that is, for the

316 Vector Analysis Chapter 6

same y and z. These two values of V x differ by ∆V x which can be approximated (as in Chapter 4) by dV x . For constant y and z, dV x = (∂V x /∂x) dx. Then the net outflow through these two surfaces is the outflow through surface 2 minus the inflow through surface 1, namely,

(10.5) x [(V x at surface 2) − (V x at surface 1)]dy dz = dx dy dz. ∂x

We get similar expressions for the net outflow through the other two pairs of opposite surfaces:

∂V y dx dy dz

through top and bottom, and ∂y (10.6) ∂V z dx dy dz

through the other two sides. ∂z

Then the total net rate of loss of water from dx dy dz is

If we divide (10.7) by dx dy dz, we have the rate of loss of water per unit volume. This is the physical meaning of a divergence: It is the net rate of outflow per unit volume evaluated at a point (let dx dy dz shrink to a point). This is outflow of actual substance for liquids, gases, or particles; it is called flux for electric and magnetic fields. You should note that this is somewhat like a density. Density is mass per unit volume, but it is evaluated at a point and may vary from point to point. Similarly, the divergence is evaluated at each point and may vary from point to point.

As we have said, div V may be different from zero either because of time variation of the density or because of sources and sinks. Let

ψ = source density minus sink density = net mass of fluid being created (or added via something like a minute sprinkler system) per unit time per unit volume; ρ = density of the fluid = mass per unit volume; ∂ρ/∂t = time rate of increase of mass per unit volume.

Then: Rate of increase of mass in dx dy dz = rate of creation minus rate of outward flow, or in symbols

∂ρ dx dy dz = ψ dx dy dz − ∇ · V dx dy dz. ∂t

Canceling dx dy dz, we have

∂ρ =ψ−∇·V ∂t

or

∇· V=ψ−

∂t

Section 10 The Divergence and the Divergence Theorem 317

If there are no sources or sinks, then ψ = 0; the resulting equation is often called the equation of continuity. (See Problem 15.)

Equation of continuity

∂t

If ∂ρ/∂t = 0, then (10.10)

V = ψ.

In the case of the electric field, the “sources” and “sinks” are electric charges and the equation corresponding to (10.10) is div D = ψ, where ψ is the charge density and D is the electric displacement. For the magnetic field B you would expect the sources to be magnetic poles; however, there are no free magnetic poles, so div B = 0 always.

We have shown that the mass of fluid crossing a plane area A per unit time is AV · n, where n is a unit vec- tor normal to A, v and ρ are the velocity and density of the fluid, and V = vρ. Consider any closed surface, and let dσ represent an area element on the surface (Fig- ure 10.3). For example: for a plane, dσ = dx dy; for a spherical surface,

Figure 10.3 Let n be the unit vector normal to dσ and pointing out of the surface (n varies

dσ = r 2 sin θ dθ dφ.

in direction from point to point on the surface). Then the mass of fluid flowing out through dσ is V · n dσ by (10.4) and the total outflow from the volume inclosed by the surface is

V · n dσ,

where the double integral is evaluated over the closed surface.

We showed previously [see (10.7)] that for the volume element dτ = dx dy dz: (10.12)

The outflow from dτ is ∇ · V dτ.

For simplicity, we proved this for a rectangular coordinate volume element dx dy dz. With extra effort we could prove it more generally, say for volume elements with slanted sides or for spherical coordinate volume elements. From now on we shall assume that dτ includes more general volume element shapes.

It is worth noticing here another way [besides (7.2)] of defining the divergence. If we write (10.11) for the surface of a volume element dτ , we have two expressions for the total outflow from dτ , and these must be equal. Thus

surface of dτ

318 Vector Analysis Chapter 6

The value of ∇ · V on the left is, of course, an average value of ∇ · V in dτ , but if we divide (10.13) by dτ and let dτ shrink to a point, we have a definition of ∇ · V at the point:

surface of dτ

If we start with (10.14) as the definition of ∇ · V, then the discussion leading to (10.7) is a proof that ∇ · V as defined in (10.14) is equal to ∇ · V as defined in (7.2).

The Divergence Theorem See (10.17). The divergence theorem is also called Gauss’s theorem, but be careful to distinguish this mathematical theorem from Gauss’s law which is a law of physics; see (10.23).

Consider a large volume τ ; imagine it cut up into volume elements dτ i (a cross section of this is shown in Figure 10.4). The outflow from each dτ i is ∇ · V dτ i ; let us add together the outflow from all the dτ i to get

Figure 10.4 We shall show that (10.15) is the outflow from the large volume τ . Consider the

flow between the elements marked a and b in Figure 10.4 across their common face. An outflow from a to b is an inflow (negative outflow) from b to a, so that in the sum (10.15) such outflows across interior faces cancel. The total sum in (10.15) then equals just the total outflow from the large volume. As the size of the volume elements tends to zero, this sum approaches a triple integral over the volume,

We have shown that both (10.11) and (10.16) are equal to the total outflow from the large volume; hence they are equal to each other, and we have the divergence theorem as stated in (9.14):

Divergence theorem

volume τ

surface inclosing τ

(n points out of the closed surface σ.)

Notice that the divergence theorem converts a volume integral into an integral over

a closed surface or vice versa; we can then evaluate whichever one is the easier to do. In (10.17) we have carefully written the volume integral with three integral signs and the surface integral with two integral signs. However, it is rather common to write only one integral sign for either case when the volume or area element is indicated by a single differential (dτ , dV , etc., for volume; dσ, dA, dS, etc., for

Section 10 The Divergence and the Divergence Theorem 319

surface area). Thus we might write dτ or dτ or dx dy dz, all meaning the same thing. When the single integral sign is used to indicate a surface or volume integral, you must see from the notation (τ for volume, σ for area), or the words under the integral, what is really meant. To indicate a surface integral over a closed surface or a line integral around a closed curve, the symbol

is often used. Thus we might write either different notation for the integrand V · n dσ is often used. Instead of using a unit vector n and the scalar magnitude dσ, we may write the vector dσ meaning a vector of magnitude dσ in the direction n; thus dσ means exactly the same thing as n dσ, and we may replace V · n dσ by V · dσ in (10.17).

Example of the Divergence Theorem Let V = ix + jy + kz and evaluate cylinder shown in Figure 10.5.

By the divergence theorem this is equal to ∇ · V dτ over the volume of the cylinder. (Note that we are using single integral signs, but the notation and words make it clear which integral is a volume integral and which a surface integral.) We find from the definition of divergence

Then by (10.17)

surface of

volume of

cylinder

cylinder

= 3 times volume of cylinder = 3πa 2 h. It is harder to evaluate

of calculating a surface integral and to verify the divergence theorem in a special case. We need the surface normal n. On the top surface (Figure 10.5) n = k, and there V · n = V · k = z = h. Then

V · n dσ = h dσ = h · πa 2 .

top surface of

cylinder

On the bottom surface, n = −k, V·n = −z = 0; hence the integral over the bottom surface is zero. On the curved surface we might see by inspection that the vector ix + jy is normal to the surface, so for the curved surface we have

If the vector n is not obvious by inspection, we can easily find it; recall (Section

6) that if the equation of a surface is φ(x, y, z) = const., then ∇φ is perpendicular to the surface. In this problem, the equation of the cylinder is x 2 +y 2 =a 2 ; then

320 Vector Analysis Chapter 6

φ=x 2 +y 2 , ∇φ = 2xi + 2yj, and we get the same unit vector n as above. Then for the curved surface we find

V · n dσ = a dσ = a · (area of curved surface) = a · 2πah.

curved surface

The value of

2 h+2πa 2 h= 3πa 2 h as before.

Gauss’s Law The divergence theorem is very important in electricity. In order to see how it is used, we need a law in electricity known as Gauss’s law. Let us derive this law from the more familiar Coulomb’s law (8.11). Coulomb’s law (written this time in SI units) gives for the electric field at r due to a point charge q at the origin

E=

Coulomb’s law

4πǫ 0 r

0 is a constant called the permittivity of free space and = 9 · 10 in SI units.) 4πǫ 0

The electric displacement D is defined (in free space) by D = ǫ 0 E; then

Let σ be a closed surface surrounding the point charge q at the origin; let dσ be an element of area of the surface at the point r, and let n be a unit normal to dσ (Figures 10.3 and 10.6). Also (Figure 10.6) let dA be the projection of dσ onto a sphere of radius r and center at O and let dΩ be the solid angle subtended by dσ (and dA) at O. Then by definition of solid angle

dΩ = 2 dA.

From Figure 10.6 and equations (10.19) and (10.20), we get

D · n dσ = D cos θ dσ = D dA =

·r 2 dΩ = q dΩ 4π

4πr 2

Section 10 The Divergence and the Divergence Theorem 321

We want to find the surface integral of D · n dσ over the closed surface σ; by (10.21) this is

(q inside σ).

solid angle

This is a simple case of Gauss’s law when we have only one point charge q; for most purposes we shall want Gauss’s law in the forms (10.23) or (10.24) below. Before we derive these, we should note carefully that in (10.22) the charge q is inside the closed surface σ. If we repeat the derivation of (10.22) for a point charge q outside the surface (Problem 13), we find that in this case

D · n dσ = 0.

closed σ

Next suppose there are several charges q i inside the closed surface. For each q i and the D i corresponding to it, we could write an equation like (10.22). But the total electric displacement vector D at a point due to all the q i is the vector sum of the vectors D i . Thus we have

D · n dσ =

D i · n dσ =

surface σ closed

surface σ closed

Therefore for any charge distribution inside a closed surface

D · n dσ = total charge inside the closed surface.

Gauss’s law

closed surface

If, instead of isolated charges, we have a charge distribution with charge density ρ (which may vary from point to point), then the total charge is ρ dτ, so

Gauss’s law

bounded by σ

Since (by Problem 13) charges outside the closed surface σ do not contribute to the integral, (10.23) and (10.24) are correct if D is the total electric displacement due to all charges inside and outside the surface. The total charge on the right-hand side of these equations is, however, just the charge inside the surface σ. Either (10.23) or (10.24) is called Gauss’s law.

We now want to see the use of the divergence theorem in connection with Gauss’s law. By the divergence theorem, the surface integral on the left-hand side of (10.23) or (10.24) is equal to

D dτ.

volume bounded by σ

322 Vector Analysis Chapter 6

Then (10.24) can be written as

Since this is true for every volume, we must have ∇·D = ρ; this is one of the Maxwell equations in electricity. What we have done is to start by assuming Coulomb’s law; we have derived Gauss’s law from it, and then by use of the divergence theorem, we have derived the Maxwell equation ∇·D = ρ. From a more sophisticated viewpoint, we might take the Maxwell equation as one of our basic assumptions in electricity. We could then use the divergence theorem to obtain Gauss’s law:

volume τ surface σ

= total charge inclosed by σ. From Gauss’s law we could then derive Coulomb’s law (Problem 14); more generally

we can often use Gauss’s law to obtain the electric field produced by a given charge distribution as in the following example.

Example. Find E just above a very large conducting plate carrying a surface charge of

C coulombs per square meter on each surface. The electric field inside a conductor is zero when we are considering an electro- statics problem (otherwise current would flow). From the symmetry of the problem (all horizontal directions are equivalent), we can say that E (and D) must be vertical as shown in Figure 10.7. We now find is shown by the dotted lines. The integral over the bottom surface is zero since

D = 0 inside the conductor. The integral over the vertical sides is zero because D is perpendicular to n there. On the top surface D · n = |D| and

D · n dσ = |D|· (surface area). By (10.25) this is equal to the charge inclosed by the box, which is C· (surface area). Thus we have |D| · (surface area) = C · (surface area) , or

|D| = C and |E| = C/ǫ 0 .

Figure 10.7

PROBLEMS, SECTION 10

1. Evaluate both sides of (10.17) if V = r = ix + jy + kz, and τ is the volume x 2 +y 2 +z 2 ≤ 1, and so verify the divergence theorem in this case.

2. Given V = x 2 i+y 2 j+z 2 k, integrate V · n dσ over the whole surface of the cube of side 1 with four of its vertices at (0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0). Evaluate the same integral by means of the divergence theorem.

Section 10 The Divergence and the Divergence Theorem 323

Evaluate each of the integrals in Problems 3 to 8 as either a volume integral or a surface integral, whichever is easier.

3. RR r · n dσ over the whole surface of the cylinder bounded by x 2 +y 2 = 1, z = 0, and z = 3; r means ix + jy + kz.

4. RR V · n dσ if V = x cos 2 y i + xz j + z sin 2 y k over the surface of a sphere with center at the origin and radius 3.

5. RRR (∇ · F) dτ over the region x 2 +y 2 +z 2 ≤ 25, where F = (x 2 +y 2 +z 2 )(xi + yj + zk).

6. RRR ∇ · V dτ over the unit cube in the first octant, where V = (x 3 −x 2 )yi + (y 3 − 2y 2 + y)xj + (z 2 − 1)k. 7. RR r · n dσ over the entire surface of the cone with base x 2 +y 2 ≤ 16, z = 0, and

vertex at (0, 0, 3), where r = ix + jy + kz. 8. RRR ∇ · V dτ over the volume x 2 +y 2 ≤ 4, 0 ≤ z ≤ 5, V = ( px 2 +y 2 )(ix + jy). 9. If F = xi+yj, calculate

2 RR F·n dσ over the part of the surface z = 4−x 2 −y that is above the (x, y) plane, by applying the divergence theorem to the volume bounded

by the surface and the piece that it cuts out of the (x, y) plane. Hint: What is F · n on the (x, y) plane?

10. Evaluate RR V · n dσ over the curved surface of the hemisphere x 2 +y 2 +z 2 = 9, z ≥ 0, if V = yi + xzj + (2z − 1)k. Careful: See Problem 9.

11. Given that B = curl A, use the divergence theorem to show that H B · n dσ over any closed surface is zero.

12. A cylindrical capacitor consists of two long concentric metal cylinders. If there is a charge of k coulombs per meter on the inside cylinder of radius R 1 , and −k coulombs per meter on the outside cylinder of radius R 2 , find the electric field E between the cylinders. Hint: Use Gauss’s law and the method indicated in Figure 10.7. What is E inside the inner cylinder? Outside the outer cylinder? (Again use Gauss’s law.) Find, either by inspection or by direct integration, the potential φ such that E = −∇φ for each of the three regions above. In each case E is not affected by adding an arbitrary constant to φ. Adjust the additive constant to make φ a continuous function for all space.

13. Draw a figure similar to Figure 10.6 but with q outside the surface. A vector (like r in the figure) from q to the surface now intersects it twice, and for each solid angle dΩ there are two dσ’s, one where r enters and one where it leaves the surface. Show that D · n dσ is given by (10.21) for the dσ where r leaves the surface and the negative of (10.21) for the dσ where r enters the surface. Hence show that the total

H D · n dσ over the closed surface is zero. 14. Obtain Coulomb’s law from Gauss’s law by considering a spherical surface σ with

center at q. 15. Suppose the density ρ of a fluid varies from point to point as well as with time,

that is, ρ = ρ(x, y, z, t). If we follow the fluid along a streamline, then x, y, z are functions of t such that the fluid velocity is

dx

dy

dz

v=i

+j

+k .

dt

dt

dt

324 Vector Analysis Chapter 6

Show that then dρ/dt = ∂ρ/∂t + v · ∇ρ. Combine this equation with (10.9) to get

(Physically, dρ/dt is the rate of change of density with time as we follow the fluid along a streamline; ∂ρ/∂t is the corresponding rate at a fixed point.) For a steady state (that is, time-independent), ∂ρ/∂t = 0, but dρ/dt is not necessarily zero. For an incompressible fluid, dρ/dt = 0; show that then ∇ · v = 0. (Note that incompressible does not necessarily mean constant density since dρ/dt = 0 does not imply either time or space independence of ρ; consider, for example, a flow of water mixed with blobs of oil.)

16. The following equations are variously known as Green’s first and second identities or formulas or theorems. Derive them, as indicated, from the divergence theorem.

(φ∇ 2 ψ + ∇φ · ∇ψ) dτ =

(φ∇ψ) · n dσ.

volume τ inside σ

surface σ closed

To prove this, let V = φ∇ψ in the divergence theorem. Z

(φ∇ 2 ψ − ψ∇ 2 φ) dτ =

(φ∇ψ − ψ∇φ) · n dσ.

To prove this, copy Theorem 1 above as is and also with φ and ψ interchanged; then subtract the two equations.