Lecture 33

Classical Integration Theorems in the Plane

In this section, we present two very important results on integration over closed curves in the plane, namely, Green’s Theorem and the Theorem, as a prelude to their important counterparts in R3 involving surface .

Green’s Theorem in the Plane

(Relevant section from Stewart, , Early Transcendentals, Sixth Edition: 16.4)

2 1 Let F(x,y) = F1(x,y) i + F2(x,y) j be a vector field in R . Let C be a simple closed (piecewise C ) curve in R2 that encloses a simply connected (i.e., “no holes”) region D ⊂ R. Also assume that the ∂F ∂F partial 2 and 1 exist at all points (x,y) ∈ D. Then, ∂x ∂y

∂F ∂F F · dr = 2 − 1 dA, (1) IC ZZD  ∂x ∂y  where the line integration is performed over C in a counterclockwise direction, with D lying to the left of the path. Note:

1. The on the left is a – the circulation of the vector field F over the closed curve C.

2. The integral on the right is a double integral over the region D enclosed by C.

Special case: If ∂F ∂F 2 = 1 , (2) ∂x ∂y for all points (x,y) ∈ D, then the integrand in the double integral of Eq. (1) is zero, implying that the circulation integral F · dr is zero. IC We’ve seen this situation before: Recall that the above equality condition for the partial derivatives is the condition for F to be conservative. From this, we would suspect that the circulation integral over a closed curve C would be zero, because of the Generalized Fundamental Theorem of Calculus

247 (the endpoints are the same point). But also recall that we have to be a bit careful – we must be concerned about the possibility of “interference” from singularities that might make the circulation integral nonzero. In this theorem, however, we have assumed that there are no such singularities – the derivatives are assumed to exist and F is therefore defined over the region. Therefore, we may finally conclude that, yes, the line integral is zero. In fact, the integrand in Green’s Theorem, Eq. (1) is the k component of the of F. To see this, let us compute it:

i j k

~ curl F = ∇× F = ∂/∂x ∂/∂y ∂/∂z

F1(x,y) F2(x,y) 0

∂F ∂F = 0i + 0j + 2 − 1 k.  ∂x ∂y 

It is important to keep in mind that that the curl of a vector field in R2 is a vector that points in the z-direction. This is related to the convention of assigning a velocity vector that points along an axis of rotation using the right-hand rule. With the above result, we can rewrite Green’s Theorem as

F · dr = [curl F]z dA, (3) IC ZZD where [v]z denotes the z-component of vector v. In this case, the z-component of curl F is its only component. For this reason, we shall omit the subscript z in this section.

Examples:

1. The vector field F = −ωyi + ωxj. You will recall that this is the velocity vector field of a thin dθ plate on the xy-plane that is rotating about the z-axis with angular speed = ω. Now let C dt R denote the circle of radius R> 0 centered at the origin. Earlier in the course, we computed the

circulation integral of F over CR to be

F · dr = 2πωR2. (4) I

This was done by a direct calculation of the line integral using the parametrization of CR as

r(t) = (R cos t, R sin t). Let us now compute this result using Green’s Theorem. Here F1 = −ωy

and F2 = ωx so that ∂F ∂F 2 − 1 = ω − (−ω) = 2ω. (5) ∂x ∂y

248 Then the double integral in Green’s Theorem is

∂F ∂F 2 − 1 dA = 2ω dA = 2ωA(D) = 2ωπR2, (6) ZZD  ∂x ∂y  ZZD where A(D) denotes the area of region D (area of a circular region, radius R).

It is sometimes misleading to present this example because people may associate the curl of F, which is 2ω, with the origin, about which the rotation is taking place. But the curl of this vector field is 2ω everywhere. This means that for any simple closed curve in the plane,

F · dr = 2ωA(D), (7) IC where A(D) denotes the area of the region D enclosed by C.

1. Compute the circulation of the vector field F = −y2i + xj around the circle of radius 1 centered 2 at the origin. Here, F1 = −y and F2 = x. Then ∂F ∂F 2 − 1 dA = (1 + 2y) dA (8) ZZD  ∂x ∂y  ZZD = dA + 2 y dA ZZD ZZD = π.

The first integral is the area of the region enclosed by the unit circle. The second integral is zero. One may confirm this result by computing the integral explicitly, either with Cartesian or planar polar coordinates. One may also conclude that it is zero because the y is an odd function – y > 0 over the region above the x-axis and y < 0 over the region below the x-axis which is a mirror image of the region above.

Another way of deducing that the integral is zero is to note that it is related to the center of mass of region D when the density is constant, i.e., the centroid:

1 y¯ = y dA. (9) A(D) ZZD But by symmetry,y ¯ = 0. Therefore the integral is zero.

You can also confirm the above result by explicitly computing the circulation integral using the parametrization r(t) = (cos t, sin t).

2. The vector field y x F = − i + j. (10) x2 + y2 x2 + y2

249 You may recall that this vector field described, up to a constant, the magnetic field around a thin current-carrying wire of infinite length lying on the z-axis. Also recall that

curl F = ∇×~ F = 0, (x,y) 6= 0. (11)

Because the curl is not defined at (0,0), we can use Green’s Theorem only for simple closed curves C that do not enclose the origin (0,0). (Recall that one of the assumptions in Green’s Theorem was that the partial derivatives existed at all points (x,y) ∈ D, the region enclosed by C.) In this case, all circulation integrals are zero:

F · dr = 0. (12) IC

We cannot use Green’s Theorem to conclude anything about circulation integrals over closed curves C that enclose the origin. In this case, we computed earlier in this course that the

circulation integral over a circle CR of radius R centered at the origin is 2π. From this result, one can actually conclude that the circulation integral over any simple curve C enclosing the origin is 2π.

3. Some additional special cases: The vector fields

1 F = −yi, F = xj, F = (−yi + xj). (13) 2

In all of these cases, ∂F ∂F 2 − 1 = 1. (14) ∂x ∂y For these vector fields

F · dr = dA = A(D), the area of D. (15) IC ZZD

In fact, there are many, many other vector fields F = F1i + F2j for which Eq. (14) is satisfied. Can you find any? Can you find a general family of such fields?

250 Physical interpretation of the curl in terms of the circulation integral

You may recall that when the curl and divergence operators were introduced some time ago, a physical interpretation of the divergence operator could be provided in terms of the total outward flow of a vector field from a tiny box of dimensions ∆x and ∆y centered at a point (x,y). A “box-based” interpretation of the curl operator could not be made at that time because it would have required the notion of the circulation integral which, of course, was not developed until the previous lecture. Now that we know about the circulation integral, we can obtain an interpretation of the curl operator. To start, we consider the rectangular region ABCD centered at (x,y) with dimensions ∆x and ∆y, as sketched below. We shall estimate the circulation of a planar vector field

F(x,y)= F1(x,y) i + F2(x,y) j (16) along the closed curve C composed of the four line segments C1, C2, C3 and C4, identified in the figure.

D C3 C y + ∆y/2

C4 P (x, y) y C2

y − ∆y/2 A B C1

x − ∆x/2 x x + ∆x/2

From the additivity property of integrals, the circulation integral of F will be given by

F · dr = F · dr + F · dr + F · dr + F · dr. (17) IC ZC1 ZC2 ZC3 ZC4 Recall that each of these integrals is computed by means of a parametrization of the form

b ′ F · dr = F(r(t)) · r (t) dt, (18) ZCi Za ′ ′ ′ where the curve Ci is parametrized as r(t) = (x(t),y(t)), a ≤ t ≤ b. The vector r (t) = (x (t),y (t)) is the vector to the curve Ci. We now consider the line integral over each of these curves.

251 1. Curve C1: We may parametrize this curve as

∆x ∆y x(t)= x − + t, y(t)= y − , 0 ≤ t ≤ ∆x, (19) 2 2

implying that the tangent vector is

′ ′ ′ r (t) = (x (t),y (t)) = (1, 0). (20)

As such, the integrand in (18) will be given by

′ ∆y ∆y F(r(t)) · r (t)= F x(t),y − =∼ F x,y − . (21) 1  2  1  2 

(The contribution from F2 is zero.) Note that we are approximating this term by setting x(t) to be constant, namely the value of x at P . Since this approximate integrand is a constant, the line integral will be the product of this constant with the length of the curve, ∆x. The result is

∆y F · dr =∼ F1(x,y − )∆x. (22) ZC1 2

2. Curve C3: We may parametrize this curve as

∆x ∆y x(t)= x + − t, y(t)= y + , 0 ≤ t ≤ ∆x. (23) 2 2

implying that the tangent vector is

′ ′ (x (t),y (t)) = (−1, 0). (24)

The integrand in (18) will be given by

′ ∆y ∆y F(r(t)) · r (t)= −F x(t),y + =∼ −F x,y + . (25) 1  2  1  2 

(The contribution from F2 is again zero.) Once again, since we have approximated the integrand by a constant, the line integral will simply be the product of this constant with the length of the curve, ∆x: ∆y F · dr =∼ −F1 x,y + ∆x. (26) ZC3  2 

Let us now add up the contributions from curves C1 and C3:

∆y ∆y F · dr + F · dr =∼ −F1 x,y + + F1 x,y − ∆x. (27) ZC1 ZC3   2   2 

252 And now perform a few manipulations on the RHS:

[−F1 (x,y +∆y/2) + F1 (x,y − ∆y/2)]∆x = − [F1 (x,y +∆y/2) − F1 (x,y − ∆y/2)]∆x F (x,y +∆y/2) − F (x,y − ∆y/2) = − 1 1 ∆x∆y  ∆y  ∂F1 =∼ − ∆x∆y. (28) ∂y

We must now consider the contributions from curves C2 and C4. The analysis proceeds in a manner similar to the above. The main difference is that the tangent vectors to C2 and C4 are (0, 1) and (0, −1), respectively, which implies that the contributions to the line integrals come from the second component of F, i.e., F2(x,y). The result is as follows,

∂F F · dr + F · dr =∼ 2 ∆x∆y. (29) ZC2 ZC4 ∂x

Recalling Eq. (17), we now add up the contributions from curves C1 to C4 to obtain the result,

∂F2 ∂F1 F · dr =∼ − ∆x∆y. (30) IC  ∂x ∂y 

In other words, the circulation of the vector field around the rectangular curve C is approximated by the z-component of the curl of F multiplied by the area ∆A =∆x∆y of the box. If we divide by this area and take the , then

1 ∂F ∂F lim F · dr = 2 − 1 = [∇×~ F] . (31) → z ∆A 0 ∆A IC ∂x ∂y

The curl at (x,y) is the limiting circulation of the field per unit area. We’ll show this in another way at the end of this section.

253 The in the Plane

(Relevant section from Stewart, Calculus, Early Transcendentals, Sixth Edition: 16.5, p. 1067)

Note: Unfortunately, the discussion of the Divergence Theorem in the Plane in Stewart’s text is quite minimal, being presented on p. 1067 only as a consequence of Green’s Theorem. It is even more unfortunate that the physical interpretation of this result, i.e., as measuring the total outward flux of a vector field through a closed curve C, is missing. For this reason, these lecture notes will have to serve as the primary source of information. You are invited, of course, to consult other textbooks on , e.g., M. Lovric, Vector Calculus, or R.A. Adams, Calculus, Several Variables. (In past years, these books were used as texts for this course.)

Let F(x,y) = F1(x,y) i + F2(x,y) j be a vector field in the plane. Let C be a simple closed (piecewise C1) curve that encloses a region D. Let Nˆ denote the unit outward normal to C assumed to exist at all points on the curve (except perhaps at a finite set of “corners”). Furthermore, assume that the divergence of F is defined for all points in D, i.e.,

∂F ∂F div F(x,y)= ∇~ · F(x,y)= 1 (x,y)+ 2 (x,y) (32) ∂x ∂y is defined for all (x,y) ∈ D. The Divergence Theorem in the Plane then states that

F · Nˆ ds = div F dA. (33) IC ZZD The left integral is a line integral around the curve C – it measures the net outward flux of the vector field F through the closed curve C. The right integral is a double integration over the region D enclosed by C.

Examples:

1. The vector field F = K(xi + yj). Let CR denote the circle of radius R centered at the origin (0, 0). During the lectures on line integrals, we computed the net outward flux of this vector

field through CR as a line integral to obtain the result

F · Nˆ ds = 2πKR2. (34) IC

254 Let us now compute this outward flux using the Divergence Theorem. The divergence of this vector field is simply the value 2K:

∂F ∂F 1 + 2 = K + K = 2K. (35) ∂x ∂y

Therefore, by the Divergence Theorem,

F · Nˆ ds = 2K dA = 2KA(D) = 2K · πR2, (36) IC ZZC in agreement with our earlier result. Note that because of the constancy of the divergence in

this case, the circle CR could be placed anywhere in the plane and the net outward flux would be the same. For a general simple closed curve C,

F · Nˆ ds = 2KA(D), (37) IC where A(D) denotes the area of the region D enclosed by C.

2. The vector field F = x2i + yj. Let C be the perimeter of the unit square in the first octant with vertices at (0, 0), (1, 0), (1, 1) and (0, 1). In this case

div F = 2x + 1, (38)

which is defined at all points in the plane. From the Divergence Theorem,

F · Nˆ ds = (1 + 2x) dA (39) IC ZZD = dA + 2 x dA ZZD ZZD 1 = 1+2 · 2 = 2.

x y 3. The vector field F = i + j, which has been examined a number of times in this x2 + y2 x2 + y2 course. It is, up to a constant, the electrostatic field due to an infinite wire that lies along the z-axis. You will recall (or can verify for yourself) that

div F = 0 for (x,y) 6= (0, 0). (40)

We may use the Divergence Theorem conclude that

F · Nˆ ds = 0 (41) IC

255 for any simple closed curve C that does not contain or enclose the origin (0, 0).

We cannot use the Divergence Theorem to determine the outward flux through curves C that contain the origin. They must be determined by explicit calculation. Actually, it is sufficient

only to compute the outward flux through a circle of radius R, CR, centered at the origin. We did this earlier, to find that F · Nˆ ds = 2π. (42) ICR With this knowledge, one can conclude that the total outward flux for any curve C enclosing the origin is 2π. We’ll return to this argument in a few lectures.

4. Some additional special cases: The vector fields

1 F = xi, F = yj, F = (xi + yj). (43) 2

In all of these cases, ∂F ∂F 1 + 2 = 1. (44) ∂x ∂y Therefore, by the Divergence Theorem,

F · Nˆ ds = dA = A(D), the area of D. (45) IC ZZD

In fact, there are many, many other vector fields F = F1i + F2j for which Eq. (44) is satisfied. Once again, can you find any, or perhaps a general family of such fields?

256 Extra reading: Interpretation of “Curl” and “Divergence”

The following material was not covered in the lectures, because of lack of time. You are strongly recommended to read this material in order to obtain a deeper understanding of the curl and divergence operations.

Interpretation of the two-dimensional curl via Green’s Theorem

We can use Green’s theorem to determine what the curl of a vector field actually measures – recall that we had some kind of intuitive picture that it measure the rotation of a vector field. Let F(x,y) be a vector field in the plane. We shall simply drop the z subscript in Eq. (31) of the previous lecture and write ∂F ∂F curl F(x,y)= 2 (x,y) − 1 (x,y). (46) ∂x ∂y In what follows we shall assume that the above partial derivatives, hence the curl of F are continuous over our region of interest D.

Now let (x0,y0) be a point in D and let CR be a circle of radius R << 1 centered at (x0,y0). Let

DR be the circular region contained in CR. By Green’s Theorem,

F · dr = curl F dA. (47) ICR ZZDR

By definition, if a function f(x,y) is continuous at (x0,y0), then

f(x,y) → f(x0,y0), as (x,y) → (x0,y0), (48) for any direction of approach. This means that if (x,y) is close to (x0,y0), then f(x,y) is close in value to f(x0,y0). For R very, very small,

f(x,y) ≈ f(x0,y0) for all points (x,y) ∈ DR. (49)

Let us now apply this result to f(x,y) = curl F. It means that

curl F(x,y) dA ≈ curl F(x0,y0) dA = curl F(x0,y0) A(DR), (50) ZZDR ZZDR

2 where A(DR) denotes the area of DR. (It is not important to write the area explicitly as πR .) Then from (47),

F · dr ≈ curl F(x0,y0) A(DR), (51) ICR

257 which may be rearranged to give

F · dr CR curl F(x0,y0) ≈ . (52) H A(DR)

In the limit R → 0, this approximation becomes exact, i.e.

F · dr CR curl F(x0,y0) = lim . (53) R→0 H A(DR)

In other words, the curl of the planar vector field F at a point (x0,y0) is the limit of its circulation per unit area as the area goes to zero. Therefore, we have established that the curl does measure the circulation of the field.

Interpretation of the two-dimensional divergence

We can use the Divergence Theorem to determine what the divergence of a vector field actually measures. You may recall that there was the idea of “net outward flow” of the vector field at a point. Let F(x,y) be a vector field in the plane. In what follows we shall assume that the divergence of F is continuous over a region of interest D.

Now let (x0,y0) be a point in D and let CR be a circle of radius R << 1 centered at (x0,y0). Let

DR be the circular region contained in CR. From the Divergence Theorem,

F · Nˆ ds = ∇~ · F dA. (54) ICR ZZDR Using the same argument as we did for Green’s Theorem and the curl of F, for R very, very small,

∇~ · F(x,y) ≈ ∇~ · F(x0,y0) for all points (x,y) ∈ DR. (55)

Applying this result to the Divergence Theorem,

∇~ · F(x,y) dA ≈ ∇~ · F(x0,y0) dA = ∇~ · F(x0,y0) A(DR), (56) ZZDR ZZDR

2 where A(DR) denotes the area of DR. (It is not important to write the area explicitly as πR .) Then from (54),

F · Nˆ ds ≈ ∇~ · F(x0,y0) A(DR), (57) ICR which may be rearranged to give

F · Nˆ ds CR ∇~ · F(x0,y0) ≈ . (58) H A(DR)

258 In the limit R → 0, this approximation becomes exact, i.e.

F · Nˆ ds CR ∇~ · F(x0,y0) = lim . (59) R→0 H A(DR)

In other words, the divergence of the planar vector field F at a point (x0,y0) is the limit of its net outward flux per unit area as the area goes to zero. Therefore, we have established that the divergence does measure the limiting net outward flow of the field at a point.

259 Lecture 34

Surface integrals in R3

We come to the final major section of the course. In what follows, we are interested in the integration of functions over surfaces in R3. Recall that a surface S ⊂ R3 is a two-dimensional set. As such, we would expect that the integration of a function over a surface would require two independent coordinates or parameters, as opposed to one parameter that is needed to integrate over a curve C. We’ll denote these coordinates as (u, v). The parametrization would then take the following general form: A point P on the surface S would have the coordinates

r(u, v) = (x(u, v),y(u, v), z(u, v)), (u, v) ∈ D ⊂ R2. (60)

Here, D is the set of parameter values (u, v) that are needed to define the surface S, i.e., to access all points P on S. We’ll illustrate this idea with some specific examples below.

As in the case of line integrals, there are two major types of integrations that can be performed over surface integrals.

1. Integration of scalar functions f(x, y, z) over S Suppose that a scalar-valued function f : R3 → R is defined at all points of a surface S. Now consider an infinitesimal element of surface dS centered at a point (x,y,z) ∈ S and form the product f(x,y,z)dS. Then sum up, i.e., integrate, over all elements dS to produce the ,

“ f dS ”. ZS

Examples:

1. If f(x,y,z) = 1, then S f dS = S dS is the area of S. R R 2. If f(x,y,z) is the (per unit area), then dq = f dS is the amount of charge in

260 element dS. total charge Q = dq = f dS ZS ZS If f is the mass density (per unit area) then dm = f dS, is the amount of charge in element dS,

total mass M = dm = f dS ZS ZS

.

In this very brief section, we shall consider only two types of surfaces, namely, planes and spherical surfaces. Along with cylindrical surfaces, these are the most commonly employed surfaces in Physics. (Planes are used to construct cubes.)

Spherical surfaces

A sphere SR of radius R can be defined in terms of the two angular spherical coordinates θ and φ. The radial variable r is fixed, with r = R. To generate the entire sphere, the parameter space D is given by D = {(θ, φ) | θ ∈ [0, 2π], φ ∈ [0,π]}. (61)

Recall that the infinitesimal element of volume dV in spherical coordinates is given by

dV = r2 sin φ dr dθ dφ. (62)

Since r is now fixed, the infinitesimal element of surface area on the sphere is given by

dS = R2 sin φ dr dθ dφ. (63)

To illustrate, let us compute the surface area of the sphere SR of radius R:

π 2π dS = R2 sin φ dθ dφ ZSR Z0 Z0 π 2π = R2 sin φ dθ dφ Z0 Z0 π 2π = R2 sin φ dφ dθ Z0 Z0  = R2 (2) (2π)

= 4πR2. (64)

261 The above calculation was a simple example of an integration of a scalar function over a surface: In this case, f = 1. We may easily extend this idea to integrate general functions of the angular variables θ and φ, i.e., f(θ, φ) dS. (65) ZSR For example, suppose that you wanted to compute the center of mass of a hemispherical and homo- geneous shell of radius R. It is, of course, advantageous to position this surface so that its center is (0, 0, 0) and its circular base sits on the xy-plane. In this case, our surface S is the upper hemisphere of the surface SR discussed above. And because it is assumed to be homogeneous, i.e., constant density, the center of mass is the same as the centroid of the surface. Due to the symmetry of the surface with respect to rotation about the z-axis, the centroid will be situated on the z-axis, i.e., at point (0, 0, z¯). The coordinatez ¯ will be given by z dS z¯ = S . (66) R S dS R 2 The denominator of this expression is trivially one-half the area of SR, i.e., 2πR . In order to compute the numerator, we shall have to convert the integrand z into spherical coordinates. Since z must lie on the surface, we have z = R cos φ, so that

1 z¯ = 2 R cos φ dS. (67) 2πR ZS

The computation of this integral is left as an exercise. The final result is

R z¯ = . (68) 2

(Just to remind you: in the case of a solid, homogeneous hemisphere, the z coordinate of the cen- 3 troid/center of mass was found to bez ¯ = R.) 8

Because of time limitations, this is all that we can discuss about the integration of scalar-valued functions on surfaces. That being said, it should be sufficient for your needs. The above discussion gives a good idea of how to integrate functions on spherical surfaces. And the integration of scalar-valued functions on planar surfaces is rather straightforward – after all, they are simply double integrals.

We now move on to the very important idea of surface integrals involving vector fields.

262 2. Integration of vector-valued functions F(x, y, z) over surfaces: “ integrals”

This is the major topic of the remainder of the course.

At each infinitesimal surface element dS centered at a point P on S, compute F · Nˆ where Nˆ is the outward unit normal to S, i.e., it is perpendicular to the tangent plane to S at P . Now integrate over all elements dS comprising the surface S: The result is

“ F · Nˆ dS ”, ZS

the total outward flux of F through S.

In what follows, we shall develop a method to perform integrations over some simple surfaces by using rather straightforward parametrizations of surfaces, much as we did for integrations over curves. By “simple surfaces”, we mean planes and spheres, which are easily parametrized. But we first need to understand the concept of “flux”.

A closer examination of the idea of “flux” in terms of fluid flow

It is perhaps easiest to visualize the idea of flux with reference to fluid flow. First, consider a region D that lies in the xy-plane as sketched below. Suppose that a fluid is passing through this region. For the moment, we assume that motion of the fluid is perpendicular to region D, travelling in the direction of the positive z-axis. Moreover, we assume that the speed of the fluid particles crossing D is constant throughout the region. As such, we are assuming that the velocity field of the fluid is given by v = vk, v> 0 (constant) . (69)

z

F = vk

y D x

263 We first ask the question: How much fluid flows through region D during a time interval ∆t? Consider a tiny rectangular element of area ∆A =∆x∆y centered at a point (x,y) in D. After a time ∆t, the fluid particles originally situated in this element will have moved a distance v∆t upward. The volume of fluid that has passed through this element ∆A on D is the volume of the box of base area ∆A and height v∆t: v∆t∆A. (70)

This box is sketched below.

z

F = vk

y v∆t D x

∆A

The total volume ∆V of fluid that has passed through region D over the time interval ∆t is obtained by summing up over all area elements ∆A in D. We let ∆A → dA and integrate over D to obtain ∆V = v∆t dA = v∆tA(D), (71) ZZD where A(D) denotes the area of D. Of course, this is a rather trivial result: the volume of fluid passing through D is simply the volume of the solid of base area A(D) and height v∆t. Dividing both sides by ∆t, we have ∆V = vA(D). (72) ∆t In the limit ∆t → 0, we have the instantaneous rate of volume of fluid passing through region D per unit time, or simply the rate of fluid flow through region D:

′ V (t)= vA(D). (73)

It is useful to express this result in terms of the original vector field v = vk. The result is quite simple because the vector v points in the same direction as the unit normal vector Nˆ = k of the region D, i.e., v = v · k = v · Nˆ . (74)

264 As such, we can express Eq. (73) in the form

′ V (t)= v · Nˆ dA. (75) ZZD This quantity is the total flux of the vector field v through region D.

Now suppose that the fluid is now moving at a constant speed v through region D but not necessarily at right angles to it, i.e., not necessarily parallel to its normal vector k. We shall suppose that

v = v1i + v2j + v3k, k v k= v (76) and let γ denote the angle between v and the normal vector k. In this case, the fluid particles that pass through the tiny element ∆A after a time interval ∆t form a parallelopiped of base area ∆A and height v cos γ∆t, as sketched below.

z

F

γ y v cos γ x

∆A

The volume of this box is

v cos γ∆t∆A = v · k∆t∆A = v3∆t∆A. (77)

(Think of this tower of fluid as a deck of playing cards that has been somewhat sheared. When you slide the cards back to form a rectangular arrangement, the height of the deck is v∆t cos γ.) In other words, only the vertical component v3k of the velocity contributes to the flow across the region D. The total volume ∆V of fluid that has passed through region D over the time interval ∆t is obtained once again by letting ∆A → dA and integrating over D:

∆V = v3∆t dA = v3∆tA(D), (78) ZZD Dividing both sides by ∆t, we have ∆V = v A(D). (79) ∆t 3

265 In the limit ∆t → 0, we obtain the flux of the vector field v through region D:

′ V (t)= v3A(D). (80)

But recall that v3 = v·k = Nˆ , where Nˆ once again denotes the unit normal vector to D in the positive z-direction. We shall rewrite this flux as follows,

′ V (t)= v · Nˆ A(D)= v · Nˆ dA. (81) ZZD

Note that this general case includes the first case, where γ = 0, implying that v1 = v2 = 0 and v3 = v.

Note also that in the case γ = π/2, i.e., v3 = 0, there is no flow through the region D, so the flux is zero.

A slight generalization of the above – nonconstant velocity field: Of course, the above results have been rather trivially obtained since (i) the vector fields are constant and (ii) the region D is flat. Let us now generalize the first case, i.e., the vector field v is assumed to be nonconstant over the planar region D ⊂ R2, i.e.,

v(x,y)= v1(x,y)i + v2(x,y)j + v3(x,y)k. (82)

Once again, the unit normal vector in the positive z-direction is Nˆ = k. In this case, the total volume ∆V of fluid that has passed through region D over the time interval ∆t is obtained by summing up over all area elements ∆A in D:

∆V =∆t v(x,y) · Nˆ dA =∆t v3(x,y) dA. (83) ZZD ZZD Dividing by ∆t and taking the limit ∆t → 0, we obtain

′ V (t)= v(x,y) · Nˆ dA, (84) ZZD which is once again the total flux of the (nonconstant) vector field v(x,y) through region D. Note that the previous two results, Eqs. (75) and (81) are special cases of Eq. (84).

Now suppose that we were concerned with rate of mass flow through region D. The amounts/volumes of fluid examined earlier would be replaced by amounts of mass flowing through a surface element. This means replacing the velocity vector field v by the momentum field F = ρ v, where ρ is the mass density. The rate of transport of mass through region D would then be given by

′ M (t)= F(x,y) · Nˆ dA = ρ(x,y) v(x,y) · Nˆ dA (85) ZZD ZZD

266 This concludes our discussion of this simple problem involving fluid flow through a flat surface.

Generalization to arbitrary surfaces

We now wish to generalize the above result to general surfaces in R3. In other words, we do not require the surface to be flat, as was region D in the plane, but rather a general surface S in R3 – for example, a portion of a sphere, or perhaps the entire sphere. In the “spirit of calculus,” we divide the surface S into tiny infinitesimal pieces dS. We then construct a normal vector Nˆ to each surface element dS at a point in dS, as sketched below.

We then form the dot product of the vector field F at that point with the normal vector Nˆ . This will represent the local flux of F through the surface element dS. To obtain the total flux through the surface S, we add up the fluxes of all elements dS – an integration over S that is denoted as

F · Nˆ dS. (86) ZS This is the total “flux” of F through surface S. If F = v the velocity vector field of a fluid moving in R3, then the total flux would be the (instantaneous) rate of volume of fluid per unit time passing through surface S.

Note that in some books, especially Physics books, the vector surface integral is denoted as

F · dS. (87) ZZS Here, the infinitesimal surface area element is a vector that is defined as

dS = Nˆ dS, (88) where dS is the infinitesimal surface element and Nˆ is the unit normal vector to the surface element.

267 In other books, the infinitesimal surface element is denoted as dA = Nˆ dS, so that the flux integral is denoted as F · dA. (89) ZZS We now compute a very important flux integral – the outward flux of a point charge – that will provide the basis for many other important results to follow.

An important flux integral that can be computed in a rather simple manner:

We consider a stationary charge Q situated at the origin (0, 0, 0) of a coordinate system. Also consider an arbitrary point P with coordinates (x,y,z) and position vector r = xi + yj + zk. As you well know, the electrostatic field vector E(r) at P due to the presence of Q is given by

Q E(r)= 3 r, r = krk. (90) 4πǫ0r The situation is pictured below.

If Q> 0, then the vector field E points outward; If Q< 0, then it points inward. In the above sketch, without loss of generality, we consider the case Q> 0.

We now wish to compute the total outward flux of E through the spherical surface SR of radius R> 0, i.e., the surface integral E · Nˆ dS, (91) ZZSR where Nˆ denotes the unit outward normal vector to SR at a point. The vector field E and sphere SR are sketched below. It is necessary to compute the integrand E · Nˆ in the above surface integral. At each point P on

SR, we have r = krk = R, so that the field E(r) is given by

Q E(r)= 3 r. (92) 4πǫ0R

268 And at point P , the outward unit normal Nˆ is given by

r r Nˆ = ˆr = . (93) r R

Therefore, at point P , the integrand of the surface integral becomes

ˆ Q 1 r E · N = 3 r · 4πǫ0 R R Q 1 2 = 4 · R 4πǫ0 R Q = 2 . 4πǫ0R

This is the “flux” through the infinitesimal element dS at P . Note that it is a constant over the sphere

SR. To obtain the total flux over S, we must integrate over the entire surface SR.

ˆ Q E · N dS = 2 dS ZZSR ZZSR 4πǫ0R Q = 2 dS 4πǫ0R ZZSR

2 surface area of SR=4πR | {z } Q 2 = 2 · 4πR 4πǫ0R Q = . ǫ0

2 (The fact that the surface area of SR is 4πR was established in the previous lecture by integration using spherical polar coordinates.) Of course, this result is no suprise to you – you have seen it in your Electricity and Magnetism course. It’s Gauss’ Law – the total flux of the electric field through a surface is equal to the amount of charge Q contained inside the surface. But the point is that you have been simply told this

269 result in your E&M course - it is the goal of this course to derive this important result. For the moment, the above result is all that we can assume in this course. The above result is somewhat general, since the outward flux is INDEPENDENT of the radius R of the sphere SR. But this is still a far cry from stating that Gauss’ Law holds for arbitrary surfaces. Beofre considering another example, we’ll state that the above result – as limited as it may seem 1 1 – is due to the fact that the electric field vector is given by r and not r, where a is some small r3 r3+a (or even large!) nonzero number.

Exercise: Compute the total flux of the electric field vector through a sphere of radius SR in the case that the field is given by Q E(r)= 3+a r. (94) 4πǫ0krk

270 Lecture 35

Surface integrals in R3 (cont’d)

“Surface flux integrals” of vector fields (cont’d)

OK, so we showed Gauss’ Law for spheres in the previous lecture. Before going to the general case, let’s check if it applies to another class of “easy” surfaces that we can integrate, i.e., cubes. Consider the following construction. We shall put six planes together to form a cubic surface with unit side lengths and centered at (0, 0, 0).

Once again, we wish to compute the total flux E · Nˆ dS for the vector field ZZS K Q E(r)= 3 r, K = . (95) r 4πǫ0

We begin with the top surface, which we shall call S1:

1 1 1 Surface S1 is comprised of the points (x,y, 2 ), − 2 ≤ y ≤ 2 . At each of these points, the electro- static field vector due to point charge Q at (0, 0, 0) is (up to constant K)

K 1 E(r)= (xi + yj + k) (96) 2 2 1 2 3/2 (x + y + ( 2 ) ) 2

It should be clear that the normal vectors Nˆ to this surface are the unit vectors ±k. We choose the unit outward normal Nˆ = k.

271 The integrand in the surface vector integral will therefore be

K 1 E · Nˆ = (x,y, 1/2) · (0, 0, 1) 2 2 1 3/2 2 (x + y + 4 ) K 1 = . (97) 2 2 1 3/2 2 (x + y + 4 )

To obtain the total outward flux through S1, we integrate over S1:

1 1 ˆ K 2 2 1 E · N dS = 1 dx dy ZZ 2 Z− 1 Z− 1 (x2 + y2 + )3/2 S1 2 2 4 . = . (use trig substitution) K 4 = π 2 3  2 = Kπ. 3 Q Recall that K = , we have the final result that 4πǫ0 Q 2 Q E · Nˆ dS = · π = . (98) ZZS1 4πǫ0 3 6ǫ0

The contributions from each of the other five surfaces S2 · · · S6 will be identical to this result by symmetry. The final result is that the total flux of the vector field through the cubic surface will be

Q Q E · Nˆ dS = 6 · = , (99) ZZS 6ǫ0 ǫ0 which agrees with Gauss’ Law.

That was indeed a good deal of work, and still for a not-so-complicated surface. In order to obtain Gauss’ Law for arbitrary surfaces, we’ll have to make use of another powerful result attributed to – guess who? – Gauss.

Gauss Divergence Theorem in R3

In this section, we are concerned with the outward flux of a vector field (through a smooth/piece-wise smooth) surface S that encloses a region V ⊂ R3. Typically, in physics such surfaces are spheres, boxes, parallelpipeds or cylinders. This is the subject of the celebrated Gauss Divergence Theorem, the three-dimensional version of the Divergence Theorem in the Plane of a previous lecture.

272 The Gauss Divergence Theorem is one of the most important results of vector calculus. It is not as important for computational purposes as for conceptual developments. It provides the basis for the important equations in electromagnetism (Maxwell’s equations), fluid mechanics (continuity equation) and continuum mechanics in general (heat equation, diffusion equation). It is sufficient to consider a somewhat simplified version of the general Divergence Theorem.

A simplified version of the Divergence Theorem:

Let S be a “nice” (i.e., piecewise smooth) closed and nonintersecting surface that encloses a region D ⊂ R3, such that an outward unit normal vector Nˆ exists at all points on S. Also assume that a vector field F and its derivatives are defined over region D and its boundary S.

The Divergence Theorem states that:

F · Nˆ dS = div F dV . (100) ZZS ZZZD surface integral volume integral Once again, we have assumed that| div F{z exists} at| all points{z in V . }

You have already seen a version of this theorem – the two-dimensional Divergence Theorem in the plane. It expressed the total outward flux of a 2D vector field F through a closed curve C in the plane as an integral of the divergence of F over the region D enclosed by C:

F · Nˆ ds = div F dA. (101) IC ZZD

Examples: In what follows, unless otherwise indicated, the surface S is an arbitrary surface in R3 satisfying the conditions of the Divergence Theorem.

1. The vector field F = k = (0, 0, 1). This vector field could be viewed as the velocity field of a fluid that is travelling with constant speed in the positive z-direction:

The divergence of this vector field is zero:

∂ ∂ ∂ div F = (0) + (0) + (1) = 0. (102) ∂x ∂y ∂z

273 y

z

x

More importantly, it exists at all points in R3, i.e., there are no singularities, so that we may employ the Divergence Theorem. Therefore, for any surface S enclosing a region D, we have

F · Nˆ dS = div F dV = 0 dV = 0. (103) ZZS ZZZD ZZZD In other words, the total outward flux of F over the surface S is zero. In terms of the fluid analogy, fluid is entering the region through surface S from the bottom at the same rate that it is leaving it at the top. There is no creation of extra fluid anywhere inside region D that would cause a nonzero flux.

2. The vector field F = zk = (0, 0, z). A sketch of the vector field is given below.

y

z

x

This field could be viewed as the velocity field of a liquid that originates from the xy-plane and travels upward and downward away from it. As it moves away, it accelerates, since the velocity is proportional to the distance from the xy-plane.

The divergence of this field is ∂ ∂ ∂ div F = (0) + (0) + (z) = 1. (104) ∂x ∂y ∂z Once again, the divergence exists at all points in R3. Therefore, by the Divergence Theorem

F · Nˆ dS = div F dV = 1 dV = V (D), (105) ZZSR ZZZD ZZZD

274 the volume of region D.

Note that the same result for the flux, i.e., Eq. (105), would be obtained for the following vector fields: (i) F = xi, (ii) F = yj, (106)

since the divergence of each of these vector fields is 1. And the list does not stop here. Consider the set of all vector fields of the form

F = c1xi + c2yj + c3zk, where c1 + c2 + c3 = 1. (107)

In all cases, we have div F = 1, so that the total outward flux of each of these fields through the surface S is V (D), the volume of region D.

3. The vector field F = z2k = (0, 0, z2). Here, all arrows of F point upward, as sketched below.

y

z

x

This could be visualized as fluid that emanates from the xy-plane to travel upward, accelerating as it moves away from the plane, along with fluid that approaches the xy-plane from below, decelerating as it gets closer.

The divergence of F is ∂ ∂ ∂ div F = (0) + (0) + (z2) = 2z (108) ∂x ∂y ∂z Therefore, by the Divergence Theorem

F · Nˆ dS = div F dV = 2 z dV. (109) ZZS ZZZD ZZZD

The value of this integral will depend on the region D. In principle, if we knew the region, we could integrate over it, using the techniques for integration in R3 developed earlier in the course.

275 There is one interesting point regarding this integral: It is related to the z coordinate of the centroid of region D. Recall that

z dV z dV z¯ = D . = D , (110) RRR RRR D dV V (D) RRR implying that z dV = V (D)¯z. (111) ZZZD Therefore, Eq. (109) becomes F · Nˆ dS = 2¯zV (D). (112) ZZS Note that if the surface S is located in the upper half-plane, i.e., z > 0, thenz ¯ > 0, implying that the total outward flux is positive. However, if the surface S is located in the lower half-plane, i.e., z < 0, the total outward flux is negative. Why is this so? And why would the total outward flux be directly proportional to the volume V (D) of the region D enclosed by the surface S?

The Divergence Theorem and Point Charges K We now return to the class of vector fields having the form E = r. In particular, we focus on the r3 field Q E(r)= 3 r, (113) 4πǫ0r which is the electrostatic field at r due to the presence of a point charge Q at the origin. Recall that for this class of vector fields

div E(r) = 0, for all (x,y,z) ∈ R, (x,y,z) 6= (0, 0, 0). (114)

The divergence is undefined at the point where the point charge Q is situated. From these facts we can conclude from the Divergence Theorem that

E · Nˆ dS = 0 (115) ZZS for any surface S that does not contain or enclose the point charge Q that it situated at the origin (0, 0, 0). As you well know, this result is consistent with Gauss’ Law from your Electricity and Magnetism course.

276 Note, however, that we cannot use the Divergence Theorem to make any conclusions about the total flux of E through a surface S that encloses the point charge Q. This is because div E does not exist at the location of the charge, which violates the assumptions of the Divergence Theorem.

Now recall that we did compute the total flux of E for a special class of surfaces that enclosed the charge, namely the spherical surfaces SR centered at the origin with radius R. We found that

Q E · Nˆ dS = , (116) ZZSR ǫ0 independent of the radius R. We also found this to be the result for a unit cube centered at the origin. Let’s now qualify that there is nothing special about having the charge Q at the origin. The above result applies to any sphere SR with radius R that is centered at the point where charge Q is located.

Gauss’ Law for arbitrary surfaces

The question now remains, “What is the total flux of E through an arbitrary surface S that encloses point charge Q?”. The situation is sketched in the figure below on the left. We suspect that the Q answer is – in fact, this is what you’ve been told in your Electricity and Magnetism course - but ǫ0 we must somehow derive this result mathematically! In order to do so, we shall have to extend our earlier statement of the Divergence Theorem and then use a very clever trick.

In what follows, we shall adopt a convenient mathematical shorthand notation: We shall denote the boundary of a region D ⊂ R3, as ∂D. In the situations we have encountered so far, the boundary of the region has been a single surface S, for which we write

∂D = S.

We shall extend this notion very shortly.

First, let us construct a surface SR centered at Q with radius R > 0 but sufficiently small so ′ that SR lies inside surface S, as pictured below on the right. Now let D denote the region that lies ′ inside surface S and outside surface SR, including points from both surfaces. Region D is a kind of three-dimensional “donut” - it has an inner hole. More importantly, its boundary is composed of two

277 Nˆ Nˆ 1 ′ Region D Region D

Nˆ 2

Q Q

SR

Arbitrary surface S enclosing Q Arbitrary surface S enclosing Q ′ ∂V = S ∂V = S ∪ SR

surfaces: ′ ∂D = S ∪ SR. (117)

Note that region D′ does not contain the troublesome point charge Q. It follows that

′ div E(x,y,z) = 0, for all x,y,z ∈ D , (118) which will be a nice fact to be used below.

We now state a slightly generalized version of the earlier Divergence Theorem:

Let R ⊂ R3 be a region (or a “domain”, as the textbook calls it) with smooth boundary ∂R.

The boundary ∂R may be composed of several surfaces Si, 1 ≤ i ≤ M. Let Nˆ denote the outer unit normal, defined for all points on ∂R. Also assume that F(r) is a vector field for which div F(r) is defined at all points r ∈ R. Then

M F · Nˆ dS = F · Nˆ dS = div F dV. (119) ZZ ZZ ZZZ S Xi=1 Si R

The above result allows us to employ the Divergence Theorem to the vector field E over region ′ ′ D , where div E = 0, noting that the boundary of D is the union of both S and SR:

E · Nˆ dS = div E dV = 0. (120) ZZ∂D′ ZZZD′ But we must be careful in defining the total outward flux of E from region D′: It is the sum of

278 1. the total flux of E through the outer surface S pointing outward from D′, in the direction of the

normal vectors Nˆ 1 shown in the above figure and

′ 2. the total flux of E through the inner surface SR pointing outward from D , hence toward the

point charge Q, in the direction of the normal vectors Nˆ 2 shown in the above figure.

From the above, and from Eqs. (119) and (120),

E · Nˆ dS = E · Nˆ 1 dS + E · Nˆ 2 dS = 0. (121) ′ ZZ∂D ZZS ZZSR

In all of these integrals, the unit normals Nˆ 1 and Nˆ 2 on surfaces S and SR, respectively point outward from region D′. But we know what the second integral on the RHS of the above equation is:

Q E · Nˆ 2 dS = − . (122) ZZSR ǫ0

This is because the unit normal vector Nˆ 2 points in a direction opposite to that of the unit outward normal vector to the spherical region DR which contains Q. Therefore, from Eq. (121), we have

Q E · Nˆ 1 dS − = 0, (123) ZZS ǫ0 implying that Q E · Nˆ 1 dS = . (124) ZZS ǫ0

This is our desired result since Nˆ 1, the “normal” unit outward normal to S! This is true for an arbitrary surface S enclosing (but not containing) the point charge Q. No matter how close Q may be to S, we may always find an R > 0 sufficiently small so that the surface SR lies inside of S. We have finally proved Gauss’ Law! And we have used the Divergence Theorem to do so!

279 Lecture 36

Gauss Divergence Theorem in R3 (cont’d)

Extension to many point charges

The procedure of the previous lecture can be extended to handle the case where a surface S encloses 3 n point charges Qk, k = 1, 2, · · · n located at points rk. The electrostatic field E(r) at any point in R due to these n charges is given by

n 1 Qk E(r)= 3 [r − rk]. (125) 4πǫ0 k r − rk k Xk=1 Also note that

div E(r) = 0, except at r = rk, k = 1, 2, · · · , n, (126) where it is undefined.

We now place tiny spherical surfaces SRk around each charge Qk, where the radii Rk are sufficiently small so that they do not intersect with each other or with the outer surface S. Now define region

V as the region enclosed by surface S but not including the interiors of the surfaces SRk , as shown below.

Qn

Region V

SR1 Arbitrary surface S enclosing charges Qk Q1

SRn

Q4

Q2

Q3

Note that the boundary of V is comprised not only of S but also of all the SRk :

∂V = S ∪ SR1 ∪···∪ SRn . (127)

From the (Generalized) Divergence Theorem,

E · Nˆ dS = 0. (128) ZZZ∂V

280 But this outward flux is the sum of the outward fluxes from region V through surface S and the surfaces SRk . For the same reason as before, this total outward flux becomes

n E · Nˆ dS − E · Nˆ dS = 0. (129) SRk ZZS ZZS Xk=1 Rk where Nˆ denotes the unit outward normal through surface S that points away from the charge SRk Rk

Qk it encloses. The total flux through each of these tiny spherical surfaces due to the charge Qk they Q enclose is known – it’s simply k . Thus ǫ0

n Q E · Nˆ dS − k = 0, (130) ZZ ǫ0 S Xk=1 or n Q Q E · Nˆ dS = k = , (131) ZZ ǫ0 ǫ0 S Xk=1 where n Q = Qk (132) Xk=1 is the total charge enclosed by surface S. This is Gauss’ Law for electrostatic charges.

Note that any charges outside surface S would not contribute to this flux: the divergence of the electostatic field due to these charges vanishes at all points inside surface S.

Extension to continuous distribution of charge

In the previous lecture, we proved Gauss law for the case of a single charge Q situated at the origin

(it didn’t have to be), followed by the case for a finite number of charges Qi situated at positions ri. There is a final and important extension of the above result – the case of a continuous distribution of charges over a region as defined by a charge density function ρ(r). There are no longer any point charges – all charge has been “smeared out” into a continuous distribution. Suppose that a surface S encloses a region D over which there is defined such a continuous charge density function ρ(r). Then at each point r′ = (x′,y′, z′) in D, there is an infinitesimal element dV that contains an infinitesimal element of charge

′ dq = ρ(r )dV. (133)

281 This element of charge at r′ will contribute to a total electrostatic field vector E(r) according to Coulomb’s law. We can now “add up” or integrate over the contributions of all such charge elements dq over the region to produce the field vector E(r). (Such an integration procedure to compute total electrostatic or gravitational potentials was described in an Appendix in an earlier lecture. The extension to computation of the field vector is fairly straightforward.) We can also consider each element of charge dq as a infinitesimal point charge that contributes to the total outward flux of the electric field vector. Summing over all charges yields the result,

Q E · Nˆ dS = , (134) ZZS ǫ0 where Q = ρ(r) dV (135) ZD is the total charge contained in region D enclosed by surface S. This is the integral form of Gauss’ Law.

Consequence of Gauss’ Law for a continuous charge distribution – Maxwell’s equation

Let us now carry the above results one step further. We now assume that we may apply the Divergence Theorem to the outward flux integral since the electrostatic field vector E is produced by a continuous distribution of charge and not an ensemble of point charges (in which case the charge densities would be infinite at the location of the charges). Thus

E · Nˆ dS = ∇ · E dV. (136) ZZS ZZZD From Gauss’ Law above, we then have

1 ∇ · E dV = ρ dV, (137) ZZZD ǫ0 ZZZV which we shall now rewrite as

1 ∇ · E(r) − ρ(r) dV = 0. (138) ZZZD  ǫ0  Of course, just because the integral of a function is zero, it does not mean that the function itself is zero. BUT, we can make use of two additional points here: 1 1. We are going to assume that the integrand, i.e., the function ∇ · E(r) − ρ(r), is continuous for ǫ0 all r in D.

282 2. The result in (138) is valid for all smooth surfaces S and corresponding enclosed regions D. In other words, for any surface S, the electrostatic field vector E produced by the charge distribution enclosed by S must satisfy this relation.

If these two conditions are satisfied, then we may conclude, using the “duBois - Reymond Lemma” – see below, that the integrand in (138) is zero at all points r, i.e.,

1 ∇ · E(r)= ρ(r). (139) ǫ0

This is known as the differential form of Gauss’ Law. In some books, it is called Maxwell’s first equation for electrostatics.

The “du Bois - Reymond Lemma:” Before we go on with this fundamental equation, let us return to the conclusion made regarding the integrand of (138). The justification of this conclusion is called the “du Bois - Reymond lemma”. A simple one-dimensional version might help:

Suppose we are given that f(x) is continuous on [a, b] and that

b f(x) dx = 0. (140) Za

Of course, we can not conclude that f(x) = 0 on [a, b]. But if we are given that

d f(x) dx = 0 for all c, d such that a ≤ c < d ≤ b, (141) Zc

then we may prove that f(x) = 0 identically on [a, b]. This is a one-dimensional version of the duBois-Reymond lemma.

The proof of this lemma is rather straightforward. In a nutshell, assume that f satisfies

the above conditions and that there is a point x0 ∈ [a, b] such that f(x0) 6= 0. Without

loss of generality, assume that f(x0) > 0. Since f is assumed to be continuous (first

assumption), there must be a δ > 0 defining an interval I = [x0 − δ, x0 + δ] over which f d is positive. This implies that for any interval [c, d] ⊂ I, c f(x) dx > 0, contradicting the R second assumption. Therefore, no such x0 can exist.

283 Now back to the Maxwell equation. Notice that where there are no charges, there is no divergence of E, i.e.,

If ρ(r) = 0, then ∇ · E(r) = 0.

In many problems in electricity and magnetism, one is required to find the electrostatic field vector E(r) that corresponds to a given charge distribution. Often it is more convenient to solve the problem using the potential function V associated with E, where E(r)= −∇V (r). Then the Maxwell equation becomes 1 ∇ · E(r)= ∇ · (−∇V (r)) = ρ(r), (142) ǫ0 or 1 ∇2V (r)= − ρ(r), (143) ǫ0 which is known as Poisson’s equation. Note that the left-hand side of this equation involves the Laplacian operator introduced earlier in the course. In the absence of charge, i.e., ρ(r) = 0 for r in some region D, then Poisson’s equation becomes Laplace’s equation

∇2V (r) = 0. (144)

Because of its importance in physics and engineering, a great deal of effort was spent by math- ematicians over the past three centuries on these equations, including how to solve them and the properties of solutions. You will encounter these equations in your future courses on electricity and magnetism as well as fluid mechanics.

END OF COURSE

284 Appendix 1: Electrostatic field vector for a homogeneous spherical charge distribution

The following example was not discussed in the lecture but is provided below for the interested reader. Here is a quite simple example to illustrate the meaning of the above equation. Consider a solid sphere of radius R with a constant charge density ρ0. This, of course, implies that the total charge 4 on the sphere is Q = πR3ρ . Let us determine the electrostatic field vector E(r) produced by this 3 0 charge distribution.

1. Case 1: For k r k> R, the charged sphere may be considered as a point charge of Q situated at the center of the sphere, which we shall assume to be the origin of our coordinate system. This conclusion follows from the results of Problem Set No. 9, where you determined the gravitational field produced by a spherically symmetric earth. Thus, 3 Q ρ0R E(r)= 3 r = 3 r. (145) 4πǫ0r 3ǫ0r In this case, we know the divergence of the vector field, having computed it many times during this course: ∇ · E(r) = 0, (146)

which is consistent with the Maxwell equation, since there is no charge for r > R.

2. Case 2: For k r k≤ R. We may determine E(r) in the same way that we determined the gravitational force F(r) at a point P inside the earth. In that case, the nonzero contribution to the force comes from all points that lie inside the spherical surface that passes through P – in other words, all points inside a sphere of radius r.

The same holds for the electrostatic vector – it will be given by

Qr E(r)= 3 r, (147) 4πǫ0r 4 where Q = πr3 is the amount of charge contained in a sphere of radius r. Thus we arrive at r 3 the result, ρ E(r)= 0 r. (148) 3ǫ0 Note that k E(r) k grows linearly as we move from the center of the sphere until we reach the outer surface at r = R.

285 The divergence of this vector field is easily computed to be (since ∇r = 3)

ρ ∇ · E(r)= 0 , (149) ǫ0

which is consistent with the Maxwell equation, since we stipulated that the charge density in

the sphere was ρ0.

Note that the electrostatic field vector E(r) is continuous at r = R. Finally, we could have solved this problem by solving for the potential function V (r). This method of solution will be added as an Appendix to this lecture.

286 Appendix 2: Another consequence of the Divergence Theorem – The “Continuity Equation”

This material was also not covered in class but provided for the interested reader. You will encounter these ideas in a future course in Continuum Mechanics. We now proceed to derive an important equation that has applications in theoretical physics and applied mathematics, including fluid mechanics. Let us consider the case of fluid flow. Let v(x,y,z,t) = v(r,t) represent the velocity field of a fluid moving in R3. (We acknowledge that the field – in particular, the components of v – can change in time.) And let ρ(r,t) be a scalar field representing the mass density at a point r and time t. Then the vector field F(r,t)= ρ(r,t)v(r,t), (150) which is the momentum field of the fluid, describes the rate of mass transfer, or “transport”, at a point r at time t. The rate of mass transfer is k F(r,t) k and the direction of flow is v(r,t). Now consider a fixed surface S that encloses a bounded region D in R3. (In other words, neither the surface S nor the region D change in time.) At a given time t, the total amount of mass in region D is given by M(t)= ρ(r,t) dV, (151) ZZZD where the integration is performed over the variables r ∈ D. The instantaneous rate of change of mass is given by dM d ∂ρ = ρ(r,t) dV = (r,t) dV. (152) dt dt ZZZD ZZZD ∂t We were able to take the partial into the integral since the region D is presumed to be fixed, hence independent of time.

Note: If you are worried about the above result, i.e., taking the derivative operator inside the integral, consider the former definition of the derivative,

′ M(t + h) − M(t) M (t) = lim , (153) h→0 h and apply it to (151). You will obtain (152).

Since we assume that matter is neither created nor destroyed in region D, the rate of change of mass in D is determined only by the rate of entry/escape through the boundary surface S. By

287 definition, the total outward flux of F, given by

F · Nˆ dS, (154) ZZS where Nˆ is the unit outward normal to S, measures the outward flux of F through surface S, hence the rate of escape of mass through S. By conservation of mass, it follows that

dM = − F · Nˆ dS, (155) dt ZZS or ∂ρ (r,t) dV = − F · Nˆ dS. (156) ZZZS ∂t ZZS We now assume that the Divergence Theorem can apply to the right-hand side, (i.e., div F exists at all points in D) so that the above equation becomes

∂ρ (r,t) dV = − div F(r,t) dV. (157) ZZZS ∂t ZZZD We now rewrite this equation as follows, also substituting F = ρv,

∂ρ (r,t) + div [ρ(r,t)v(r,t)] dV = 0. (158) ZZZD  ∂t  Since this result is assumed to apply to arbitrary surfaces S with enclosed regions D, we once again invoke the duBois-Reymond lemma to conclude that

∂ρ (r,t) + div [ρ(r,t)v(r,t)] = 0, (159) ∂t or in more simple form ∂ρ + ∇ · (ρv) = 0. (160) ∂t This important equation is known as the Continuity Equation. It is a conservation relation that represents the first step in the analysis of fluid mechanics, continuum mechanics and field theory. If ρ is constant, then the continuity equation implies that

∇ · v = 0, (161) i.e., v is incompressible.

The conservation approach with which the continuity equation was derived can also be used for a number of other physical phenomena including electric currents and heat transfer. For example,

288 regarding electric current, we interpret the vector field ρv as the current density of charge transfer – the rate of transfer of charge. The scalar ρ represents charge density and v the velocity of the charge. It is customary to let J = ρv denote the charge density field so that the continuity equation for charge transfer becomes ∂ρ + ∇ · J = 0. (162) ∂t

And finally, we mention that one can derive the heat equation

∂T σρ = k∇2T, (163) ∂t where T (r,t) denotes the temperature of a solid object at point r at time t, k is the thermal conduc- tivity, σ the specific heat and ρ the mass density.

289 Appendix 3: Appendix 2 revisited – solving Poisson’s equation for spherical charge distribution

We now return to the problem studied earlier of a sphere of radius R with constant charge density ρ0. The problem was to find the electrostatic field vector E(r) produced by this charge distribution. We now show how one can solve for the potential V (r) and then use this result to produce E using the relation E = −∇V . First of all, the physical situation is spherically symmetric – the charged body is a sphere and the charge density function is constant, hence spherically symmetric. Thus we expect E and V to be spherically symmetric as well. So we shall assume that the potential function V is a function only of the radial coordinate r, i.e., V = V (r). And, of course, it is convenient to express the Laplacian in spherical polar coordinates. For the case of the function V (r) which is a function only of r, d2V 2 dV ∇2V (r)= + . (164) dr2 r dr You will note that we have changed the partial derivatives to ordinary derivatives w.r.t. r since V is a function only of r. Poisson’s equation then becomes d2V 2 dV 1 ∇2V (r)= + = ρ(r). (165) dr2 r dr ǫ 1. Case 1: r > R. For the same reasons as in our derivation in the main text, we may treat the charged body as a point charge Q concentrated at the origin. Technically, we need to solve Laplace’s equation here, i.e., ∇2V (r) = 0, (166)

since ρ(r)=0 for r> 0. But we already know the solution – the potential will have the general form Q V (r)= + C, (167) 4πǫ0r where we include the arbitrary constant. The convention is to set C = 0 so that the potential V (r) → 0 as r → ∞. The constant is actually irrelevant for the problem at hand – we wanted to find the electrostatic field E, which will be given by Q E(r)= −∇V (r)= 3 r. (168) 4πǫ0r 4 (We’ve done this calculation many times.) Since Q = πR3, we may also write E as 3 3 ρ0R E(r)= 3 r, (169) 3ǫ0r

290 in agreement with the result obtained in the main section. After having rewritten Q in this way, the potential function becomes ρ R3 V (r)= 0 . (170) 3ǫ0r

2. Case 2: 0 ≤ r ≤ R. We must solve Poisson’s equation for the charge density in the sphere, i.e.,

d2V 2 dV ρ ∇2V (r)= + = 0 . (171) dr2 r dr ǫ

This is a second order linear differential equation in V (r) with nonconstant coefficients, normally the subject of a third-year course on differential equations or mathematical methods in physics. Apart from seeing whether such an equation can be written in terms of one of the standard second order linear DEs (e.g. Bessel’s DE, Laguerre DE, Hermite DE, etc.), one can try assuming a power for the solution V (r). With an eye to the “answer at the back of the book,” we shall first try something simpler and see if it works, namely, assuming that V (r) is a simple power of r, i.e., V (r)= Arα, (172)

where A and α can hopefully be determined. (If they can’t, then our method fails and we have to try something else.)

Substitution of (172) into (171) yields

− − ρ Aα(α − 1)rα 2 + A2αrα 2 = − 0 , (173) ǫ0

or − ρ Aα(α + 1)rα 2 = − 0 . (174) ǫ0 You will note that the right-hand side is constant, but the left-hand side has a power of r. The only way for this equation to hold for all values of r ≥ 0 is that the exponent α − 2 is zero, i.e., α = 2. In this case, ρ A = − 0 , (175) 6ǫ0 so that the potential function is ρ V (r)= − 0 r2 + D. (176) 6ǫ0 Note that V (r) is determined only to a constant since the derivatives in the Laplacian remove the constant. For the moment, we ignore the constant, since our primary interest is the electrostatic

291 field vector E(r), given by ρ E(r)= −∇V (r)= 0 r, (177) 3ǫ0 where we have used the fact that ∇r2 = 2rr. The result for E(r) agrees with the result obtained in the main lecture text (as it should).

Finally, let us summarize the results of our potential function determination from above:

3 ρR , r ≥ R V (r)=  3ǫ0r (178)  − ρ0 r2 + D, 0 ≤ r ≤ R. 6ǫ0  In the above, we have set C = 0 so that V (r) → 0 as r → ∞. In order that V (r) be continuous at ρ r = R, it is necessary that D = 0 R2. Thus the final result is: 2ǫ0

3 ρR , r ≥ R V (r)=  3ǫ0r (179)  ρ0 (3R2 − r2), 0 ≤ r ≤ R. 6ǫ0  We note the behaviour of V (r) at three important points: ρ 1. r = 0: V (0) = 0 but V ′(0) = 0, which implies that E(0) = 0. 2ǫ0 ρ 2. r = R: V (R)= 0 . 3ǫ0 3. r →∞: V (r) → 0.

A qualitative sketch of V (r) vs. r is presented below.

ρ0 2ǫ0

2ρ0 V (r) vs. r 3ǫ0

r 0 R

Potential function V (r) for a sphere of radius R with constant charge density ρ0.

292 “Lecture 37”

(This lecture, which would have been the next lecture in the course, was not given this year because of lack of time. Nevertheless, it is included for your own information. You are not responsible for this material for the final examination.)

Surface integrals of vector-valued functions (cont’d): Stokes’ Theorem

Relevant section of textbook by Stewart: 16.8 We now arrive at the final important result of surface integration, namely, Stokes’ Theorem, which is a three-dimensional version of Green’s Theorem in the Plane, covered earlier in the course. Recall that Green’s Theorem in the Plane concerns line integrals of vector fields over closed curves, i.e., 2 circulation integrals, in the plane: If S is a closed curve in R enclosing a region D, and F = F1i + F2j is a vector field for which the partial derivatives ∂F2/x and ∂F1/y exist at all points in D, then

∂F ∂F F · dr = 2 − 1 dx dy. (180) IC ZZD  ∂x ∂y 

The circulation integral over C on the left is equal to an integral over region D on the right. Recall that the integrand on the right side is the k component of the curl of F – in fact, it is the only component of curl F:

∂F ∂F curl F = ∇×~ [F (x,y)i + F (x,y)j]= 2 − 1 k. (181) 1 2  ∂x ∂y 

Note that k is a unit normal vector to the xy-plane: By convention, in fact, because of the “right- hand rule”, it is the unit normal vector associated with the counterclockwise motion of the circulation integral around C. So we may rewrite Green’s Theorem in Eq. (180) as follows:

F · dr = curl F · Nˆ dS. (182) IC ZZD

Here, dS = dA, an infinitesimal element of area on the flat surface D enclosed by curve C.

Stokes’ Theorem is a three-dimensional generalization of this result involving nonplanar surfaces S in R3.

Let S be a piecewise smooth surface in R3, with unit normal vectors N defined at all points of S. Furthermore, suppose that S has a boundary C which is a piecewise smooth

293 closed curve. If F is a “smooth” (i.e., its derivatives exist and are continuous functions) over S, then F · dr = curl F · Nˆ dS. (183) I ZZS

As in Green’s Theorem, the left-hand-side integral is a line integral and the right-hand-side integral is a surface integral. A generic picture is sketched below.

Surface S

Boundary curve C

The remarkable point of this result is that the surface S is not necessarily “contained” inside the curve C – it can be like a deformed soap bubble that has C as its boundary. Thanks to the continuity of the derivatives involved in the curl of F, the circulation around C is transmitted over the surface, just as was the case for Green’s Theorem in the Plane.

It is not the intention of this course to compute a great variety of integrals using Stokes’ Theorem. We’ll consider one simple example, if only to illustrate the point.

2 2 2 Example: Let CR be the circle x + y = R in the plane, and let S be the upper hemispherical surface x2 + y2 + z2 = R2, z ≥ 0, with C as its boundary. Compute F · dr using Stokes’ Theorem R CR H where F = −yi + xj + zk.

The i and j components of F correspond to the vector field of the rotating turntable encountered earlier in the course. The curl of this vector is easily computed to be ∇×~ F = 2k, which is the curl of the turntable vector field – the k-component does not contribute to the curl. In fact, we could in principle write down the solution to the problem from this information. The

294 curve CR lies in the plane, so we can use Green’s Theorem in the plane:

F · dr = curl F · NdA = 2 dA = 2πR2. (184) ICR ZZDR ZZDR

2 2 2 Here DR is the circular region x + y ≤ R in the plane enclosed by CR. But let us compute the result using Stokes’ Theorem as applied to the hemispherical surface S. Using the parametrization for the sphere from earlier, the outward normal vector to the surface S is

N = R sin vr(u, v). (185)

We now compute the surface integral in Stokes’ Theorem as follows:

curl F · Nˆ dS = curl F · N du dv. (186) ZZS ZZD

The integrand in the integral on the right is

curl F · N = (R sin vr(u, v)) · (2k) = 2R2 sin v cos v. (187)

This follows from the fact that z(u, v)= R cos v on the sphere. The surface integral then becomes

π/2 π curl F · N dS = 2R2 sin v cos v du dv = 2πR2, (188) ZZSR Z0 Z0 in agreement with our earlier result.

295 The Biot-Savart effect for distribution of moving charges: Amp`ere’s Circuital Law

In an earlier lecture, we examined the Biot-Savart effect: a current of charge flowing in a conducting wire creates a magnetic field B surrounding the wire. We studied the case in which the conductor is a straight, thin wire such that the direction of current is given by the unit vector uˆ. The current vector is then given by I = Iuˆ. The physical situation is once again sketched below: P is a point of observation with position vector r.

uˆ direction vector of current

B(r) B r P magnetic field ( ) created by current I = Iuˆ θ r

O wire carrying electric current I

From electrodynamics, the magnetic field vector at P is given by

µ I uˆ × r B(r)= 0 . (189) 2π k uˆ × r k2

Here, µ0 denotes the permeability of the vacuum. In the special case that the wire lies on the z-axis, i.e. uˆ = kˆ, the the current vector is I = Ikˆ and the magnetic field vector becomes (see Lecture 27 for details)

µ I −y x B(r)= 0 i + i + 0k . (190) 2π x2 + y2 x2 + y2 

Note that B is undefined for (x,y) = (0, 0), i.e. the z-axis, which is the location of the current-carrying wire. This is a consequence of the infinite density of charge on the wire. In Lecture 27, we also computed the following circulation integral,

B · dr = µ0I, (191) ICR

2 2 2 where CR denotes the circle x + y = R . This is the circulation of the magnetic field over the circle

CR. It is noteworthy that the circulation is independent of R. We also noted that ∇×~ B(r)= 0, (x,y) 6= (0, 0). (192)

296 If we restrict our attention to the plane, we cannot derive the circulation result in Eq. (191) using Green’s Theorem in the Plane, because of the singularity of curl B at (0, 0). Nor could we use Stokes’

Theorem, since the curl B is undefined over the entire z-axis – any surface with CR as boundary would have to include at least one point from the z-axis.

However, we can use the result in Eq. (191) to derive the result that

B · dr = µ0I, (193) IC for any closed curve C in the plane that encloses (0, 0), but does not contain it. The way to prove this result is analogous to our proof of Gauss’ Law for arbitrary surfaces S containing the point Q: We introduce a circle CR with R> 0 sufficiently small so that CR lies entirely inside the region enclosed by curve R, as sketched below.

arbitrary curve C

CR

We then apply Green’s Theorem to the region lying outside CR and inside C, etc., to eventually derive Eq. (193). The details are left as an exercise for the reader.

Extension to several thin wires

The above result may now be extended to cover the case of several thin wires. For simplicity, we that there are n such wires, all parallel to the z-axis. Each wire Wk carries a current Ik, 1 ≤ k ≤ n, as sketched schematically below.

The current from each wire Wk will produce a magnetic field Bk(r). For any closed curve Ck enclosing wire Wk, the circulation of the vector field Bk will be µ0Ik. The net magnetic field B(r) will be the vector sum of these fields, n B(r)= Bk(r). (194) Xk=1

297 Wn

Arbitrary closed curve C enclosing infinitely thin

parallel wires Wk with currents Ik W1

W4

W2

W3

Moreover, for any closed curve C that encloses all of these wires, the circulation integral of B(r) will be n B · dr = µ0 Ik = µ0I, (195) I C Xk=1 where I is the sum of the currents of the individual wires.

Generalization to charge distributions/current densities

Instead of infinitely thin wires with point currents, we now consider continuous charge distributions that are moving in space. Let ρ(r,t) denote the charge density at a point r at time t. And let v(r,t) denote the instantaneous velocity at point r at time t. We then define the current density vector J(r,t) as J(r,t)= ρ(r,t)v(r,t). (196)

The element of current crossing a surface area element dS centered at r with unit normal Nˆ (r) is then given by J(r,t) · Nˆ (r) dS. (197)

Now let C be a smooth, closed curve in R3 that serves the boundary of a smooth surface S. Then the total amount of current crossing this surface will be given by the surface integral

J · Nˆ dS, (198) ZZS where Nˆ denotes the unit normal vector on S. Each element of curent J(r,t) passing through S will contribute to the total magnetic field B in particular, to the net circulation of the field over the

298 boundary curve C as follows: B · dr = J · Nˆ dS. (199) IC ZZS We now assume that B and its derivatives exist – thanks to the continuous distribution of electric charge ρ and therefore the current density J, so that Stokes’ theorem can be applied to the left integral:

curl B · Nˆ dS = J · Nˆ dS. (200) ZZS ZZS

We now rewrite this result as [curl B − J] · Nˆ dS = 0. (201) ZZS Assuming that the integrand is a over some region D ∈ R3, and the above result holds for arbitrary surfaces S with boundary curves C, it follows, from the du Bois-Reymond Lemma, that curl B(r)= J(r). (202)

This is known as Amp`ere’s circuital law. It is a kind of magnetic analogy to the differential form of Gauss’ Law: Where there is current, there is a magnetic field.

299