practicecalculus
Series and multivariable theorems

Divergence Theorem (Gauss's Theorem): Statement and Examples

The divergence theorem: the outward flux of a vector field through a closed surface equals the triple integral of its divergence. Statement and examples.

Series and multivariable theorems Updated 3 min read

At a glance

\iint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E \nabla\cdot\mathbf{F}\,dV
Also called
Gauss's theorem, Ostrogradsky's theorem
Hypotheses
E is a solid region whose boundary S is a closed, piecewise smooth surface oriented outward, and \mathbf{F} has continuous partial derivatives on an open region containing E
Divergence
\nabla\cdot\mathbf{F} = P_x + Q_y + R_z for \mathbf{F} = \langle P, Q, R \rangle
In words
Total outflow through the surface equals the total source strength inside
2D version
The flux form of Green's theorem
Course
Calculus 3
On this page
  1. Statement of the divergence theorem
  2. What the divergence theorem means
  3. Why each hypothesis matters
  4. Worked examples
  5. Common mistakes
  6. Related theorems and guides

The divergence theorem, also called Gauss's theorem, says that the total flux of a vector field out of a closed surface equals the total divergence of the field inside. What flows out through the skin must be produced by sources in the interior.

Statement of the divergence theorem

Let

  1. E be a solid region in space whose boundary S is a closed, piecewise smooth surface,
  2. S be oriented with the outward normal \mathbf{n}, and
  3. \mathbf{F} = \langle P, Q, R \rangle have continuous partial derivatives on an open region containing E.

Then

\iint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E \nabla\cdot\mathbf{F}\,dV, \qquad \nabla\cdot\mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}

Here \iint_S \mathbf{F}\cdot d\mathbf{S} = \iint_S \mathbf{F}\cdot\mathbf{n}\,dS is the outward flux.

What the divergence theorem means

Think of \mathbf{F} as the velocity of a fluid. The divergence at a point is the rate at which fluid is created there per unit volume: positive at a source, negative at a sink. Adding up all the creation inside the solid gives the total amount leaving through its surface. As in Green's theorem, flux across every internal wall between tiny boxes cancels, and only the outer boundary is left.

Why each hypothesis matters

Smoothness inside. The inverse square field \mathbf{F} = \frac{\mathbf{r}}{|\mathbf{r}|^3}, where \mathbf{r} = \langle x, y, z \rangle, has \nabla\cdot\mathbf{F} = 0 everywhere except the origin, where it is undefined. Yet on the unit sphere \mathbf{F}\cdot\mathbf{n} = 1, so the flux is the surface area, 4\pi, not 0. The theorem fails because E contains the singular point. This is exactly Gauss's law: the flux measures the point charge inside.

A closed surface. Flux through an open surface such as a hemisphere is not determined by the divergence alone. Close the surface first.

Outward orientation. Using inward normals flips the sign of the flux.

Worked examples

Example 1: \mathbf{F} = \langle x, y, z \rangle through a sphere of radius R.

Step 1. \nabla\cdot\mathbf{F} = 1 + 1 + 1 = 3.

Step 2. \iiint_E 3\,dV = 3\cdot\frac{4}{3}\pi R^3 = 4\pi R^3.

Check directly. On the sphere, \mathbf{n} = \frac{\mathbf{r}}{R}, so \mathbf{F}\cdot\mathbf{n} = \frac{x^2 + y^2 + z^2}{R} = R. The flux is R times the area 4\pi R^2, which is 4\pi R^3.

Example 2: \mathbf{F} = \langle x^3, y^3, z^3 \rangle through the unit sphere.

\nabla\cdot\mathbf{F} = 3x^2 + 3y^2 + 3z^2 = 3\rho^2 in spherical coordinates. Then

\iiint_E 3\rho^2\,dV = \int_0^{2\pi}\int_0^{\pi}\int_0^1 3\rho^2\cdot\rho^2\sin\varphi\,d\rho\,d\varphi\,d\theta = 3\cdot\frac{1}{5}\cdot 2\cdot 2\pi = \frac{12\pi}{5}

Computing this flux as a surface integral would take far more work.

Example 3: a cube with six faces. Find the outward flux of \mathbf{F} = \langle x^2, yz, z \rangle through the surface of the unit cube [0, 1]^3.

Step 1. \nabla\cdot\mathbf{F} = 2x + z + 1.

Step 2. Integrate over the cube, term by term (each other variable integrates to 1):

\iiint_E (2x + z + 1)\,dV = 1 + \frac{1}{2} + 1 = \frac{5}{2}

One triple integral replaces six separate surface integrals.

Common mistakes

  1. Applying it to an open surface. The theorem needs a closed boundary of a solid.
  2. Missing a singularity. Check that \mathbf{F} is defined and smooth at every point inside, especially the origin.
  3. Confusing divergence with curl. Divergence is a scalar, P_x + Q_y + R_z; curl is a vector and belongs to Stokes' theorem.

The divergence theorem, Stokes' theorem and Green's theorem are all versions of one idea: integrating a derivative over a region equals integrating the original field over the boundary, just like the fundamental theorem of calculus. For the triple integral side, start with double integrals and for vector operations see vectors, dot and cross product.

Practice it now

Stokes' theorem and the Divergence Theorem

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What does the divergence theorem say?

If E is a solid region with closed boundary surface S oriented outward, and \mathbf{F} has continuous partial derivatives on a region containing E, then \iint_S \mathbf{F}\cdot d\mathbf{S} = \iiint_E \nabla\cdot\mathbf{F}\,dV.

When do you use the divergence theorem?

Use it to compute flux through a closed surface such as a sphere, cube or cylinder with caps, especially when the divergence is a simple expression. One triple integral replaces several surface integrals.

Can you use the divergence theorem on an open surface?

Not directly. Add a surface that closes it, such as a flat disk on a hemisphere, apply the theorem to the closed surface, then subtract the flux through the added piece.

What is the difference between the divergence theorem and Stokes' theorem?

The divergence theorem relates flux through a closed surface to divergence in the volume inside. Stokes' theorem relates circulation around a closed curve to the curl flux through a surface bounded by that curve.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.