Lab #4 Multiple Integrals and the Divergence Theorem MA 1024 P B00

Goals:

By your finish of this lab, you should have seen

Introduction

We are primarily interested (until the last part of the lab) in triple integrals of scalar functions. This means we are talking about

 

where f is a function of x,y,z , dv means a differential element of volume, and D is a region in three dimensional space. From conference, we know that one interpretation may be thinking of f as density (mass per unit volume), and the integral as adding up the total mass in the region D.

Actually Evaluating Triple Integrals

Iterated Integrals refer to integrating with respect to one variable at a time until the entire region D has been integrated over. If the order of integration we pick is z,y, and x, then dv = dz dy dx the result will be the same as our integral, or,

 

Well�.the expression on the left was much simpler! But the one on the right can have actually lead to a value for the integral. The steps to doing this are:

 

Alot of work! Let's see where Maple can make it more efficient and accurate ( a goal of any software package):

But you still play a major role. You have to

Example 1

Suppose that f(x,y,z) = x2+y2z2 + 2 and D is the region bounded by the paraboloid z = 100 - 4x2 - 4y2 and z = 64.

step 1: what does it look like? If you didn't know anything about paraboloids, then you could use the plot3d function as follows: (try this!)

so we have a paraboloid opening down, a plane on the bottom side and an intersection which looks like it's a circle. What radius is the circle? That's found from the intersection of the paraboloid and plane, or

which is equivalent to x2 +y2 = 9, so a circle of radius 3. Let's suppose you didn't see that on paper and wanted Maple to do it for you. Then you are only doing a 2 dimensional graph, but not of a function. The appropriate tool is implicitplot. It would be used in this problem as:

with the remark that the range on x and y is a bit of a guess as you don't (we assume) know what it looks like yet, so how could you know the range of points it lies in? If you don't get all the curve, then you make the range of values bigger.

So, either way we know our region of integration D is a paraboloid cut by the z = 64 plane with projection S onto the x-y plane of a circle of radius 3 centered at the origin. This provides enough information to set up the limits of the triple integral:

 

 

 

 

That was the hard part. Let's see if we can get Maple to do the rest for us (lots of antidifferentiation and algebra, also lots of opportunity for mistakes).

Integration: Let's do this one step at a time. This is for two reasons. First, it makes it simpler to look at if only one integral is being done. Secondly, if we make a mistake, it makes it easier to find and debug it rather than if we have crammed three integrals together. We may use the variable names res1,res2 and res3 for "result". Also this is analogous to how one would do it on paper:

One integral at a time. (try these !)

>res1:=int(x^2+y^2*z^2+2,z=64..100-4*x^2-4*y^2);

>res2:=int(res1,y=-sqrt(9-x^2)..sqrt(9-x^2));

>res3:=int(res2,x=-3..3);

res3 := 6536619/5*Pi

or, in decimal format,

>evalf(res3);

4.107 x 106

 

While this did not take alot of typing to enter, as you can see when you run the commands, Maple did alot of calculus for us!! While we could have done that calculus on paper, the chances of making an error are quite high, and the time spent would be substantial.

Earlier we said there is always a decision about coordinate systems. We did not discuss that, but the problem really should have been done in polar - cylindrical coorinates due to the circular symmetry. Using x = rcos(theta) and y = r sin(theta) the integral would have been set up as:

which would be integrated in Maple with the commands:

 

>res4:=int(r^2*cos(theta)^2+r^2*sin(theta)^2*z^2+2,z=64..100-4*r^2);

>res5:= res5:=int(res4*r,r=0..3); (note we had to multiply by r at this step! - due to converstion to polar coordinates)

>res6:= int(res5,theta=0..2*Pi);

res6 := 6536619/5*Pi

Your turn...

Consider the 45 degree cone z2 = x2 + y2 z>0

problem 1: find the volume if cut by the plane z = 16 using Maple in both Cartesian and Cylindrical coordinates

problem 2: find the volume if the same cone is cut by the plane z=y/2+10. What is the shape of the top of the cone after it is cut by the plane? Do this problem in cartesian only. Make sure and get the region in the x-y plane (S) correct!

problem 3: Consider the elliptic paraboloid z = 100 - 4x2 - 25y2 with z >0. Find its volume using cartesian coordinates. Why is it called "elliptic"? Why are cartesian coordinates appropriate but polar/cylindrical not?

problem 4: Consider the region bounded by the closed surface

x2/25 + y2/16+ z2/49 = 1

step 1: carefully describe it, providing as many details as you can

step2: find its volume using triple integration

now, based on your work from the first two steps, what can you say about the graph and volume of the equation

x2/a2 + y2/b2+ z2/c2 = 1 ?

Part Two The Divergence Theorem

This theorem relates the surface integral of a vector field over a closed surface to the volume (triple) integral of the divergence of that vector field. You have already seen an example of this in physics when you studied Gauss' Flux Theorem, which related the flux through a closed surface to the total charge contained inside the surface. This is a mathematical generalization of that theorem. Specifically it states that

where the integral on the left is a double integral over the closed surface G and the integral on the right is a triple integral over the inside of the region G, denoted by D.

OK - so what is this upside down triangle? The same one we have been using for curls and gradients. It is a three dimensional vector whose components are shown by

and is often called the "del operator" - it is a three dimensional version of the derivative in calculus one. If you multiply it by a scalar function, you get the gradient of it. If you do the cross product of it with a vector field, you get the curl of that vector field. Here, if you do the dot product of it with a vector field, you get the divergence of that vector field. The meaning of that will be explained shortly.

First, let's make sure we can compute divergence correctly. Suppose that

F(x,y,z) = (x2+3y)i + (x+8y+ 3z)j + (x + 7z)k

then by hand, using the definition, its divergence would be the scalar quantity 2x +8+ 7 = 2x +15 = div F

In Maple, one would first open the linalg library and then issue commands such as:

>F:=[ x2+3y, x+8y+ 3z, x + 7z]

>diverge(F,[x,y,z]);

2x +15

Let's try out the Divergence Theorem. Suppose our surface is the cylinder defined by

x2 + y2 = 25, z=0 and z = 10

(what does this look like?)

"trying out the Divergence Theorem" really means doing both the surface and volume integrals and showing you get the same thing.

Surface Integral:

The surface here really consists of three parts: the top, sides and bottom. So (sadly) we have to do three integrals and add up the results.

top: here, the normal vector n = k. Also z = 10, so the vector field F becomes

F(x,y,10) = (x2+3y)i + (x+8y+ 30)j + (x + 70)k

and

so the surface integral is

where S is the circle in the x-y plane with radius 5 centered at the origin. This integral is easily shown to be 1750Pi (polar coordinates help!).

bottom: here it is important to note the unit normal to the surface is n = -k. Why the negative? because the normal is supposed to point out from the surface.

Here, F(x,y,0) = (x2+3y)i + (x+8y)j + (x )k

and F dot n = -x.

The surface integral is then easily found to be 0 by again integrating over S, the same circle used for the top.

Side:

Here the side is a level surface of the function g(x,y,z) = x2 + y2 whose gradient is 2x i + 2yj. A unit normal to this surface at any point (x,y,z) on it is thus given by

n = x/5i + y/5 j (why?)

and so F dot n = (x2+3y)(x/5) + (x+8y+ 3z)(y/5) + (x + 7z)(0)

= (1/5)(x3 + 4xy +8y2 + 3yz)

to do the integral, it is best done in cylindrical coordinates where r=5, theta goes from 0 to 2Pi and z goes from 0 to 10 (remember we are on the side of the cylinder). Thus x=5 cos(theta), y = 5sin(theta) . Also dS = 5dtheta dz on this surface. Thus the surface integral becomes

which integrates to 2000Pi (the nonzero part from the 200sin2 term).

Thus the total surface integral is 1750Pi + 0 + 2000Pi = 3750Pi

Wow! what alot of work! Let's consider instead doing a

Volume Integral:

The Divergence Theorem gives us an alternative way to get the result. We can integrate instead the divergence of F, which we computed to be div F =2x+15, over the inside of the cylinder - a triple integral. This means the limits on z are 0 to 10, and x and y come from the circle of radius 5 centered at the origin. Changing to polar (cylindrical), this amounts to doing:

 

which can be easily done by hand or Maple and comes out to 3750Pi, as it should. But it took alot less work, even having Maple as a tool to help!

Having done this, if F had been an electric field, Gauss' Flux Theorem would have told us that the charge enclosed was equal to 1/(4Pi k) times the surface integral of the electric field (usually denoted by E). If we are using units of Newtons, Meters and Coulombs, then 1/(4Pi k) = 8.85 x 10-12 C2/Nm2 so we would have a total charge enclosed of

8.85 x 10-12 x 3750Pi = 1.0426 x 10-9 C

Discussion of the Interpretation of Divergence

In this course, we are trying to relate calculus to physics when possible. At this point, it is a good idea to ask what the physical interpretation of divergence of a vector field is. It is certainly not hard to compute, but we have not interpreted it at all. For now, consider that:

 

Putting all of this together, we may interpret div F (in the case where F is the electric field E ), as indicating the amount of charge at a point (x,y,z) in space times 1/epsilon0 (1/e 0)

Problem: take F to be the electric field due to a single, charged particle (see Physics 1121 text or notes or memory) and compute its divergence. What do you get? why does this make sense? (this is probably quicker done by hand but you can certainly use Maple).

Exercises:

In doing these, it is suggested that one partner do the surface integral in each problem and the other do the volume integral. You might want to switch after each problem. Also, please use your judgement as to what you use Maple for and what you do by hand, picking whatever is easiest.

note: In the write up of the lab, in the results section, you should not only have the value you got for the integral, but the actual integrals, set up with all limits showing, that you used for both the surface and volume integrals.

1). F(x,y,z) = x i + yj + zk and D to be a cube with vertices at (1,0,1),

(-1,0,1), (1,0,-1), (-1,0,-1), (1,1,1), (1,-1,1), (1,1,-1), and (-1,1,-1). Verify that the Divergence Theorem holds and find the charge contained in D.

2). F(x,y,z) = x i + yj + zk and D is the sphere of radius 2 centered at the origin. Verify that the Divergence Theorem holds and find the charge contained in D (question: when you have finished the problem, does it make any difference where the sphere is located?)

3). Suppose D is a sphere of radius 3 centered at the origin. Suppose the field is given by

F(x,y,z) = (2x + ey) i + (lnx - 2y)j + (cos(xy) +4z)k

what is the easiest way to compute the flux through the surface of D? What is that value?

4). If F(x,y,z) = x i + y2 j + zk and D is the solid parabolic dish defined by

verify the Divergence Theorem and find the charge contained in D.

 

 

Discussion

Compare the Fundamental Theorem of Calculus, Part 5 of the Theorem on Path Independence of Line Integrals, and the Divergence Theorem. They all have something in common. Discuss this.