Practice / Calculus

Surface integrals and the divergence theorem: dS, flux and Stokes

Ten problems on surface integrals: the area of a sphere from |r_φ × r_θ|, the area of a paraboloid as a graph, the mass of a hemispherical shell, the upward flux through a paraboloid cap with the normal (−g_x, −g_y, 1), the outward flux through a sphere, the divergence theorem on a box and on a ball, the flux through a hemisphere found by closing it with a disk, Stokes' theorem on a hemisphere and its boundary circle, and Gauss's law for the field r/|r|³ with the origin inside and outside, with worked solutions and the mistakes of dropping |r_u × r_v|, the normal (g_x, g_y, 1), forgetting the disk that closes the surface, a boundary traced the wrong way for Stokes and the divergence theorem across a singularity.

Before you start

A surface integral adds something up over a curved surface the way a line integral adds it up along a curve. With respect to area it totals a density over a shell; with a vector field it totals the flux, the rate at which the field flows through the surface. Each one is computed the same way: parametrize the surface by two variables, find the area element dS=∥ru×rv∥ du dvdS = \|r_u \times r_v\|\,du\,dv from a cross product, and do an ordinary double integral. Two theorems save most of the work. The divergence theorem trades the flux out of a closed surface for a triple integral of the divergence over the solid inside:

∬SF⋅n dS=∭E∇⋅F dV,\iint_S F \cdot n\,dS = \iiint_E \nabla \cdot F\,dV ,

and Stokes' theorem trades the flux of a curl for a line integral around the boundary. They are Green's theorem in three dimensions, and they are where Gauss's law of electrostatics comes from. These ten problems compute areas, masses and fluxes directly, then with each theorem, and end with the point charge whose field the divergence theorem gets wrong if you let it.

  • A surface SS is given by r(u,v)=(x,y,z)r(u, v) = (x, y, z) over a region DD of the uvuv-plane. The vectors rur_u and rvr_v are tangent to it, ru×rvr_u \times r_v is normal to it, and its area element is dS=∥ru×rv∥ du dvdS = \|r_u \times r_v\|\,du\,dv.
  • Graphs. For z=g(x,y)z = g(x, y) over DD, take r=(x,y,g)r = (x, y, g): then rx×ry=(−gx,−gy,1)r_x \times r_y = (-g_x, -g_y, 1), which points up, and dS=1+gx2+gy2 dAdS = \sqrt{1 + g_x^2 + g_y^2}\,dA.
  • Spheres. On the sphere of radius aa, r=(asin⁡ϕcos⁡θ, asin⁡ϕsin⁡θ, acos⁡ϕ)r = (a\sin\phi\cos\theta,\ a\sin\phi\sin\theta,\ a\cos\phi) with 0≤ϕ≤π0 \le \phi \le \pi, 0≤θ≤2π0 \le \theta \le 2\pi. The outward unit normal is n=r/an = r/a and dS=a2sin⁡ϕ dϕ dθdS = a^2\sin\phi\,d\phi\,d\theta.
  • Scalar surface integral. ∬Sg dS=∬Dg(r(u,v)) ∥ru×rv∥ du dv\iint_S g\,dS = \iint_D g(r(u, v))\,\|r_u \times r_v\|\,du\,dv. It does not depend on which way the normal points.
  • Flux. ∬SF⋅n dS=∬DF(r(u,v))⋅(ru×rv) du dv\iint_S F \cdot n\,dS = \iint_D F(r(u, v)) \cdot (r_u \times r_v)\,du\,dv, with nn the chosen unit normal; if ru×rvr_u \times r_v points the other way, flip its sign. For a closed surface the convention is the outward normal.
  • Divergence and curl. For F=(P,Q,R)F = (P, Q, R): ∇⋅F=Px+Qy+Rz\nabla \cdot F = P_x + Q_y + R_z, and ∇×F=(Ry−Qz, Pz−Rx, Qx−Py)\nabla \times F = (R_y - Q_z,\ P_z - R_x,\ Q_x - P_y).
  • Divergence theorem. If SS is the whole boundary of the solid EE, with the outward normal, and FF has continuous partial derivatives on all of EE: ∬SF⋅n dS=∭E∇⋅F dV\iint_S F \cdot n\,dS = \iiint_E \nabla \cdot F\,dV.
  • Stokes' theorem. If SS has boundary curve CC: ∬S(∇×F)⋅n dS=∮CF⋅dr\iint_S (\nabla \times F) \cdot n\,dS = \oint_C F \cdot dr, with CC traced so that the surface is on your left when you walk along it with your head pointing along nn (the right-hand rule).

Builds on: Line integrals and Green's theorem: work, potentials and circulation, Triple integrals: iterated limits, cylindrical and spherical coordinates, Vectors in 3-D: dot and cross products, lines and planes

Problems

  1. ·

    Parametrize the sphere of radius 22 by ϕ\phi and θ\theta, compute rϕ×rθr_\phi \times r_\theta and its length, and use it to find the area of the sphere.

  2. ·

    Find the area of the part of the paraboloid z=x2+y2z = x^2 + y^2 below the plane z=2z = 2.

  3. ··

    A thin shell has the shape of the upper hemisphere x2+y2+z2=4x^2 + y^2 + z^2 = 4, z≥0z \ge 0, and its density is ρ=z\rho = z. Find its mass, and the average height of a point on the shell.

  4. ··

    Find the upward flux of F=(x,y,z)F = (x, y, z) through the cap z=1−x2−y2z = 1 - x^2 - y^2, z≥0z \ge 0.

  5. ··

    Find the outward flux of F=(0,0,z)F = (0, 0, z) through the sphere of radius 22 about the origin, directly from the parametrization.

  6. ·

    Use the divergence theorem to find the outward flux of F=(x2,y2,z2)F = (x^2, y^2, z^2) out of the box 0≤x≤10 \le x \le 1, 0≤y≤20 \le y \le 2, 0≤z≤30 \le z \le 3. Check it face by face.

  7. ··

    Find the outward flux of F=(x3,y3,z3)F = (x^3, y^3, z^3) through the unit sphere with the divergence theorem, and check it with the surface integral.

  8. ···

    Let F=(x+y2, y+z2, z+x2)F = (x + y^2,\ y + z^2,\ z + x^2) and let SS be the upper hemisphere x2+y2+z2=1x^2 + y^2 + z^2 = 1, z≥0z \ge 0, with the upward normal. Find the flux of FF through SS by closing the surface with a disk.

  9. ···

    Let F=(z−y, x+z2, xy)F = (z - y,\ x + z^2,\ xy) and let SS be the upper unit hemisphere with the upward normal. Verify Stokes' theorem: compute ∬S(∇×F)⋅n dS\iint_S (\nabla \times F) \cdot n\,dS and the line integral around the boundary circle.

  10. ···

    A point charge at the origin has electric field proportional to

    F=(x,y,z)(x2+y2+z2)3/2.F = \frac{(x, y, z)}{(x^2 + y^2 + z^2)^{3/2}} .

    Show that ∇⋅F=0\nabla \cdot F = 0 away from the origin. Find the outward flux of FF through the sphere of radius aa about the origin, through the surface of the cube −1≤x,y,z≤1-1 \le x, y, z \le 1, and through the unit sphere centered at (3,0,0)(3, 0, 0).

Worked solutions

Problem 1

Parametrize the sphere of radius 22 by ϕ\phi and θ\theta, compute rϕ×rθr_\phi \times r_\theta and its length, and use it to find the area of the sphere.

  1. r=(2sin⁡ϕcos⁡θ, 2sin⁡ϕsin⁡θ, 2cos⁡ϕ)r = (2\sin\phi\cos\theta,\ 2\sin\phi\sin\theta,\ 2\cos\phi)ϕ\phi is measured down from the positive zz-axis, θ\theta around it.
  2. rϕ=(2cos⁡ϕcos⁡θ, 2cos⁡ϕsin⁡θ, −2sin⁡ϕ)r_\phi = (2\cos\phi\cos\theta,\ 2\cos\phi\sin\theta,\ -2\sin\phi), rθ=(−2sin⁡ϕsin⁡θ, 2sin⁡ϕcos⁡θ, 0)r_\theta = (-2\sin\phi\sin\theta,\ 2\sin\phi\cos\theta,\ 0)Differentiate each coordinate.
  3. rϕ×rθ=4sin⁡ϕ (sin⁡ϕcos⁡θ, sin⁡ϕsin⁡θ, cos⁡ϕ)r_\phi \times r_\theta = 4\sin\phi\,(\sin\phi\cos\theta,\ \sin\phi\sin\theta,\ \cos\phi)The components are 4sin⁡2ϕcos⁡θ4\sin^2\phi\cos\theta, 4sin⁡2ϕsin⁡θ4\sin^2\phi\sin\theta and 4sin⁡ϕcos⁡ϕ4\sin\phi\cos\phi. The vector in parentheses is r/2r/2, so the cross product points outward.
  4. ∥rϕ×rθ∥=4sin⁡ϕ\|r_\phi \times r_\theta\| = 4\sin\phiThe vector in parentheses is a unit vector, and sin⁡ϕ≥0\sin\phi \ge 0 on [0,π][0, \pi].
  5. Area =∫02π∫0π4sin⁡ϕ dϕ dθ=4⋅2⋅2π=16π= \int_0^{2\pi}\int_0^\pi 4\sin\phi\,d\phi\,d\theta = 4\cdot2\cdot2\pi = 16\piIt agrees with 4πa24\pi a^2. Integrating dϕ dθd\phi\,d\theta with no factor gives 2π2≈19.742\pi^2 \approx 19.74 instead of 16π≈50.2716\pi \approx 50.27: the rectangle of angles is not the sphere (Mistake 1).

Problem 2

Find the area of the part of the paraboloid z=x2+y2z = x^2 + y^2 below the plane z=2z = 2.

  1. gx=2xg_x = 2x, gy=2yg_y = 2y, so dS=1+4x2+4y2 dAdS = \sqrt{1 + 4x^2 + 4y^2}\,dAThe graph formula.
  2. The shadow is the disk x2+y2≤2x^2 + y^2 \le 2The paraboloid meets z=2z = 2 where r2=2r^2 = 2.
  3. Area =∫02π∫021+4r2 r dr dθ= \int_0^{2\pi}\int_0^{\sqrt2}\sqrt{1 + 4r^2}\,r\,dr\,d\thetaPolar coordinates, keeping the rr of dA=r dr dθdA = r\,dr\,d\theta.
  4. ∫021+4r2 r dr=18∫19u du=112(27−1)=136\int_0^{\sqrt2}\sqrt{1 + 4r^2}\,r\,dr = \tfrac18\int_1^9\sqrt u\,du = \tfrac{1}{12}(27 - 1) = \tfrac{13}{6}Substitute u=1+4r2u = 1 + 4r^2, du=8r drdu = 8r\,dr.
  5. Area =2π⋅136=13π3≈13.61= 2\pi\cdot\tfrac{13}{6} = \tfrac{13\pi}{3} \approx 13.61More than twice the area 2π≈6.282\pi \approx 6.28 of the disk underneath, because the surface is steep near the rim. Leaving out the square root gives exactly the disk's area (Mistake 1).

Problem 3

A thin shell has the shape of the upper hemisphere x2+y2+z2=4x^2 + y^2 + z^2 = 4, z≥0z \ge 0, and its density is ρ=z\rho = z. Find its mass, and the average height of a point on the shell.

  1. z=2cos⁡ϕz = 2\cos\phi and dS=4sin⁡ϕ dϕ dθdS = 4\sin\phi\,d\phi\,d\theta, with 0≤ϕ≤π20 \le \phi \le \tfrac\pi2Problem 1 with the upper half only.
  2. Mass =∫02π∫0π/22cos⁡ϕ⋅4sin⁡ϕ dϕ dθ= \int_0^{2\pi}\int_0^{\pi/2} 2\cos\phi\cdot4\sin\phi\,d\phi\,d\thetaA scalar surface integral; the direction of the normal plays no part.
  3. ∫0π/2cos⁡ϕsin⁡ϕ dϕ=12\int_0^{\pi/2}\cos\phi\sin\phi\,d\phi = \tfrac12It is 12sin⁡2ϕ\tfrac12\sin^2\phi from 00 to π2\tfrac\pi2.
  4. Mass =8⋅12⋅2π=8π≈25.13= 8\cdot\tfrac12\cdot2\pi = 8\pi \approx 25.13The θ\theta-integral gives 2π2\pi.
  5. Mass 8π8\pi; the average height is 8π/8π=18\pi/8\pi = 1The area of the hemisphere is 2πa2=8π2\pi a^2 = 8\pi. The average height of the shell is a2\tfrac a2, higher than the 3a8\tfrac{3a}{8} of the solid half-ball, whose volume crowds near the flat base.

Problem 4

Find the upward flux of F=(x,y,z)F = (x, y, z) through the cap z=1−x2−y2z = 1 - x^2 - y^2, z≥0z \ge 0.

  1. g=1−x2−y2g = 1 - x^2 - y^2, so (−gx,−gy,1)=(2x,2y,1)(-g_x, -g_y, 1) = (2x, 2y, 1)It points up, as required: the zz-component is 11.
  2. F⋅(2x,2y,1)=2x2+2y2+(1−x2−y2)=1+r2F \cdot (2x, 2y, 1) = 2x^2 + 2y^2 + (1 - x^2 - y^2) = 1 + r^2On the surface, z=1−r2z = 1 - r^2.
  3. The shadow is the unit diskThe cap meets z=0z = 0 where r=1r = 1.
  4. Flux =∫02π∫01(1+r2) r dr dθ=2π(12+14)= \int_0^{2\pi}\int_0^1(1 + r^2)\,r\,dr\,d\theta = 2\pi\big(\tfrac12 + \tfrac14\big)The ∥rx×ry∥\|r_x \times r_y\| cancels against the 1/∥rx×ry∥1/\|r_x \times r_y\| in the unit normal, so no square root appears.
  5. Flux =3π2≈4.71= \tfrac{3\pi}{2} \approx 4.71A check with the divergence theorem: ∇⋅F=3\nabla \cdot F = 3 and the solid under the cap has volume π2\tfrac\pi2, giving 3π2\tfrac{3\pi}{2} out of the closed surface; on the flat bottom F⋅(0,0,−1)=−z=0F \cdot (0, 0, -1) = -z = 0, so all of it leaves through the cap. With (gx,gy,1)(g_x, g_y, 1) as the normal the answer is −π2-\tfrac\pi2 (Mistake 2).

Problem 5

Find the outward flux of F=(0,0,z)F = (0, 0, z) through the sphere of radius 22 about the origin, directly from the parametrization.

  1. n=12(x,y,z)n = \tfrac12(x, y, z), so F⋅n=z22F \cdot n = \tfrac{z^2}{2}The outward unit normal of a sphere is the position vector divided by the radius.
  2. F⋅n=2cos⁡2ϕF \cdot n = 2\cos^2\phi and dS=4sin⁡ϕ dϕ dθdS = 4\sin\phi\,d\phi\,d\thetaz=2cos⁡ϕz = 2\cos\phi.
  3. Flux =∫02π∫0π8cos⁡2ϕsin⁡ϕ dϕ dθ= \int_0^{2\pi}\int_0^\pi 8\cos^2\phi\sin\phi\,d\phi\,d\thetaBoth hemispheres add: below the equator z<0z < 0 and the field points down, which is still outward.
  4. ∫0πcos⁡2ϕsin⁡ϕ dϕ=23\int_0^\pi\cos^2\phi\sin\phi\,d\phi = \tfrac23It is −13cos⁡3ϕ-\tfrac13\cos^3\phi from 00 to π\pi.
  5. Flux =8⋅23⋅2π=32π3≈33.51= 8\cdot\tfrac23\cdot2\pi = \tfrac{32\pi}{3} \approx 33.51This is the volume of the ball, 43π⋅23\tfrac43\pi\cdot2^3, as the divergence theorem predicts: ∇⋅F=1\nabla \cdot F = 1.

Problem 6

Use the divergence theorem to find the outward flux of F=(x2,y2,z2)F = (x^2, y^2, z^2) out of the box 0≤x≤10 \le x \le 1, 0≤y≤20 \le y \le 2, 0≤z≤30 \le z \le 3. Check it face by face.

  1. ∇⋅F=2x+2y+2z\nabla \cdot F = 2x + 2y + 2zSum of PxP_x, QyQ_y, RzR_z.
  2. ∭2x dV=2⋅12⋅6=6\iiint 2x\,dV = 2\cdot\tfrac12\cdot6 = 6, ∭2y dV=2⋅1⋅6=12\iiint 2y\,dV = 2\cdot1\cdot6 = 12, ∭2z dV=2⋅32⋅6=18\iiint 2z\,dV = 2\cdot\tfrac32\cdot6 = 18The box has volume 66, and the average of xx, yy, zz over it is the center (12,1,32)(\tfrac12, 1, \tfrac32).
  3. Total =6+12+18=36= 6 + 12 + 18 = 36The divergence theorem's answer.
  4. On x=1x = 1: F⋅n=1F \cdot n = 1 over area 66; on y=2y = 2: 44 over area 33; on z=3z = 3: 99 over area 22The faces x=0x = 0, y=0y = 0, z=0z = 0 contribute 00, because there the normal component of FF is −x2=0-x^2 = 0, −y2=0-y^2 = 0, −z2=0-z^2 = 0.
  5. Flux =36= 36; the faces give 6+12+18=366 + 12 + 18 = 36Each face's flux matches one term of the triple integral.

Problem 7

Find the outward flux of F=(x3,y3,z3)F = (x^3, y^3, z^3) through the unit sphere with the divergence theorem, and check it with the surface integral.

  1. ∇⋅F=3x2+3y2+3z2=3ρ2\nabla \cdot F = 3x^2 + 3y^2 + 3z^2 = 3\rho^2In spherical coordinates.
  2. ∭3ρ2 dV=∫02π∫0π∫013ρ4sin⁡ϕ dρ dϕ dθ\iiint 3\rho^2\,dV = \int_0^{2\pi}\int_0^\pi\int_0^1 3\rho^4\sin\phi\,d\rho\,d\phi\,d\thetadV=ρ2sin⁡ϕ dρ dϕ dθdV = \rho^2\sin\phi\,d\rho\,d\phi\,d\theta.
  3. =3⋅15⋅2⋅2π=12π5= 3\cdot\tfrac15\cdot2\cdot2\pi = \tfrac{12\pi}{5}The limits are numbers, so the integral splits.
  4. On the sphere n=(x,y,z)n = (x, y, z), so F⋅n=x4+y4+z4F \cdot n = x^4 + y^4 + z^4, and ∬x4 dS=4π5\iint x^4\,dS = \tfrac{4\pi}{5}With z=cos⁡ϕz = \cos\phi: ∬z4 dS=2π∫0πcos⁡4ϕsin⁡ϕ dϕ=2π⋅25\iint z^4\,dS = 2\pi\int_0^\pi\cos^4\phi\sin\phi\,d\phi = 2\pi\cdot\tfrac25. By symmetry x4x^4 and y4y^4 give the same.
  5. Flux =12π5≈7.54= \tfrac{12\pi}{5} \approx 7.54 both ways3⋅4π53\cdot\tfrac{4\pi}{5} from the surface.

Problem 8

Let F=(x+y2, y+z2, z+x2)F = (x + y^2,\ y + z^2,\ z + x^2) and let SS be the upper hemisphere x2+y2+z2=1x^2 + y^2 + z^2 = 1, z≥0z \ge 0, with the upward normal. Find the flux of FF through SS by closing the surface with a disk.

  1. SS and the unit disk DD in the plane z=0z = 0 together bound the half-ball EEThe divergence theorem needs a closed surface; SS alone is not one.
  2. ∇⋅F=1+1+1=3\nabla \cdot F = 1 + 1 + 1 = 3, so ∭E3 dV=3⋅2π3=2π\iiint_E 3\,dV = 3\cdot\tfrac{2\pi}{3} = 2\piThe half-ball has volume 23π\tfrac23\pi.
  3. On DD the outward normal is (0,0,−1)(0, 0, -1) and F⋅n=−(z+x2)=−x2F \cdot n = -(z + x^2) = -x^2Outward from EE is down on the base.
  4. ∬D−x2 dA=−∫02π∫01r3cos⁡2θ dr dθ=−π4\iint_D -x^2\,dA = -\int_0^{2\pi}\int_0^1 r^3\cos^2\theta\,dr\,d\theta = -\tfrac\pi414⋅π\tfrac14\cdot\pi.
  5. Flux through SS =2π−(−π4)=9π4≈7.07= 2\pi - \big(-\tfrac\pi4\big) = \tfrac{9\pi}{4} \approx 7.07The total out of EE is 2π2\pi, and the base takes −π4-\tfrac\pi4 of it, so the dome carries the rest. Stopping at 2π2\pi forgets the base (Mistake 3).

Problem 9

Let F=(z−y, x+z2, xy)F = (z - y,\ x + z^2,\ xy) and let SS be the upper unit hemisphere with the upward normal. Verify Stokes' theorem: compute ∬S(∇×F)⋅n dS\iint_S (\nabla \times F) \cdot n\,dS and the line integral around the boundary circle.

  1. ∇×F=(x−2z, 1−y, 2)\nabla \times F = (x - 2z,\ 1 - y,\ 2)Ry−Qz=x−2zR_y - Q_z = x - 2z, Pz−Rx=1−yP_z - R_x = 1 - y, Qx−Py=1+1Q_x - P_y = 1 + 1.
  2. With n=(x,y,z)n = (x, y, z): (∇×F)⋅n=x2−2xz+y−y2+2z(\nabla \times F) \cdot n = x^2 - 2xz + y - y^2 + 2zThe upward normal of the upper hemisphere is outward.
  3. ∬Sx2 dS=∬Sy2 dS=2π3\iint_S x^2\,dS = \iint_S y^2\,dS = \tfrac{2\pi}{3}, ∬Sxz dS=∬Sy dS=0\iint_S xz\,dS = \iint_S y\,dS = 0, ∬Sz dS=π\iint_S z\,dS = \piHalf of 4π3\tfrac{4\pi}{3} for each square; the odd terms cancel between θ\theta and θ+π\theta + \pi; and ∬z dS\iint z\,dS is Problem 3 with radius 11.
  4. ∬S(∇×F)⋅n dS=2π3−2π3+2π=2π\iint_S (\nabla \times F) \cdot n\,dS = \tfrac{2\pi}{3} - \tfrac{2\pi}{3} + 2\pi = 2\piAdd the pieces.
  5. Both sides equal 2π2\piCounterclockwise seen from above, r=(cos⁡t,sin⁡t,0)r = (\cos t, \sin t, 0), so F=(−sin⁡t,cos⁡t,sin⁡tcos⁡t)F = (-\sin t, \cos t, \sin t\cos t) and F⋅r′=sin⁡2t+cos⁡2t=1F \cdot r' = \sin^2 t + \cos^2 t = 1, giving 2π2\pi. The flat unit disk has the same boundary and gives ∬2 dA=2π\iint 2\,dA = 2\pi too. Clockwise gives −2π-2\pi (Mistake 4).

Problem 10

A point charge at the origin has electric field proportional to

F=(x,y,z)(x2+y2+z2)3/2.F = \frac{(x, y, z)}{(x^2 + y^2 + z^2)^{3/2}} .

Show that ∇⋅F=0\nabla \cdot F = 0 away from the origin. Find the outward flux of FF through the sphere of radius aa about the origin, through the surface of the cube −1≤x,y,z≤1-1 \le x, y, z \le 1, and through the unit sphere centered at (3,0,0)(3, 0, 0).

  1. Px=1ρ3−3x2ρ5P_x = \dfrac{1}{\rho^3} - \dfrac{3x^2}{\rho^5}, and similarly for QyQ_y and RzR_zHere ρ=x2+y2+z2\rho = \sqrt{x^2 + y^2 + z^2}, and ∂ρ/∂x=x/ρ\partial\rho/\partial x = x/\rho.
  2. ∇⋅F=3ρ3−3ρ2ρ5=0\nabla \cdot F = \dfrac{3}{\rho^3} - \dfrac{3\rho^2}{\rho^5} = 0 for ρ≠0\rho \ne 0The three x2x^2, y2y^2, z2z^2 terms add up to ρ2\rho^2.
  3. On the sphere of radius aa: F⋅n=1a2F \cdot n = \dfrac{1}{a^2}, so the flux is 1a2⋅4πa2=4π\dfrac{1}{a^2}\cdot4\pi a^2 = 4\piFF points straight out and has length 1a2\tfrac{1}{a^2}. The radius cancels.
  4. Cube: apply the divergence theorem to the region between the cube and a small sphere inside it, where FF is smooth: the flux out of the cube equals the flux out of the small sphere, 4π4\piThe origin is not in that region, and ∇⋅F=0\nabla \cdot F = 0 there. Each face of the cube carries 4π6=2π3\tfrac{4\pi}{6} = \tfrac{2\pi}{3} by symmetry.
  5. Flux 4π4\pi through every sphere about the origin, 4π4\pi through the cube, and 00 through the sphere centered at (3,0,0)(3, 0, 0)That sphere does not contain the origin, so the divergence theorem applies on its ball and gives ∭0 dV=0\iiint 0\,dV = 0. This is Gauss's law: the flux counts the charge inside, whatever the surface. Using ∇⋅F=0\nabla \cdot F = 0 on a ball that contains the origin gives 00 instead of 4π4\pi (Mistake 5).

Where this goes wrong

1. Dropping |r_u × r_v| from dS

The surface integral is written as if dSdS were dAdA of the shadow, or du dvdu\,dv of the parameters.

  1. z=x2+y2z = x^2 + y^2 below z=2z = 2 has shadow x2+y2≤2x^2 + y^2 \le 2Right so far: Problem 2.
  2. “Area =∬D1 dA= \iint_D 1\,dA.”The step that causes the mistake: dS=1+gx2+gy2 dAdS = \sqrt{1 + g_x^2 + g_y^2}\,dA, and the tilt of the surface is what the square root measures.
  3. Area =2π≈6.28= 2\pi \approx 6.28That is the area of the flat disk, not of the bowl above it; the true area is 13π3≈13.61\tfrac{13\pi}{3} \approx 13.61. The same slip on the sphere of Problem 1, integrating dϕ dθd\phi\,d\theta with no 4sin⁡ϕ4\sin\phi, gives 2π2≈19.742\pi^2 \approx 19.74 for an area of 16π≈50.2716\pi \approx 50.27.

2. The normal (g_x, g_y, 1) instead of (−g_x, −g_y, 1)

The normal of a graph is remembered as the gradient of gg with a 11 appended.

  1. g=1−x2−y2g = 1 - x^2 - y^2 and F=(x,y,z)F = (x, y, z)Right so far: Problem 4.
  2. “The upward normal is (gx,gy,1)=(−2x,−2y,1)(g_x, g_y, 1) = (-2x, -2y, 1).”The surface is the level set z−g=0z - g = 0, whose gradient is (−gx,−gy,1)(-g_x, -g_y, 1). The vector (gx,gy,1)(g_x, g_y, 1) is not normal to the surface at all.
  3. F⋅n dS=(1−3r2) dAF \cdot n\,dS = (1 - 3r^2)\,dA, so the flux is 2π(12−34)=−π22\pi\big(\tfrac12 - \tfrac34\big) = -\tfrac\pi2The field points out of the cap everywhere, so the upward flux must be positive. With (2x,2y,1)(2x, 2y, 1) it is 3π2\tfrac{3\pi}{2}, which the divergence theorem confirms.

3. Forgetting the disk that closes the surface

The divergence theorem is applied to a hemisphere as if it were a closed surface.

  1. ∇⋅F=3\nabla \cdot F = 3 for F=(x+y2,y+z2,z+x2)F = (x + y^2, y + z^2, z + x^2)Right so far: Problem 8.
  2. “Flux through the hemisphere =∭E3 dV= \iiint_E 3\,dV.”The triple integral is the flux out of the whole boundary of EE, which includes the flat disk at the bottom.
  3. Flux through SS =2π= 2\piThe disk carries −π4-\tfrac\pi4 of that total, so the dome carries 2π+π4=9π4≈7.072\pi + \tfrac\pi4 = \tfrac{9\pi}{4} \approx 7.07. The disk's flux is 00 only when Fz=0F_z = 0 on the plane z=0z = 0, as in Problem 4.

4. A boundary traced the wrong way for Stokes

The boundary circle is traced in whichever direction comes first.

  1. ∬S(∇×F)⋅n dS=2π\iint_S (\nabla \times F) \cdot n\,dS = 2\pi with the upward normalRight so far: Problem 9.
  2. “r=(cos⁡t,−sin⁡t,0)r = (\cos t, -\sin t, 0), 0≤t≤2π0 \le t \le 2\pi.”This runs clockwise seen from above. With the normal pointing up, the right-hand rule needs counterclockwise.
  3. ∮CF⋅dr=−2π\oint_C F \cdot dr = -2\pi, so Stokes' theorem seems to failClockwise, F=(sin⁡t,cos⁡t,−sin⁡tcos⁡t)F = (\sin t, \cos t, -\sin t\cos t) and r′=(−sin⁡t,−cos⁡t,0)r' = (-\sin t, -\cos t, 0), so F⋅r′=−1F \cdot r' = -1 at every point. Reversing the curve flips the sign; counterclockwise gives 2π2\pi, as the surface does.

5. The divergence theorem across a singularity

The divergence of the point-charge field is zero, so every closed flux is assumed to be zero.

  1. ∇⋅F=0\nabla \cdot F = 0 for ρ≠0\rho \ne 0Right so far: Problem 10.
  2. “By the divergence theorem the flux out of the unit sphere is ∭ρ≤10 dV\iiint_{\rho \le 1} 0\,dV.”The theorem needs FF smooth on the whole solid, and FF is undefined at the origin, which is inside the ball.
  3. Flux =0= 0The direct computation gives F⋅n=1F \cdot n = 1 at every point of the unit sphere and a flux of 4π≈12.574\pi \approx 12.57. All of the divergence sits at the one point where FF blows up; the theorem gives 00 only for surfaces that leave the origin outside, like the sphere centered at (3,0,0)(3, 0, 0).

Print this set: surface-integrals-and-the-divergence-theorem.pdf (problems, answers, and worked solutions on separate pages).

Read the guide: Surface integrals and the divergence theorem: dS = |ru × rv| du dv, the normal sets the sign, and close the surface before using div F