# The Divergence Theorem

Physics I · Differential Equations and Vector Calculus · https://tryals.app/learn/physics-i/the-divergence-theorem

The **divergence theorem** (Gauss's theorem) links a **volume integral** of divergence to a **surface integral** of flux:

$$\oiint_S \vec{F}\cdot d\vec{S} = \iiint_V (\nabla\cdot\vec{F})\,dV$$

Here, $S$ is the **closed surface** bounding volume $V$ with an outward-pointing normal.

**Physical meaning**: Total flux leaving a closed surface equals total source strength inside.

| Situation | Best Direction |
| --- | --- |
| Hard surface, easy divergence | Surface $\to$ volume |
| Hard volume, easy flux | Volume $\to$ surface |
| $\nabla\cdot\vec{F} = 0$ everywhere | Flux is zero |

**Example**: For $\vec{F} = x\hat{i} + y\hat{j} + z\hat{k}$ on the unit sphere, $\nabla\cdot\vec{F} = 3$. The volume integral is $\iiint 3\,dV = 3(\frac{4\pi}{3}) = 4\pi$, matching the flux integral.

## Physics & Pitfalls

**Applications in physics**:
- **Gauss's law**: $\nabla\cdot\vec{E} = \rho/\varepsilon_0$
- **Continuity equation**: $\nabla\cdot\vec{J} + \frac{\partial\rho}{\partial t} = 0$

**Key insight**: It reduces 2D surface integrals to 3D volume integrals, or vice versa. Always pick the easier side.

**Common pitfall**: The theorem requires a **closed surface** and a field that is smooth throughout the volume. 

An **open surface**, or a **singularity** inside like $1/r^2$ at the origin, invalidates the equality entirely.

## Practice questions

7 of this lesson's 15 practice questions, with answers. The full set is in the app.

### 1. Complete the following passage by choosing the correct terms from the word bank.

**Answer:** The divergence theorem states: ∬_S F $\cdot dS$ = ∭_V **∇ $\cdot F$** dV, where the blank is the **divergence** of F.

**Why:** The flux through a closed surface equals the volume integral of $\nabla \cdot F$.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/complete-the-following-passage-by-choosing-the-correct-terms-from-the

### 2. Sort: which theorem relates each pair?

**Answer:**

- Divergence theorem: Closed surface flux ↔ volume integral of $\nabla\cdot F$, ∬_S F $\cdot dS$ = ∭_V $\nabla\cdot F$ dV
- Stokes' theorem: Circulation ↔ surface integral of $\nabla\times F$
- Neither: Gradient ↔ potential function

**Why:** The divergence theorem relates flux to divergence; Stokes relates circulation to curl.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/sort-which-theorem-relates-each-pair

### 3. A vector field has $\nabla\cdot\vec{F} = 0$ **everywhere** inside a closed surface $S$. What is the total flux of $\vec{F}$ out through $S$?

A. Zero only if the field is also curl-free
B. Positive if the field is strong at the surface
C. Cannot be determined without knowing $\vec{F}$ on the surface
D. Exactly zero, no sources inside means nothing net flows out

**Answer:** D. Exactly zero, no sources inside means nothing net flows out

**Why:** Zero divergence means every region passes along exactly what it receives, flow in equals flow out. Incompressible water and magnetic fields ($\nabla\cdot\vec{B}=0$) obey this: no net flux ever escapes a closed surface.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/a-vector-field-has-cdotf-0-everywhere-inside-a-closed-surface-s

### 4. The divergence theorem equates a volume integral of $\nabla \cdot F$ with a flux through the bounding surface. What does that equality say physically?

A. That what accumulates inside equals what crosses the boundary
B. That the volume and surface integrals are two notations for the same integral
C. That flux is conserved for any vector field whatever
D. That divergence must be constant throughout the volume

**Answer:** A. That what accumulates inside equals what crosses the boundary

**Why:** It is conservation written as a theorem. This is why Gauss’s law in integral and differential form are equivalent, one counts sources, the other counts what leaves.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/the-divergence-theorem-equates-a-volume-integral-of-f-with-a-flux

### 5. Order the steps to apply the divergence theorem to compute flux.

**Answer:**

1. Verify S is a closed surface bounding volume V
2. Compute $\nabla \cdot F$
3. Set up ∭_V $\nabla\cdot F$ dV with appropriate coordinates
4. Evaluate the volume integral
5. Result equals the outward flux through S

**Why:** The divergence theorem converts a surface integral to a (often easier) volume integral.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/order-the-steps-to-apply-the-divergence-theorem-to-compute-flux

### 6. The divergence theorem, $\oiint_S \vec{F}\cdot d\vec{S} = \iiint_V \nabla\cdot\vec{F}\,dV$, match each symbol to its physical meaning.

**Answer:**

- $\oiint_S \vec{F}\cdot d\vec{S}$ → Net outflow through the closed boundary
- $\nabla\cdot\vec{F}$ → Local source strength at a point
- $\iiint_V \; dV$ → Sum over every point of the enclosed region
- The theorem itself → Total outflow = total of all interior sources

**Why:** The theorem is conservation bookkeeping: summing every point’s production (divergence) gives exactly what crosses the boundary. Gauss’s law in electromagnetism is this statement with charge as the source.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/the-divergence-theorem-oiints-f-ds-v-cdotf-dv-match-each

### 7. The field $\vec{F} = (x, y, z)$ has constant divergence $\nabla\cdot\vec{F} = 3$. Use the divergence theorem to find its flux out of a cube of volume **8**.

**Answer:** 24 (within ±0.1)

**Why:** Flux $= 3 \times 8 = 24$, no surface parametrization, no six cube faces, one multiplication. Converting hard boundary integrals into easy volume integrals (or vice versa) is exactly what the big theorems are for.

Page: https://tryals.app/practice/physics-i/the-divergence-theorem/the-field-f-x-y-z-has-constant-divergence-cdotf-3-use-the
