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.

Main content

## Multivariable calculus

### Course: Multivariable calculus>Unit 5

Lesson 8: Divergence theorem (articles)

# 3D divergence theorem examples

See how to use the 3d divergence theorem to make surface integral problems simpler.

## The divergence theorem (quick recap)

Khan Academy video wrapper
Setup:
• $\mathbf{\text{F}}\left(x,y,z\right)$ is some three-dimensional vector field.
• $V$ is a three-dimensional volume (think of a blob in space).
• $S$ is the surface of $V$.
• $\stackrel{^}{\mathbf{\text{n}}}$ is a function which gives unit normal vectors on the surface of $S$.
Here's what the divergence theorem states:
The intuition here is that both integrals measure the rate at which a fluid flowing along the vector field $\mathbf{\text{F}}$ is exiting the region $V$ (or entering $V$, if the values of both integrals are negative). Triply integrating divergence does this by counting up all the little bits of outward flow of the fluid inside $V$, while taking the flux integral measures this by checking how much is leaving/entering along the boundary of $V$.

## Strategizing

The divergence theorem lets you translate between surface integrals and triple integrals, but this is only useful if one of them is simpler than the other. In each of the following examples, take note of the fact that the volume of the relevant region is simpler to describe than the surface of that region.
In general, when you are faced with a surface integral over a closed surface, consider if it would be easier to integrate over the volume enclosed by that surface. If it is, it's a strong signal that the divergence theorem will come in handy.

## Example 1: Surface integral through a cube.

Problem
Let's say $C$ is a $1×1×1$ cube, situated in space such that one corner is on the origin, one corner is at $\left(1,1,1\right)$, and so that all its edges are parallel to one of the coordinate axes.
Khan Academy video wrapper
Let $S$ represents the surface of this cube, which consists of $6$ square faces, oriented using outward facing normal vectors. Compute the following surface integral:
${\iint }_{S}\left(2y\stackrel{^}{\mathbf{\text{i}}}+3{y}^{2}\stackrel{^}{\mathbf{\text{j}}}+4z\stackrel{^}{\mathbf{\text{k}}}\right)\cdot d\mathrm{\Sigma }$

Solution
Concept check: According to the divergence theorem, which of the following is equal to the surface integral we are asked to compute?
Choose 1 answer:

The cube is a great example of an object whose volume is simpler than its surface. To do this surface integral directly, you would have to address each of the $6$ square faces separately. Furthermore, the vector-valued function we are integrating becomes simpler when we take the divergence, as you are about to see. So using the divergence theorem will be doubly helpful!
Concept check: Compute the divergence of the vector-valued function in the surface integral above.
$\mathrm{\nabla }\cdot \left(2y\stackrel{^}{\mathbf{\text{i}}}+3{y}^{2}\stackrel{^}{\mathbf{\text{j}}}+4z\stackrel{^}{\mathbf{\text{k}}}\right)=$

Concept check: Use the divergence theorem to finish the problem by plugging the divergence you just computed to the triple integral you chose in the question before that:
${\int }_{0}^{1}{\int }_{0}^{1}{\int }_{0}^{1}\mathrm{\nabla }\cdot \left(2y\stackrel{^}{\mathbf{\text{i}}}+3{y}^{2}\stackrel{^}{\mathbf{\text{j}}}+4z\stackrel{^}{\mathbf{\text{k}}}\right)\phantom{\rule{0.278em}{0ex}}dx\phantom{\rule{0.167em}{0ex}}dy\phantom{\rule{0.167em}{0ex}}dz=$

## Example 2: Surface integral through a cylinder

Problem
Let $C$ be a cylinder, whose base is a circle with radius $3$ sitting on the $xy$-plane centered at the origin, and whose height is $5$.
Letting $S$ represent the surface of this cylinder, oriented with outward facing unit normal vectors compute the following surface integral:
${\iint }_{S}\left[\begin{array}{c}{x}^{3}\\ {y}^{3}\\ {x}^{3}+{y}^{3}\end{array}\right]\cdot d\mathrm{\Sigma }$

Solution
As with the previous example, what signals that the divergence theorem might be useful is that the volume of our region is easier to describe than its surface. This is especially true if we anticipate integrating using cylindrical coordinates. And again, the divergence of the relevant function will make it simpler.
Concept check: Compute the divergence of the vector-valued function in the integral above.
$\mathrm{\nabla }\cdot \left[\begin{array}{c}{x}^{3}\\ {y}^{3}\\ {x}^{3}+{y}^{3}\end{array}\right]=$

Concept check: Compute the triple integral of this divergence inside the cylinder $C$ described in the problem. As a reminder, its base is a circle of radius $3$ on the $xy$-plane centered at the origin, and it has height $5$.
${\iiint }_{C}\left(\mathrm{\nabla }\cdot \left[\begin{array}{c}{x}^{3}\\ {y}^{3}\\ {x}^{3}+{y}^{3}\end{array}\right]\right)\phantom{\rule{0.278em}{0ex}}dV=$

## Example 3: Surface area from a volume integral

Problem:
Use the divergence theorem to compute the surface area of a sphere with radius $1$, given the fact that the volume of that sphere is $\frac{4}{3}\pi$.

Solution
This feels a bit different from the previous two examples, doesn't it? To start, there is no vector field in the problem, even though the divergence theorem is all about vector fields!
If you let $S$ describe the surface of the sphere, its surface area will be given by the following as-simple-as-they-come surface integral:
${\iint }_{S}1\phantom{\rule{0.167em}{0ex}}d\mathrm{\Sigma }$
However, this is a surface integral of a scalar-valued function, namely the constant function $f\left(x,y,z\right)=1$, but the divergence theorem applies to surface integrals of a vector field. In other words, the divergence theorem applies to surface integrals that look like this:
${\iint }_{S}\left(\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}\right)d\mathrm{\Sigma }$
Here, $\stackrel{^}{\mathbf{\text{n}}}$ is some function which gives unit normal vectors to $S$, the surface of the sphere. You can turn this into the desired surface area integral by finding a vector-valued function $\mathbf{\text{F}}$ such that $\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}$ always equals $1$.
Concept check: Which of the following definitions of a vector field $\mathbf{\text{F}}$ will ensure the property $\mathbf{\text{F}}\cdot \stackrel{^}{\mathbf{\text{n}}}=1$ at all points on the surface of the sphere?
Choose 1 answer:

Concept check: Using this choice for $\mathbf{\text{F}}$, together with the divergence theorem, which of the following integrals will give the surface area of the unit sphere? Let $B$ represent the volume enclosed by the sphere, also known as the "unit ball".
Choose 1 answer:

Concept check: Which of the following functions gives unit normal vectors to the surface of the unit sphere?
Choose 1 answer:

Concept check: Compute the divergence of this function.
$\mathrm{\nabla }\cdot \stackrel{^}{\mathbf{\text{n}}}=$

Concept check: Finally, given the fact that the volume within the unit sphere is $\frac{4}{3}\pi$, compute the following integral:
${\iiint }_{B}\mathrm{\nabla }\cdot \stackrel{^}{\mathbf{\text{n}}}\phantom{\rule{0.167em}{0ex}}dV=$

## Summary

• The divergence theorem is useful whenever the interior volume of a region is easier to describe than its surface.
• It also helps if the divergence of the relevant vector field turns it into a simpler function.

## Want to join the conversation?

• In example 3 finding the surface of sphere using divergence theorem i.e from ∭(∇⋅n^)dV= ∭3dV . Suppose the radius of the sphere is not 1 say as R i.e. 0≤r≤R
so after evaluating integrals using spherical coordinates 0≤Ø≤π , 0≤ϴ≤2π, 0≤r≤R
∭3dV = 3 ∭r^2 sinØ dØ dϴ dr
= 3 ∭r^2*2 dϴ dr
=3 ∫(r^2)4πdr
= 3*[4π(r^3/3)] in the interval 0 to R
=4πR^3
which is not the surface area of sphere.
In example 3 the radius is 1 so we got 4π.
Am i wrong or did i made a mistake?
(2 votes)
• i know its been a long time but i saw this question just now so here is my answer:
to find surface area we need f vector to be equal to n cap
if radius is R then n CAP(unit vector) would be xi^+yj^+zk^/R
so R would be constant and come out of triple integral and rest of your calculation is correct so
4πR^3 /R will become 4πR^2 which is correct.
(2 votes)
• What happened to the unit normal vector in the 2nd example (cylinder)?? Or is it the matrix dot dΣ the vector?
(2 votes)
• Why did we not have to consider the unit normal vector for examples 1 and 2?
(1 vote)
• I'm still unsure of how in example 3, we went from double integral of (n dot n) to triple integral of div(n). How-come one "n" was left out?
(1 vote)
• if you rechecked what the divergence theorem says it will be clear that we take the triple integral of the divergence of the vector field that was dotted with the unit normal vector in the double integral and not with the dot product itself
(1 vote)