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

Do czego zmierzamy

  • 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:
    • F(x,y)\blueE{\textbf{F}}(x, y) is a two-dimensional vector field.
    • R\redE{R} is some region in the xyxy-plane.
    • C\redE{C} is the boundary of R\redE{R}.
    • n^\greenE{\hat{\textbf{n}}} is a function which gives outward-facing unit normal vectors to C\redE{C}.
  • The 2D divergence theorem says that the flux of F\blueE{\textbf{F}} through the boundary curve C\redE{C} is the same as the double integral of divF\text{div}\,\blueE{\textbf{F}} over the full region R\redE{R}.
    CFn^dsFlux integral=RdivFdA\displaystyle \underbrace{ \int_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}} \,ds }_{\text{Flux integral}} = \iint_{\redE{R}} \text{div}\,\blueE{\textbf{F}}\, dA
  • The intuition here is that if F\blueE{\textbf{F}} represents a fluid flow, the total outward flow rate from R\redE{R}, 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 F(x,y)\blueE{\textbf{F}}(x, y) are given as P(x,y)P(x, y) and Q(x,y)Q(x, y):
    F(x,y)=[P(x,y)Q(x,y)] \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 PP and QQ, the 2D divergence theorem looks like this:
    CPdyQdx=RPx+Qy\displaystyle \oint_\redE{C} P\,dy - Q\,dx = \iint_{\redE{R}} \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y}
  • 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 C\redE{C}. When that curve encloses some region, such as R\redE{R}, the flux is a measure of the rate at which fluid is exiting that region.
Given a vector field F(x,y)\blueE{\textbf{F}}(x, y), representing the velocity vector field of the fluid, the flux of F(x,y)\blueE{\textbf{F}}(x, y) through C\redE{C} is measured with the following integral:
CFn^dsFlux integral\displaystyle \underbrace{ \int_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}} \,ds }_{\text{Flux integral}}
This integral walks over each point on the boundary C\redE{C}, and picks up the component of the vector from F\blueE{\textbf{F}} which is in the direction of the outward-facing unit normal vector n^\greenE{\hat{\textbf{n}}}. The larger that value is, the faster fluid is flowing out of R\redE{R} 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 F(x,y)\blueE{\textbf{F}}(x, y) is a function that tells you how much the fluid tends to diverge away from each point (x,y)(x, y).
The 2D divergence theorem connects these two ideas:
CFn^dsFlux integralTotal outward flow from R=RdivFdASum of all little bits of outward flow\displaystyle \underbrace{ \overbrace{ \int_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}} \,ds }^{\text{Flux integral}} }_{\text{Total outward flow from $\redE{R}$}} = \underbrace{ \iint_{\redE{R}} \text{div}\,\blueE{\textbf{F}}\, dA }_{\text{Sum of all little bits of outward flow}}

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 2d-curlF\text{2d-curl}\,\blueE{\textbf{F}}:
CFdrTotal fluid rotation around R=R2d-curlFdASum over all little bits of rotation\displaystyle \underbrace{ \oint_\redE{C} \blueE{\textbf{F}} \cdot d\textbf{r} }_{\text{Total fluid rotation around $\redE{R}$}} = \underbrace{ \iint_\redE{R} \text{2d-curl}\,\blueE{\textbf{F}} \,\redE{dA} }_{\text{Sum over all little bits of rotation}}
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 R\redE{R}, and seeing how certain line integrals canceled each other out along the slices through R\redE{R}.
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 CFdr\displaystyle \oint_\redE{C} \blueE{\textbf{F}} \cdot d\textbf{r}, which measures flow around R\redE{R}, with the flux integral CFn^ds\displaystyle \oint_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}}\,ds, which measures flow out of R\redE{R}.
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 F\blueE{\textbf{F}} in terms of the component functions P(x,y)P(x, y) and Q(x,y)Q(x, y):
F(x,y)=[P(x,y)Q(x,y)] \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.
CFn^ds=C[P(x,y)Q(x,y)]n^ds\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 [dxdy]\left[\begin{array}{c} dx \\ dy \end{array} \right] as representing a tiny step in the counterclockwise direction around the curve C\redE{C}, with ds=dx2+dy2ds = \sqrt{dx^2 + dy^2} 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:
C[P(x,y)Q(x,y)]n^ds=C[P(x,y)Q(x,y)](1ds[dydx])ds=CPdyQdx\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 C\redE{C} represents a closed curve encompassing region R\redE{R}?
Concept check: What do you get when you apply Green's theorem to the flux integral CPdyQdx\displaystyle \int_{\redE{C}} P\,dy - Q\,dx?
Notice, the expression inside the double integral of the answer to the last question is indeed the divergence of F\blueE{\textbf{F}}:
divF=div[P(x,y)Q(x,y)]=Px+Qy\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 Pdx+Qdy\displaystyle \int P\,dx + Q\,dy and applying Green's theorem, you could recognize immediately that it's the same as doubly integrating divergence.


  • The 2D divergence theorem relates two-dimensional flux and the double integral of divergence through a region.
    CFn^dsTotal outward flow from R=RdivFdASum of all little bits of outward flow\displaystyle \underbrace{ \int_{\redE{C}} \blueE{\textbf{F}} \cdot \greenE{\hat{\textbf{n}}} \,ds }_{\text{Total outward flow from $\redE{R}$}} = \underbrace{ \iint_{\redE{R}} \text{div}\,\blueE{\textbf{F}}\, dA }_{\text{Sum of all little bits of outward flow}}
  • Often the vector field F(x,y)\blueE{\textbf{F}}(x, y) is expressed component-wise:
    F(x,y)=[P(x,y)Q(x,y)] \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:
    CPdyQdx=R(Px+Qy)dA\displaystyle \oint_\redE{C} P\,dy - Q\,dx = \iint_{\redE{R}} \left( \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y} \right) dA
  • In this form, it is easier to see that the 2D divergence theorem really just states the same thing as Green's theorem.