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

Flux in 3D example

After learning about what flux in three dimensions is, here you have the chance to practice with an example.

The steps

In the last article, I talked about how the flux of a flowing fluid through a surface is a measure of how much fluid passes through that surface per unit of time. If that fluid flow is represented with a vector field F(x,y,z), and if S represents the surface itself, the flux is computed with the following surface integral:
The vector-valued function n^(x,y,z) gives the unit normal vector to S. For closed surfaces, you typically choose an outward facing unit normal vector.
In practice, there is quite a lot that goes into solving this integral.
  • Step 1: Rewrite the integral in terms of a parameterization of S, as you would for any surface integral.
  • Step 2: Insert the expression for the unit normal vector n^(x,y,z). It's best to do this before you actually compute the unit normal vector since part of it cancels out with a term from the surface integral.
  • Step 3: Simplify the terms inside the integral.
  • Step 4: Compute the double integral.

The problem

Consider the paraboloid graph defined by the following equation:
Let S be the portion of this paraboloid which sits above the xy-plane:
Whoa, that ended up looking way more like a nuclear warhead than I intended. Ah well, at least it makes clear what surface we're talking about.
For flux integrals, we must specify the orientation of this surface. Let's orient it with outward-facing normal vectors, in the sense that the vectors i^, j^ and k^ are all outward facing from the region under the paraboloid.
Now imagine there is a fluid flowing around in three-dimensional space. Let's say it flows along the vector field defined by the function
Key question: What is the flux of this flowing fluid through the surface S?

Step 1: Rewrite the flux integral using a parameterization

Right now, the surface S has been defined as a graph, subject to a constraint on z.
Graph: z=4x2y2
Constraint: z0
But for computing surface integrals, we need to describe this surface parametrically. Luckily, this conversion is not to hard. You basically let one parameter play the role of x, while the other parameter plays the role of y:
After writing this function, you still need to specify what region of the ts-plane corresponds with our surface S. This requires translating the constraint z0 into a constraint on t and s.
Concept check: What is the constraint on t and s which will ensure that the z-component of v(t,s) is greater than or equal to 0? Write your answer as an inequality.

Since this region is a disk with radius 2, let's name it D2.
Later down the road, we'll expand this fully as a set of bounds for t and s, but while we work on all the innards of the integral it helps to just have a symbolic representation.
Writing our flux surface integral as a double integral in the parameter space, here's what we get:
SFn^dΣ=D2Double integral inflat parameter spaceF(v(t,s))n^(v(t,s))|vt×vs|dAdΣ
If this transition to a double integral in the parameter space seems unfamiliar, consider reviewing the article on surface integrals, or the one on surface area.

Step 2: Insert the expression for a unit normal vector

In a previous article, I talked about how you can find a function which gives the unit normal vector to a surface based on its parameterization v(t,s). Basically, you normalize the cross product of the partial derivatives of v(t,s) (boy is that a mouthful to say):
Now, for those of you who just love computing the magnitude of cross products of partial derivative vectors, hold off for a moment. When we insert this into the flux integral, that magnitude term cancels out:

Step 3: Expand the integrand

Let's start by working out the cross product term:
For reference, this was how I defined v(t,s):
Now compute each partial derivative, then find their cross product.



Concept check: Does the expression for vt×vs that you just found give an outward-facing or inward-facing normal vector?
Choose 1 answer:

Next, write out the term F(v(t,s)) in terms of just t and s. For reference, this is how F and v are defined:

Great! Now we have all the pieces for the innards of our integral.
By taking the dot product of the previous two answers, write the inside of this integral purely in terms of the parameters t and s. It will help the integral computation in the next section if you simplify your answer as much as possible.

Step 4: Compute the integral

Up until this point, we have been writing a little D2 under the double integral to indicate that the region of the ts-plane we will be integrating over is the disk with radius 2. Now, as we turn to computing the integral itself, we need to spell this out into concrete bounds on the parameters t and s.
To do this, draw yourself a picture of D2, and imagine cutting it into vertical stripes:
The value t ranges from 2 to 2. The range for s depends on the value of t, which you can find using the pythagorean theorem.
From the diagram, you can see that s ranges from 4t2 to +4t2. Applying these bounds to our double integral, here's what we get:
From here, there are a few ways you might finish the problem
  1. Painfully: Compute this double integral in full by hand (ugh!).
  2. Pragmatically: Plug this into a calculator, or a computer algebra tool like Wolfram Alpha.
  3. Cleverly: You can recognize that the integrand is an odd function with respect to s. Distribute the s, and notice that all terms either have an s or an s3. This means the inner integral on the portion from 4t2 to 0 will cancel out with the portion from 0 to 4t2. Therefore, the integral as a whole is 0.


A flux integral starts its life looking something like this:
Solving this involves the following four steps:
  • Step 1: Parameterize the surface, and translate this surface integral to a double integral over the parameter space.
  • Step 2: Apply the formula for a unit normal vector.
  • Step 3: Simplify the integrand, which involves two vector-valued partial derivatives, a cross product, and a dot product.
  • Step 4: Compute the double integral (in practice a computer can handle it from here).

Want to join the conversation?

  • blobby green style avatar for user Xingxing Yang
    For the last formula, shouldn't t range from -2 to 2?
    (34 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user James Taylor
    So the integral is 0, but what does that mean?Mass of whatever within stays constant?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Alexander Wu
      Flux out from the surface is zero. If the vector field is really velocity of fluid (I think it is in this problem), then the mass of fluid going into the "region" is exactly equal to the mass of fluid going out. However, we cannot assume that the mass of fluid inside the region is unchanging yet. I mean, what region? The surface is not closed. There is a "hole" on the bottom of the parabolic surface. If you just seal the "hole" with a flat plane, then, no, you cannot be sure yet that mass inside is constant. There might be net fluid escaping or entering through that plane. To make sure, you would need to compute the flux of fluid through that region of plane. If it also equals zero, then yes, the mass of fluid inside is constant.

      But if the vector field doesn't represent a fluid's velocity, it might mean something else. It might be heat transfer, and then there is no net heat entering from the sides (we still don't know about the bottom). It might be an electric field, and then perhaps there is no net charge inside the parabola.
      (17 votes)
  • aqualine ultimate style avatar for user Jenna Varcak
    Would you be able to use cylindrical coordinates in order to make it a nicer integral? And if so where/when would you switch coordinate systems?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user luminasea
      I parameterized using r and angle theta where r ranged from 0 to 2 and theta ranged from 0 to 2pi setting x = rcos theta, y = r sin theta z= 4-r^2 and also got a flux of 0. Perhaps just coincidental? Would appreciate comments from anyone more knowledgeable than I.
      (5 votes)
  • blobby green style avatar for user kennygoldman
    Why did we have to parameterize this using s & t? wouldn't using x & y give us the same outcome?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Samuel Laferriere
      Parameterizing means writing x,y, and z as functions of s and t.
      This means we will have the three functions x(s,t), y(s,t) and z(s,t).
      If we used x&y instead of s&t, we would have x(x,y) and y(x,y) which doesn't make sense.
      Of course we will usually be sloppy and just parameterize wrt x&y, but this doesn't make sense "formally", ie. you couldn't program a computer to understand this.
      (7 votes)
  • leaf green style avatar for user Alexander Wu
    Is there some better way to find out where the normal vector points? Other than by plugging in some value. Sometimes we might not know what the surface looks like so we cannot just observe where the vector points and say, "Oh, that's outward." Also, we might be solving abstractly. So maybe v(t,s) = [t, s, a - b t^2 - b t^2], and we want to see how flux changes as we vary a and b. In this case, as a and b change, the directions of everything change, so a plug-in at one value doesn't work for a plug-in for another. We need a systematic procedure to find which way the vector really points (and maybe the expression we get using this procedure contains a and b, so we can generalize without having to get an absolute answer).

    As for this problem, I did find a way around plugging in values, with intuition. As we see, t is equivalent to x, and s to y. We used ∂v/∂t × ∂v/∂s, so t cross s is x cross y which is in the positive z direction. But positive z direction is out of the parabola. So we are pointing out.

    Of course, this intuitive approach is quite weak, with no "proof." And it probably doesn't work for many other problems. But obviously there must be one that does. What is it?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Ruimin Zhang
    For the last step, would both s and t be from -2 to 2 since we are considering the parametric plane T mentioned in the surface integral where t and s form a square in t-s plane?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user festavarian2
    Why does the S-bound depend on T? Why can't the S-bounds be from -2 to +2?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user ricoruotongjia
    Anyone tried polar coordinates? I set x = r*cos(t), y - r* sin(t), z = z= 4-r^2. And the normal vector I got was <2r^2*cos(t), 2r^2*sin(t), r>. At the point (0, 0, 4), the normal vector is (0, 0, 0). By comparison, the normal vector above, which is < 2s, 2t, 1>, at the point (0, 0, 4), the normal vector is (0, 0, 1).

    I know there is a factor r and when we normalize it, it will be gone. But I still can't explain why the normal vectors are different.

    Thank you for your explanation!
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leafers sapling style avatar for user Mohammed Ghaïth
    Why didn't we use polar coordinates?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user festavarian2
    Why are we going through this whole UNIT normal business, when all we need for the flux equation is the AREA vector which IS a normal vector and is simply the the cross products of the partial derivatives times dA?
    (1 vote)
    Default Khan Academy avatar avatar for user