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

### Unit 5: Lesson 8

Divergence theorem (articles)

# 2D divergence theorem

This is the analog of Green's theorem, but for divergence instead of curl.

## Background

Not strictly required, but helpful for a deeper understanding:

## What we're building to

• The 2D divergence theorem is to divergence what Green's theorem is to curl. It relates the divergence of a vector field within a region to the flux of that vector field through the boundary of the region.
• Setup:
• start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis is a two-dimensional vector field.
• start color #bc2612, R, end color #bc2612 is some region in the x, y-plane.
• start color #bc2612, C, end color #bc2612 is the boundary of start color #bc2612, R, end color #bc2612.
• start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f is a function which gives outward-facing unit normal vectors to start color #bc2612, C, end color #bc2612.
• The 2D divergence theorem says that the flux of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 through the boundary curve start color #bc2612, C, end color #bc2612 is the same as the double integral of start text, d, i, v, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 over the full region start color #bc2612, R, end color #bc2612.
start underbrace, integral, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, d, s, end underbrace, start subscript, start text, F, l, u, x, space, i, n, t, e, g, r, a, l, end text, end subscript, equals, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start text, d, i, v, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, d, A
• The intuition here is that if start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 represents a fluid flow, the total outward flow rate from start color #bc2612, R, end color #bc2612, as measured by the flux integral, equals the sum over all the little bits of outward flow at each point, as measured by divergence.
• Often the component functions of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis are given as P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis:
$\blueE{\textbf{F}}(x, y) = \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right]$
In this case, once you write both integrals in terms of P and Q, the 2D divergence theorem looks like this:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, P, d, y, minus, Q, d, x, equals, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start fraction, \partial, P, divided by, \partial, x, end fraction, plus, start fraction, \partial, Q, divided by, \partial, y, end fraction
• Written in this form, it's easier to see that the 2D divergence theorem is secretly just saying the same thing as Green's theorem.

## Intuition: Connecting two outward flow measures

#### The global view: Flux

Here, I am assuming you have already learned about two-dimensional flux, and what it represents. Namely, it gives the rate at which a flowing fluid passes through a curve, such as start color #bc2612, C, end color #bc2612. When that curve encloses some region, such as start color #bc2612, R, end color #bc2612, the flux is a measure of the rate at which fluid is exiting that region.
Given a vector field start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis, representing the velocity vector field of the fluid, the flux of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis through start color #bc2612, C, end color #bc2612 is measured with the following integral:
start underbrace, integral, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, d, s, end underbrace, start subscript, start text, F, l, u, x, space, i, n, t, e, g, r, a, l, end text, end subscript
This integral walks over each point on the boundary start color #bc2612, C, end color #bc2612, and picks up the component of the vector from start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 which is in the direction of the outward-facing unit normal vector start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f. The larger that value is, the faster fluid is flowing out of start color #bc2612, R, end color #bc2612 at that point; the more negative it is, the more fluid is flowing in at that point.

#### The local view: Divergence

I am also assuming you have learned about a different measure of "outward flow" in fluid movements: Divergence. The divergence of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis is a function that tells you how much the fluid tends to diverge away from each point left parenthesis, x, comma, y, right parenthesis.
The 2D divergence theorem connects these two ideas:
start underbrace, start overbrace, integral, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, d, s, end overbrace, start superscript, start text, F, l, u, x, space, i, n, t, e, g, r, a, l, end text, end superscript, end underbrace, start subscript, start text, T, o, t, a, l, space, o, u, t, w, a, r, d, space, f, l, o, w, space, f, r, o, m, space, start color #bc2612, R, end color #bc2612, end text, end subscript, equals, start underbrace, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start text, d, i, v, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, d, A, end underbrace, start subscript, start text, S, u, m, space, o, f, space, a, l, l, space, l, i, t, t, l, e, space, b, i, t, s, space, o, f, space, o, u, t, w, a, r, d, space, f, l, o, w, end text, end subscript

## Want a deeper understanding?

This intuition should feel very similar to the one behind Green's theorem, in which the total fluid rotation in a region equals the sum of all the little bits of rotation represented by start text, 2, d, negative, c, u, r, l, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99:
start underbrace, \oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, d, start bold text, r, end bold text, end underbrace, start subscript, start text, T, o, t, a, l, space, f, l, u, i, d, space, r, o, t, a, t, i, o, n, space, a, r, o, u, n, d, space, start color #bc2612, R, end color #bc2612, end text, end subscript, equals, start underbrace, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start text, 2, d, negative, c, u, r, l, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, start color #bc2612, d, A, end color #bc2612, end underbrace, start subscript, start text, S, u, m, space, o, v, e, r, space, a, l, l, space, l, i, t, t, l, e, space, b, i, t, s, space, o, f, space, r, o, t, a, t, i, o, n, end text, end subscript
However, for both Green's theorem and the 2D divergence theorem, talking about adding up little bits of rotation or outward flow is pretty vague. Although each provides a great intuition, they are not exactly rigorous math, are they?
In the article on Green's theorem, I stepped through a more precise line of reasoning for where the double integral of curl comes into play. This involved chopping up the region start color #bc2612, R, end color #bc2612, and seeing how certain line integrals canceled each other out along the slices through start color #bc2612, R, end color #bc2612.
An almost identical line of reasoning can be used to demonstrate the 2D divergence theorem. For anyone wishing to gain deeper insight, a good exercise would be to go back and walk through that same line of reasoning, but replace the line integral \oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, d, start bold text, r, end bold text, which measures flow around start color #bc2612, R, end color #bc2612, with the flux integral \oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, d, s, which measures flow out of start color #bc2612, R, end color #bc2612.
And if this deeper understanding is what you seek, I would also recommend going in armed with knowledge of the formal definition of divergence.

## Proof: Flux integrals + Unit normal vector + Green's theorem

This exercise in deeper understanding is not necessary to prove the 2D divergence theorem. In fact, when you start spelling out how each integral is actually computed, you'll find that this theorem is really just saying the same thing as Green's theorem.
Start by writing out start color #0c7f99, start bold text, F, end bold text, end color #0c7f99 in terms of the component functions P, left parenthesis, x, comma, y, right parenthesis and Q, left parenthesis, x, comma, y, right parenthesis:
$\blueE{\textbf{F}}(x, y) = \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right]$
Applying the formula for a unit normal vector to the flux integral, here's another way to represent that flux integral.
$\displaystyle \int_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}} \,ds = \int_{\redE{C}} \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \cdot \greenE{\hat{\textbf{n}}} \,ds$
Next, let's write out the unit normal vector explicitly.
Concept check: If we think of the vector $\left[\begin{array}{c} dx \\ dy \end{array} \right]$ as representing a tiny step in the counterclockwise direction around the curve start color #bc2612, C, end color #bc2612, with d, s, equals, square root of, d, x, squared, plus, d, y, squared, end square root as its magnitude, which of the following represents an outward facing unit normal vector?

Plugging this into our flux integral and simplifying, here's what we get:
\begin{aligned} \int_{\redE{C}} \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \cdot \greenE{\hat{\textbf{n}}} \,ds &= \int_{\redE{C}} \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right] \cdot \left( \dfrac{1}{\cancel{ds}} \left[ \begin{array}{c} dy \\ -dx \end{array} \right] \right) \,\cancel{ds} \\\\ &= \int_{\redE{C}} P\,dy - Q\,dx \end{aligned}
Written in this form, we can directly apply Green's theorem.
Concept check: Which of the following is Green's theorem, where start color #bc2612, C, end color #bc2612 represents a closed curve encompassing region start color #bc2612, R, end color #bc2612?

Concept check: What do you get when you apply Green's theorem to the flux integral integral, start subscript, start color #bc2612, C, end color #bc2612, end subscript, P, d, y, minus, Q, d, x?

Notice, the expression inside the double integral of the answer to the last question is indeed the divergence of start color #0c7f99, start bold text, F, end bold text, end color #0c7f99:
$\displaystyle \text{div}\,\blueE{\textbf{F}} = \text{div}\, \left[ \begin{array}{c} P(x, y)\\ Q(x, y) \end{array} \right] = \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y}$

## Using the 2D divergence theorem?

When it comes to translating between line integrals and double integrals, the 2D divergence theorem is saying basically the same thing as Green's theorem. So any of the actual computations in an example using this theorem would be indistinguishable from an example using Green's theorem (such as those in this article on Green's theorem examples).
However, the usefulness of learning the 2D divergence theorem is two-fold:
• Conceptual benefit: It's a great way to deepen your understanding of flux, divergence, and Green's theorem.
• Strategic benefit: Sometimes an example where Green's theorem is used lends itself more naturally to a divergence-based description. For example, if the line integral you want to compute begins its life as a flux integral, rather than expanding out this line integral to make it look like integral, P, d, x, plus, Q, d, y and applying Green's theorem, you could recognize immediately that it's the same as doubly integrating divergence.

## Summary

• The 2D divergence theorem relates two-dimensional flux and the double integral of divergence through a region.
start underbrace, integral, start subscript, start color #bc2612, C, end color #bc2612, end subscript, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, dot, start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, d, s, end underbrace, start subscript, start text, T, o, t, a, l, space, o, u, t, w, a, r, d, space, f, l, o, w, space, f, r, o, m, space, start color #bc2612, R, end color #bc2612, end text, end subscript, equals, start underbrace, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, start text, d, i, v, end text, start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, d, A, end underbrace, start subscript, start text, S, u, m, space, o, f, space, a, l, l, space, l, i, t, t, l, e, space, b, i, t, s, space, o, f, space, o, u, t, w, a, r, d, space, f, l, o, w, end text, end subscript
• Often the vector field start color #0c7f99, start bold text, F, end bold text, end color #0c7f99, left parenthesis, x, comma, y, right parenthesis is expressed component-wise:
$\blueE{\textbf{F}}(x, y) = \left[ \begin{array}{c} P(x, y) \\ Q(x, y) \end{array} \right]$
In this case, here's how the 2D divergence theorem looks:
\oint, start subscript, start color #bc2612, C, end color #bc2612, end subscript, P, d, y, minus, Q, d, x, equals, \iint, start subscript, start color #bc2612, R, end color #bc2612, end subscript, left parenthesis, start fraction, \partial, P, divided by, \partial, x, end fraction, plus, start fraction, \partial, Q, divided by, \partial, y, end fraction, right parenthesis, d, A
• In this form, it is easier to see that the 2D divergence theorem really just states the same thing as Green's theorem.