Tutorials › Calculus III › Common Sign and Setup Errors in Flux Problems

The Divergence Theorem · Tutorial 972 of 999

Common Sign and Setup Errors in Flux Problems

Learn a systematic way to detect and correct sign and setup errors before trusting a divergence-theorem flux calculation.

Advanced 10 min read

What You'll Learn

  • Check whether every boundary component is included and oriented outward from the solid.
  • Distinguish the normals on the side and caps of a cylinder.
  • Set cylindrical bounds from the actual projection of a solid.
  • Include the radial factor in cylindrical volume integrals.
  • Decide when a singular field prevents direct use of the divergence theorem.
  • Verify corrected setups by computing boundary fluxes.

Why Flux Calculations Need a Setup Check

A divergence-theorem calculation can have a correct-looking integral and still give the wrong flux. A reversed normal changes the sign; leaving off a cap omits part of the boundary; incorrect cylindrical bounds integrate over the wrong region; and forgetting the radial volume factor changes the integral itself. A further issue arises when the vector field is singular somewhere in the solid: the theorem may not apply there at all.

These are not errors that can be fixed by evaluating an integral more carefully. The region, boundary, orientation, and regularity of the field must be checked before the calculation begins.

Theorem: If \(E\) is a bounded solid with a piecewise smooth boundary \(\partial E\), and \(\mathbf{F}\) has continuous first partial derivatives on an open set containing \(E\), then
$$ \iint_{\partial E}\mathbf{F}\cdot\mathbf{n}\,dS = \iiint_E \nabla\cdot\mathbf{F}\,dV. $$
Here \(\mathbf{n}\) is the unit normal pointing outward from the solid. If \(E\) has a cavity, “outward” on the cavity wall points into the cavity.

The formula connects the flux through the entire closed boundary to a volume integral. It does not say that any chosen pieces of a boundary, or any chosen normals, can be substituted without adjustment. The regularity condition also matters: a field that is undefined or not continuously differentiable in the solid does not meet the stated hypothesis.

A Practical Audit Before Integrating

Before evaluating a flux integral, check the setup in a fixed order. This separates geometric errors from arithmetic errors.

1
Identify the complete solid.
List every boundary component. A capped cylinder, for example, includes its side and both caps.
2
Orient each component.
Choose normals pointing out of the solid. On an inner boundary around a cavity, the outward normal points toward the cavity’s interior.
3
Check the field on the solid.
Confirm that the field and its first partial derivatives are continuous on an open set containing the solid before applying the theorem directly.
4
Translate the geometry into bounds.
For cylindrical coordinates, determine the radial, angular, and vertical limits from the solid itself.
5
Include the volume factor and check the result.
The cylindrical volume element includes \(r\). Compare the result with the boundary flux or with a separate geometric check when practical.

Why Cylindrical Volume Integrals Include \(r\)

The factor \(r\) is not an optional adjustment to the integrand. It comes from the change in volume when Cartesian coordinates are replaced by cylindrical coordinates. The transformation is \(x=r\cos\theta\), \(y=r\sin\theta\), and \(z=z\). Its Jacobian determinant gives the volume scaling:

$$ \frac{\partial(x,y,z)}{\partial(r,\theta,z)} = \begin{vmatrix} \cos\theta & -r\sin\theta & 0\\ \sin\theta & r\cos\theta & 0\\ 0 & 0 & 1 \end{vmatrix} = r\cos^2\theta+r\sin^2\theta = r. $$

Thus a small cylindrical coordinate box has volume \(dV=r\,dr\,d\theta\,dz\). The factor reflects the fact that a small change \(d\theta\) sweeps a longer arc at larger radius: its arc length is \(r\,d\theta\). Omitting \(r\) treats equal angular changes at every radius as if they swept out equal widths.

Worked Example: A Capped Cylinder and Its Outward Normals

Worked Example: A Capped Cylinder and Its Outward Normals

Let \(E\) be the cylinder \(x^2+y^2\leq 4\), \(0\leq z\leq 3\), and let \(\mathbf{F}(x,y,z)=\langle x,y,z\rangle\). Find its outward flux, checking the side and both caps separately.

The divergence is \(\nabla\cdot\mathbf{F}=1+1+1=3\). In cylindrical coordinates, \(0\leq r\leq2\), \(0\leq\theta\leq2\pi\), and \(0\leq z\leq3\). The theorem gives

$$ \iiint_E 3\,dV = \int_0^{2\pi}\int_0^2\int_0^3 3r\,dz\,dr\,d\theta = \int_0^{2\pi}\int_0^2 9r\,dr\,d\theta = \int_0^{2\pi}18\,d\theta = 36\pi. $$

Check this against the boundary. On the curved side, \(r=2\), the outward unit normal is \(\langle\cos\theta,\sin\theta,0\rangle\), and \(\mathbf{F}\cdot\mathbf{n}=2\). The side area element is \(dS=2\,d\theta\,dz\), so its flux is

$$ \int_0^{2\pi}\int_0^3 2(2)\,dz\,d\theta = \int_0^{2\pi}12\,d\theta = 24\pi. $$

The top cap is at \(z=3\), with outward normal \(\langle0,0,1\rangle\). Its flux is \(3\) times its disk area:

$$ \iint_{\text{top}}\mathbf{F}\cdot\mathbf{n}\,dS = 3\cdot\pi(2)^2 = 12\pi. $$

The bottom cap is at \(z=0\), with outward normal \(\langle0,0,-1\rangle\). There, \(\mathbf{F}\cdot\mathbf{n}=-z=0\), so the bottom flux is \(0\). The total is \(24\pi+12\pi+0=36\pi\), agreeing with the volume integral.

What the check catches: using the side flux \(24\pi\) as the total omits the top cap. The side normal is radial, but the cap normals are vertical; assigning the side normal to a cap would also give an incorrect flux.

Bounds Must Describe the Actual Solid

In cylindrical coordinates, the radial and vertical limits often depend on the shape of the solid. For a solid between \(z=0\) and a paraboloid, the upper surface determines both the height and the edge of the projection onto the \(xy\)-plane. Bounds that extend beyond that projection include points not in the solid.

Worked Example: A Paraboloid with the Correct Bounds and Volume Factor

Worked Example: A Paraboloid with the Correct Bounds and Volume Factor

Let \(E\) be bounded below by \(z=0\) and above by \(z=4-x^2-y^2\). For \(\mathbf{F}=\langle x,y,z\rangle\), find the outward flux using the divergence theorem, then check it directly on the boundary.

Since the upper surface must satisfy \(4-r^2\geq0\), the projection has \(0\leq r\leq2\). The full angular range is \(0\leq\theta\leq2\pi\), and the vertical limits are \(0\leq z\leq4-r^2\). As before, the divergence is \(3\). Therefore

$$ \begin{aligned} \iiint_E 3\,dV &= \int_0^{2\pi}\int_0^2\int_0^{4-r^2}3r\,dz\,dr\,d\theta\\ &= 6\pi\int_0^2(4-r^2)r\,dr\\ &= 6\pi\left[2r^2-\frac{r^4}{4}\right]_0^2\\ &= 6\pi(8-4) = 24\pi. \end{aligned} $$

For a direct boundary check, the bottom disk has \(z=0\) and downward normal, so \(\mathbf{F}\cdot\mathbf{n}=0\) there. On the paraboloid, write \(z=4-x^2-y^2\). The upward-oriented area vector is \(\langle -z_x,-z_y,1\rangle\,dx\,dy=\langle2x,2y,1\rangle\,dx\,dy\); it points outward from the solid because the solid lies below the graph. Its dot product with \(\langle x,y,z\rangle\) is \(2x^2+2y^2+z=4+r^2\). Hence the curved-surface flux is

$$ \int_0^{2\pi}\int_0^2(4+r^2)r\,dr\,d\theta = 2\pi\left[2r^2+\frac{r^4}{4}\right]_0^2 = 2\pi(8+4) = 24\pi. $$

The boundary check agrees with the theorem. Two common incorrect setups can be quantified. If the factor \(r\) is omitted, the volume calculation becomes \(3(2\pi)\int_0^2(4-r^2)\,dr=6\pi(8-\tfrac83)=32\pi\), not \(24\pi\). If the radial bound is incorrectly extended to \(4\), the integral includes points where \(4-r^2<0\), which are outside the stated solid. Both errors change the region or its volume measure before any integration is performed.

Singular Fields Require a Separate Check

A field with a singularity inside a proposed solid does not satisfy the theorem’s continuity hypothesis there. It is not valid to compute its divergence away from the singular point, observe that the divergence is zero, and conclude that the flux through the whole boundary is zero. A useful repair, when the geometry allows it, is to remove a small neighborhood of the singularity and apply the theorem to the remaining region. That creates an additional boundary component whose flux must be included.

Worked Example: A Singular Field on a Sphere

Worked Example: A Singular Field on a Sphere

Consider \(\mathbf{F}=\langle x,y,z\rangle/(x^2+y^2+z^2)^{3/2}\), defined when \(\rho=\sqrt{x^2+y^2+z^2}>0\). Find the outward flux through the sphere \(\rho=a\), where \(a>0\), and explain why the divergence theorem cannot be applied directly to the ball it encloses.

At every point with \(\rho>0\), the divergence can be computed as

$$ \nabla\cdot\mathbf{F} = \frac{3}{\rho^3} - \frac{3(x^2+y^2+z^2)}{\rho^5} = \frac{3}{\rho^3}-\frac{3\rho^2}{\rho^5} = 0. $$

However, the field is undefined at the origin, which lies in the ball. Therefore the theorem cannot be applied directly to the ball. The sphere’s outward unit normal is \(\mathbf{n}=\langle x,y,z\rangle/a\). On the sphere, \(\mathbf{F}=\mathbf{n}/a^2\), so \(\mathbf{F}\cdot\mathbf{n}=1/a^2\). The sphere has area \(4\pi a^2\), giving flux \((1/a^2)(4\pi a^2)=4\pi\).

To check the singularity issue, remove the ball \(\rho<\varepsilon\), where \(0<\varepsilon<a\). On the shell \(\varepsilon\leq\rho\leq a\), the field is continuously differentiable and its divergence is zero. The outer boundary flux is \(4\pi\), as computed above. The shell’s inner boundary has outward normal \(-\mathbf{e}_\rho\), pointing into the removed ball; there \(\mathbf{F}=\mathbf{e}_\rho/\varepsilon^2\). Its flux is therefore \(-1/\varepsilon^2\) times the area \(4\pi\varepsilon^2\), or \(-4\pi\). The total shell flux is \(4\pi-4\pi=0\), agreeing with the zero divergence integral over the shell. The inner boundary term is essential; ignoring the singularity would incorrectly predict zero flux through the outer sphere.

Inner Boundary Normals Point Into the Cavity

A cavity is another place where an intuitive “radially outward” normal can point the wrong way. The outward normal in the divergence theorem is defined relative to the solid, not relative to the center of the cavity. On the inner wall, the direction out of the solid points into the empty cavity.

Worked Example: Checking the Sign on a Spherical Cavity

Worked Example: Checking the Sign on a Spherical Cavity

Let \(E\) be the spherical shell \(1\leq\rho\leq2\), with \(\mathbf{F}=\langle x,y,z\rangle\). Find its outward flux and check the inner-boundary sign.

The divergence is \(3\). The shell’s volume is the volume of the radius-2 ball minus that of the radius-1 ball:

$$ \operatorname{Vol}(E) = \frac{4\pi}{3}(2^3)-\frac{4\pi}{3}(1^3) = \frac{28\pi}{3}. $$

The divergence-theorem flux is \(3(28\pi/3)=28\pi\). On the outer sphere, the outward normal is \(\mathbf{e}_\rho\), and \(\mathbf{F}\cdot\mathbf{n}=2\). Its flux is \(2(4\pi\cdot2^2)=32\pi\). On the inner sphere, the outward normal from the shell is \(-\mathbf{e}_\rho\), not \(\mathbf{e}_\rho\). Since \(\mathbf{F}=\mathbf{e}_\rho\) there, the dot product is \(-1\), and the inner flux is \(-1(4\pi\cdot1^2)=-4\pi\). Adding the components gives \(32\pi-4\pi=28\pi\), as required. If the inner normal were mistakenly pointed radially outward, the resulting sum \(32\pi+4\pi=36\pi\) would contradict the volume integral.

Common Errors and Their Corrections

ErrorWhy it failsCorrection
Using an inward normal on a boundary pieceThe flux on that piece changes sign.Orient each normal outward from the solid; on cavity walls, point into the cavity.
Integrating only over the side of a capped solidThe caps contribute boundary flux too, even if one happens to contribute zero.List and check every boundary component before summing.
Using radial bounds that extend beyond the solidThe integral includes points outside the actual projection.Derive the bounds from the surfaces that enclose the solid.
Omitting \(r\) in cylindrical coordinatesThe integral no longer uses the correct volume element.Use \(dV=r\,dr\,d\theta\,dz\).
Applying the theorem across a singularityThe field fails the required continuity condition on the solid.Check regularity first; if appropriate, exclude the singularity and account for the new boundary.

A final numerical match is useful, but it cannot replace these checks: two errors can sometimes offset each other. A reliable calculation has a correct region, complete boundary, valid field, proper orientation, and correct coordinate measure before the arithmetic is trusted.

Check Your Understanding

For each question, identify the setup issue before attempting a numerical calculation.

  1. For a capped cylinder, what boundary components must be included, and how do the cap normals differ from the side normal?
  2. A solid lies below \(z=9-r^2\) and above \(z=0\). What radial interval describes its projection onto the \(xy\)-plane?
  3. What factor belongs in the cylindrical volume element, and where does it come from?
  4. For a solid with a spherical cavity, which way does the outward normal on the inner boundary point?
  5. Why is zero divergence away from a singular point not sufficient to conclude that the flux through a sphere enclosing that point is zero?