If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Multivariable calculus

### Course: Multivariable calculus>Unit 5

Lesson 8: Divergence theorem (articles)

# 3D divergence theorem

Also known as Gauss's theorem, the divergence theorem is a tool for translating between surface integrals and triple integrals.

## Background

Not strictly necessary, but useful for intuition:

## What we're building to

• Setup
• $\mathbf{\text{F}}\left(x,y,z\right)$ is a three-dimensional vector field.
• $V$ is some three-dimensional volume (think of a blob floating in space).
• $S$ is the surface of $V$.
• The divergence theorem relates the divergence of $\mathbf{\text{F}}$ within the volume $V$ to the outward flux of $\mathbf{\text{F}}$ through the surface $S$:
• The intuition here is that divergence measures the outward flow of a fluid at individual points, while the flux measures outward fluid flow from an entire region, so adding up the bits of divergence gives the same value as flux.

## Surface must be closed

In what follows, you will be thinking about a surface in space. But unlike, say, Stokes' theorem, the divergence theorem only applies to closed surfaces, meaning surfaces without a boundary. For example, a hemisphere is not a closed surface, it has a circle as its boundary, so you cannot apply the divergence theorem.
However, if you add on the disk on the bottom of this hemisphere, and consider the disk and the hemisphere to make up a single surface, you now have a closed surfaces whose interior volume is half a ball. In this case, given some vector field, the divergence theorem can be used on this two-part surface and this half ball.
The reason for this is that we need to be able to talk about the three-dimensional volume enclosed by a surface, which doesn't make any sense for open surfaces.

## The intuition

If you understand the intuition behind flux in 3d, triple integrals, and the 2d divergence theorem, you basically already understand the three-dimensional divergence theorem. It's just a matter of fitting these conceptual ideas together.

#### Global view of outward flow: flux

When a three-dimensional vector field $\mathbf{\text{F}}\left(x,y,z\right)$ is thought of as representing a fluid flow, the flux of $\mathbf{\text{F}}$ through a surface $S$ is a measure of how much fluid passes through that surface per unit time. It is measured with the following integral:
${\iint }_{S}\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}\phantom{\rule{0.167em}{0ex}}d\mathrm{\Sigma }$
You can think of this integral as breaking apart the surface into many tiny pieces, where $d\mathrm{\Sigma }$ represents the area of one of these pieces. That little hatted fellow $\stackrel{^}{\mathbf{\text{n}}}$ represents a function that gives a unit normal vector at each point on the surface.
When the dot product $\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}$ is large, it means the fluid is flowing strongly in the same direction as $\stackrel{^}{\mathbf{\text{n}}}$, and hence the fluid is passing the surface rapidly at that point. Notice, this means the flux integral counts fluid flow positively when it goes in the same direction as the unit normal vectors $\stackrel{^}{\mathbf{\text{n}}}$, and negatively when it flows against those vectors.
For this article, think about the case where $S$ is a closed surface, encapsulating some three-dimensional volume $V$. ("Closed" means it has no edges). If $S$ is oriented with outward facing unit normal vectors, the flux of $\mathbf{\text{F}}$ through $S$ measures how quickly fluid is leaving the volume $V$. It's like going to all the doors at the boundary of a region and adding up how much fluid leaves each one while subtracting how much fluid enters each one.
${\iint }_{S}\stackrel{\begin{array}{c}\text{How much fluid}\\ \text{leaves/enters?}\end{array}}{\stackrel{⏞}{\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\underset{\text{Tiny piece of area}}{\underset{⏟}{d\mathrm{\Sigma }}}$

#### Local view of outward flow: Divergence

Divergence, in any dimensions, measures the tendency for fluid to flow away from each point in space. More specifically, if you take some point in space, $\left({x}_{0},{y}_{0},{z}_{0}\right)$, and some tiny volume around that point ${V}_{\text{tiny}}$, the rate at which fluid flowing along the vector field $\mathbf{\text{F}}$ leaves this tiny region will be roughly equal to the following expression:
In other words, divergence gives the outward flow rate per unit volume near a point. The reason it must be multiplied by volume before estimating an actual outward flow rate is that the divergence at a point is a number which doesn't care about the size of the volume you happen to be thinking about around that point. But the outward flow rates for smaller volumes will be smaller simply by virtue of the fact that there is less fluid in them to do the flowing.

#### Add up local view to get a global view

Next, to bring triple integrals into the game, think of the following process:
• Break up a three-dimensional volume $V$ into many tiny pieces (little three-dimensional crumbs).
• Compute the divergence of $\mathbf{\text{F}}$ inside each piece.
• Multiply that value by the volume of the piece.
• Add up what you get.
This will give a sense of the "total outward flow" due to $\mathbf{\text{F}}$ throughout the entire volume $V$. But as I mentioned above, this quantity is also measured by the flux of $\mathbf{\text{F}}$ through the surface $S$ of $V$.
The process outlined above also describes the intuition for a triple integral:
${\iiint }_{V}\stackrel{\text{Divergence}}{\stackrel{⏞}{\mathrm{\nabla }\cdot \mathbf{\text{F}}}}\phantom{\rule{0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\phantom{\rule{-0.167em}{0ex}}\underset{\begin{array}{c}\text{Tiny bit}\\ \text{of volume}\end{array}}{\underset{⏟}{dV}}$
Setting this equal to the flux of $\mathbf{\text{F}}$ through the surface of $V$, we get the divergence theorem:

## Usefulness

Both surface integrals and triple integrals can be very nasty to compute. But the divergence theorem gives a tool for translating back and forth between them, and oftentimes it can help turn a particularly difficult surface integral into an easier volume integral. This is especially effective if the volume $V$ is some familiar shape, like a sphere, and if the divergence turns out to be a simple function.
You can practice with examples of using this theorem in the next article.
It is also a powerful theoretical tool, especially for physics. In electrodynamics, for example, it lets you express various fundamental rules like Gauss's law either in terms of divergence, or in terms of a surface integral. This can be very helpful conceptually. Sometimes a situation is easier to think about locally, e.g. what individual charges at individual points in space are generating an electric field. But other times you want a more global view, perhaps asking how an electric field passes through an entire surface.

## Summary

• The divergence theorem says that when you add up all the little bits of outward flow in a volume using a triple integral of divergence, it gives the total outward flow from that volume, as measured by the flux through its surface.

## Want to join the conversation?

• when is some closed surface cannot divergence?