Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 5

Lesson 7: 3D divergence theorem# Divergence theorem example 1

Example of calculating the flux across a surface by using the Divergence Theorem. Created by Sal Khan.

## Want to join the conversation?

- At2:55isn't the height (z) of the region not always z=1-x^2 ? sometimes it is z=1-x^2 and sometimes it is the plane y=2-z?(8 votes)
- Look at the xz plane, then you should notice that the region of xz plane (which is a region limited by -1<x<1 and 0<z<1-x^2) goes up in the y axis direction limited by y=2-z .

I hope this solves your answer because i don't know to write english properly, :P

Saludos-(6 votes)

- At the beginning of the video, shouldn't the surface integral also be dotted with the normal vector of the surface in order to get the flux?(3 votes)
- That is true, but the field is dotted with the vector-differential ds. The surface normal is incorporated in there.

He derives the form used in this video in the following video:

https://www.khanacademy.org/math/multivariable-calculus/surface-integrals/3d_flux/v/vector-representation-of-a-surface-integral(3 votes)

- Because the function (a*x^2 + b*x^4 + c*x^6) is even, shouldn't we multiply it by 2 and change the limit of integration of x to be from 0 to 1? That way we would get a different result from zero... 5/3.(3 votes)
- (a*x^2 + b*x^4 + c*x^6) is not the function that is integrated. It is a function of the form (a*x + b*x^3 + c*x^5) which is odd. Only after the integration we get the even function.(2 votes)

- For triple integrals, how do you know which variable to integrate with respect to first?(2 votes)
- Most of the time, it won't matter, just make sure the last one doesn't end up with variables(4 votes)

- isn't d(xy)/dx=y ? so shouldn't div F be x+y?(1 vote)
- Remember that when you are taking the divergence you are taking the partial of each term with respect to that term's "direction". So you are taking the partial with respect to y of the second term. That gives:

d(xy)/dy = x(3 votes)

- How do I decide if I should use green’s, stoke’s, or divergence?(2 votes)
- Does that triple integral in the divergence theorem count as a volume integral?(1 vote)
- yes. but you are suppose to insert some function inside the integral which is the result of the divergence of F.(2 votes)

- what if the surface is not closed. for instance a hemisphere?(1 vote)
- Then I think Stoke's theorem would be more appropriate, relating the surface integral over an arbitrary shape with the line integral over its "edge" (in lack of the proper word)(1 vote)

- what does mean that the divergence is cero?(1 vote)
- the total flux ofE(x, y,z) = xˆxy− yˆyz2 − zˆxy(0 votes)

## Video transcript

Let's see if we might be able to
make some use of the divergence theorem. So I have this region, this
simple solid right over here. x can go between
negative 1 and 1. z, this kind of arch
part right over here, is going to be a function of x. That's the upper bound on z. The lower bound on z is just 0. And then y could go
anywhere between 0, and then it's bounded
here by this plane, where we can express y as a
function of z. y is 2 minus z along this plane
right over here. And we're given this
crazy vector field. It has natural logs
and tangents in it. And we're asked to evaluate
the surface integral, or actually, I should say
the flux of our vector field across the boundary
of this region, across the surface of this
region right over here. And surface integrals are
messy as is, especially when you have a crazy
vector field like this. But you could imagine
that there might be a way to simplify this, perhaps
using the divergence theorem. The divergence theorem
tells us that the flux across the boundary of
this simple solid region is going to be the same
thing as the triple integral over the volume of
it, or I'll just call it over the region, of
the divergence of F dv, where dv is some combination
of dx, dy, dz. The divergence times
each little cubic volume, infinitesimal cubic
volume, so times dv. So let's see if this
simplifies things a bit. So let's calculate the
divergence of F first. So the divergence
of F is going to be the partial of the x component,
or the partial of the-- you could say the i component or the
x component with respect to x. Well, the derivative of this
with respect to x is just x. The derivative of this
with respect to x, luckily, is just 0. This is a constant
in terms of x. Now let's go over
here, the partial of this with respect to y. The partial of this with
respect to y is just x. And then this is just a
constant in terms of y, so it's just going
to be 0 when you take the derivative
with respect to y. And then, finally, the partial
of this with respect to z, well, this is just a
constant in terms of z. Doesn't change when z changes. So the partial with respect to
z is just going to be 0 here. And so taking the divergence
really, really, really simplified things. The divergence of F
simplified down to 2x. And so now we can
restate the flux across the surface as a
triple integral of 2x. So let me just write 2x here. And let's think
about the ordering. So y can go between 0 and this
plane that is a function of z. So let's write that down. So y is bounded below by 0 and
above by this plane 2 minus z. z is bounded below
by 0 and above by-- you could call them these
parabolas of 1 minus x squared. And then x is bounded
below by negative 1 and bounded above by 1. So negative 1 is less than
or equal to x is less than or equal to 1. And so this is probably a
good order of integration. We can integrate with
respect to y first, and then we'll get
a function of z. Then we can integrate
with respect to z, and we'll get a function of x. And then we can integrate
with respect to x. So let's do it in that order. So first we'll integrate with
respect to y, so we have dy. y is bounded below at 0 and
above by the plane 2 minus z. So this right over here is
a plane y is equal to 0. And this up over here is the
plane y is equal to 2 minus z. Then we can integrate
with respect to z. And z, once again,
is bounded below by 0 and bounded above by these
parabolas, 1 minus x squared. And then, finally, we can
integrate with respect to x. And x is bounded
below by negative 1 and bounded above by 1. So let's do some
integration here. So the first thing, when
we're integrating with respect to x-- sorry, when we're
integrating with respect to y, 2x is just a constant. So this expression
right over here is just going to be 2x
times y, and then we're going to evaluate it
from 0 to 2 minus z. So it's going to be 2x times
2 minus z minus 2x times 0. Well, that second part's
just going to be 0. So this is going to
simplify as-- I'll write it this way--
2x times 2 minus z. And actually, I'll just
leave it like that. And then we're going to
integrate this with respect to z. And that's going to go from
0 to 1 minus x squared, and then we have our dz there. And then after that, we're
going to integrate with respect to x, negative 1 to 1 dx. So let's take the antiderivative
here with respect to z. This you really can
just view as a constant. We can actually even
bring it out front, but I'll leave it there. So this piece right
over here-- I'll do it in z's color--
this piece right over here, see, we can
leave the 2x out front. Actually, I'll leave the 2x
out front of the whole thing. It's going to be 2x times--
so the antiderivative of this with respect to z
is going to be 2z. Antiderivative of this is
negative z squared over 2, and we are going to
evaluate this from 0 to 1 minus x squared. When we evaluate
them at 0, we're just going to get
0 right over here. And so we really
just have to worry about when z is equal
to 1 minus x squared. Did I do that right? Yep. 2z, and then minus
z squared over 2. You take the derivative,
you get negative z. Take the derivative
here, you just get 2. So that's right. So this is going
to be equal to 2x-- let me do that same color-- it's
going to be equal to 2x times-- let me get this right, let me go
into that pink color-- 2x times 2z. Well, z is going to
be 1 minus x squared, so it's going to be
2 minus 2x squared. That was just 2 times that. And then minus-- I'll just
write 1/2 times this quantity squared. So this quantity squared is
going to be 1 minus 2x squared plus x to the fourth. That's just some basic
algebra right over there. And then from that,
you're going to subtract this thing evaluated at 0,
which is just going to be 0. So [? y, you ?] just won't
even think about that. And now we need to
simplify this a little bit. And we are going to get,
if we simplify this, we get 2 minus 2x
squared minus 1/2, and then plus-- so this is
negative 1/2 times negative 2x squared. So it's going to be
positive x squared minus 1/2 x to the fourth. Now, let's see, can
we simplify this part? Let me just make sure we
know what we're doing here. So we have this 2x
right over there. I want to make sure I
got the signs right. Yep, looks like I did. And now let's look at this. So let's see, can I
simplify a little bit? I have 2 minus
1/2, which is 3/2. So I have 3/2. That's that term and that
term take into account. And then I have negative
2x squared plus x squared. So that's just going to
result in negative x squared, if I take that
term and that term. And then I have negative
1/2 x to the fourth, and I'm multiplying
this whole thing by 2x. And so that's going to give us--
we have, let's see, 2x times 3/2. And I want to make sure. I'm doing this
slowly, so I don't make any careless mistakes. The 2's cancel out. You get 3x, and then
2x times negative x squared is negative
2x to the third. And then 2x times
this right over here. The 2 cancels out
with the negative 1/2, you have negative
x to the fifth. So all of this simplifies
to this right over here. So our whole thing simplifies
to an integral with respect to x. x will go
from negative 1 to 1 of this business of 3x
minus 2x to the third minus x to the fifth, and
then we have dx. And now we just take the
antiderivative with respect to x, which is going to be 3/2
x squared minus-- let's see, x to the fourth power--
minus 1/2, because it's going to be 2/4,
x to the fourth. Is that right? Because if you multiply
it, you're going to 2. Yep, x to the third, and then
minus x to the sixth over 6. And it's going to go from 1 to
negative 1 or negative 1 to 1. So when you evaluate
it at 1-- I'll just write it out real fast. So first, when you
evaluate it at 1, you get 3/2 minus 1/2 minus 1/6. And then from that, we are
going to subtract 3/2 minus 1/2 plus 1/6. Or actually, no,
they're actually all going to cancel out. Is that right? Are they all going
to cancel out? Yep, I think that's right. They all cancel out. So it's actually going to be
plus, or I should say minus 1/6 right over here. And then all of
these cancel out. That cancels with that. That cancels with
that because we're subtracting the negative 1/2. And that cancels with that. And so we are
actually left with 0. So after doing all of that
work, this whole thing evaluates to 0,
which was actually kind of a neat simplification. So this whole thing
right over here evaluated, very conveniently,
evaluated to be equal to 0.