Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of...

36
Name: Score: Solution Midterm All questions are worth 6 points. Maximum score: 30. 1. Evaluate E (x 3 + xy 2 ) dx dy dz where E is the solid in the first octant that lies beneath the paraboloid z =1 - x 2 - y 2 . Solution . I = E (x 3 + xy 2 ) dx dy dz = D z=1x 2 y 2 z=0 (x 3 + xy 2 ) dz dx dy, where D is the region in the XY -plane bounded by x 2 + y 2 = 1, x 0 and y 0. Then, using cylindrical coordinates, we have D z=1x 2 y 2 z=0 (x 3 + xy 2 ) dz dx dy = π 2 0 1 0 1r 2 0 (r 3 cos θ)r dz dr dθ = π 2 0 1 0 r 4 cos θ(1 - r 2 ) dr dθ = π 2 0 cos θ r 5 5 - r 7 7 1 0 = 1 5 - 1 7 sin θ π 2 0 = 2 35 . 2. Let F (x, y, z )=(z 3 +2xy, x 2 , 3xz 2 ) be a vector field in R 3 . Compute the line integral Γ F · ds, where Γ is the square with vertices (±1, ±1, 0) oriented in the counterclockwise direction. Solution . Let us start at the point (1, -1, 0) and continue in the counterclockwise direction. A parametrization of Γ is given by α 1 (t): x(t)=1 y(t)= -1+2t z (t)=0 α 2 (t): x(t)=1 - 2t y(t)=1 z (t)=0 α 3 (t): x(t)= -1 y(t)=1 - 2t z (t)=0 α 4 (t): x(t)= -1+2t y(t)= -1 z (t)=0 , where 0 t 1 and α 1 corresponds to the segment joining (1, -1, 0) and (1, 1, 0), α 1 corresponds to the segment joining (1, 1, 0) and (-1, 1, 0) and so on. Now, we have Γ F · ds = 1 0 F ( α 1 (t)) · α 1 (t)dt + 1 0 F ( α 2 (t)) · α 2 (t)dt + 1 0 F ( α 3 (t)) · α 3 (t)dt + 1 0 F ( α 4 (t)) · α 4 (t)dt

Transcript of Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of...

Page 1: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

Name:

Score:

Solution Midterm

All questions are worth 6 points. Maximum score: 30.

1. Evaluate

∫ ∫ ∫

E(x3 + xy2) dx dy dz where E is the solid in the first octant that lies beneath the

paraboloid z = 1 − x2 − y2.

Solution .

I =

∫ ∫ ∫

E(x3 + xy2) dx dy dz =

∫ ∫

D

(

∫ z=1−x2−y2

z=0(x3 + xy2) dz

)

dx dy,

where D is the region in the XY -plane bounded by x2 + y2 = 1, x ≥ 0 and y ≥ 0. Then, usingcylindrical coordinates, we have

∫ ∫

D

(

∫ z=1−x2−y2

z=0(x3 + xy2) dz

)

dx dy =

∫ π

2

0

∫ 1

0

∫ 1−r2

0(r3 cos θ)r dz dr dθ

=

∫ π

2

0

∫ 1

0r4 cos θ(1 − r2) dr dθ

=

∫ π

2

0cos θ

(

r5

5− r7

7

)∣

1

0

=

(

1

5− 1

7

)

sin θ

π

2

0

=2

35.

2. Let ~F (x, y, z) = (z3 + 2xy, x2, 3xz2) be a vector field in R3. Compute the line integral

Γ

~F · d~s,

where Γ is the square with vertices (±1,±1, 0) oriented in the counterclockwise direction.

Solution . Let us start at the point (1,−1, 0) and continue in the counterclockwise direction. Aparametrization of Γ is given by

~α1(t) :

x(t) = 1y(t) = −1 + 2t

z(t) = 0~α2(t) :

x(t) = 1 − 2t

y(t) = 1z(t) = 0

~α3(t) :

x(t) = −1y(t) = 1 − 2t

z(t) = 0~α4(t) :

x(t) = −1 + 2t

y(t) = −1z(t) = 0

,

where 0 ≤ t ≤ 1 and ~α1 corresponds to the segment joining (1,−1, 0) and (1, 1, 0), ~α1 corresponds tothe segment joining (1, 1, 0) and (−1, 1, 0) and so on. Now, we have

Γ

~F ·d~s =

∫ 1

0

~F ( ~α1(t))· ~α1′(t)dt+

∫ 1

0

~F ( ~α2(t))· ~α2′(t)dt+

∫ 1

0

~F ( ~α3(t))· ~α3′(t)dt+

∫ 1

0

~F ( ~α4(t))· ~α4′(t)dt

Page 2: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

After the corresponding substitutions and simplifications, we obtain

Γ

~F · d~s =

∫ 1

02 dt +

∫ 1

0− 4(1 − 2t) dt +

∫ 1

0− 2 dt +

∫ 1

0− 4(−1 + 2t) dt = 0.

3. Let D be the region bounded by the x = 1, y = 0 and y = x. Is the integral

∫ ∫

Dxye−(x2+y2) dx dy

convergent?

Solution . There are three possible regions delimited by x = 1, y = 0 and y = x, but onlyone is actually bounded (in the sense that it can be put inside a rectangle). The other two areunbounded. On the other hand, the question asks for convergence. Usually, we ask for convergencewhen the integral we deal with is improper. There is no problem with the integrand xye−(x2+y2); itis continuous everywhere on the plane, which leads us to think that for the integral to be improper,the domain has to be unbounded. When I posed this question, the domain I had in mind was theunbounded region delimited by the equations above with x → ∞. However, if you worked over thebounded region, it is all right too. (In any case, an integral is convergent if the result is a numberand divergent otherwise.) If the domain is bounded, the region is a triangle. Without doing

any computation we can immediately conclude that the integral is convergent since the domainis compact (closed and bounded) and the integrand is continuous over the domain. You cancome to this conclusion by using, for instance, the mean value inequality. But we can go further

and actually do the computation. After all, it is not a hard task since the domain is a triangle andthe integrand can be expressed as a product of two functions, one depending on x and the other oneon y. Check that the answer in this case is 1

8 − 14e−1 + 1

8e−2. For the unbounded domain I had inmind, here is the computation,

∫ ∫

Dxye−(x2+y2) dx dy = limb→∞

∫ b

1

∫ x

0xye−(x2+y2) dydx

= limb→∞

∫ b

1xe−x2

[

−1

2e−y2

x

0

]

dx

= limb→∞

(

1

2

∫ b

1xe−x2

dx − 1

2

∫ b

1xe−2x2

dx

)

= limb→∞

[

1

4(e−1 − e−b2) +

1

8(e−2b2 − e−2)

]

=1

4e−1 − 1

8e−2.

This is a number, therefore the integral

∫ ∫

Dxye−(x2+y2) dx dy is convergent. �

4. Suppose you have a rectangular region. How does a generic linear map transforms this region?

Solution . To determine how a generic linear map acts on a region, it is enough to know how ittransforms its boundary. A generic linear map takes lines into lines (prove this). Therefore, ageneric linear map transforms a rectangular region into a parallelogram. �

5. Evaluate

∫ ∫ ∫

U

x2 dx dy dz, where U is the solid bounded by y2 + z2 = 4ax, y2 = ax and x = 3a.

Assume that a is a positive constant. Hint: There are two possible solids, one is convex and theother one is not. We analyzed the non-convex solid in class. Work out the convex case.

Page 3: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

Solution . We have

U = {(x, y, z) ∈ R3 | −

4ax − y2 ≤ z ≤√

4ax − y2, −√

ax ≤ y ≤√

ax, 0 ≤ x ≤ 3a}

Then∫ ∫ ∫

U

x2 dx dy dz =

∫ 3a

0

√ax

−√

ax

√4ax−y2

−√

4ax−y2

x2 dz dy dx

=

∫ 3a

0

√ax

−√

ax

2x2√

4ax − y2 dy dx

=

∫ 3a

0

6√

3a + 4πa

3x3 dx = 27a5

(

3√

3 + 2π

2

)

.

Page 4: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

Math 23B, Multivariable Calculus IISummer 2004, Jose Agapito

Final

Name: Solution

All 5 questions and the bonus problemmust be answered on this exam using thebacks of the sheets if necessary.Show all your work.

Do your best!! ⌣

Presentation 2 /21 8 /82 7 /73 8 /84 7 /75 8 /8

Bonus 5 /5Total 40 + 5 /40+5

1. (8 points) For each of the questions below, indicate if the statement is true or false. Briefly justifyyour answer. Each correct answer is worth 1 point.

a F

b T

c T

d F

e T

f F

g F

h T

(a) The flux of a tangent vector field across the sphere x2 + y2 + z2 = a2 is positive.

False. A vector field ~F tangent to the sphere S : x2 + y2 + z2 = a2 is perpendicular to thenormal vector field ~n representing the orientation of the sphere; namely, ~F ·~n = 0 which implies∫ ∫

S

~F · d~S =

∫ ∫

S

~F · ~n dS = 0.

(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow ofthe vector field per unit volume at that point.

True. By definition, the divergence of a vector field ~F at a point p is

div ~F (p) = limvol→0

flux of ~F across S

volume of S,

where S is a sphere centered at p contained in the domain of ~F .

(c) Let ~a = (a1, a2, a3) be a constant vector and ~F = ~a × ~r, where ~r is the usual position vector(x, y, z). Then ~F is conservative.

True. The vector field ~F = ~a × ~r = (a2z − a3y, a3x − a1z, a1y − a2x) has curl ∇ × ~F =(a1 + a1, a2 + a2, a3 + a3) = 2(a1, a2, a3). Therefore, ~F is not conservative.

Page 5: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

(d) There is a vector field ~F such that curl ~F = (x2, z, y).

False. We have div (curl ~F ) = div (x2, z, y) = 2x 6= 0. Recall that the divergence of the curl ofany vector field is always zero.

(e) The Jacobian of the transformation x =ρ

bcsin ϕ cos θ, y =

ρ

acsin ϕ sin θ, z =

ρ

abcos ϕ is

∂(x, y, z)

∂(ρ, θ, ϕ)= − ρ2

a2b2c2sin ϕ.

True. We have

∂(x, y, z)

∂(ρ, θ, ϕ)=

sin ϕ cos θbc

− ρbc

sinϕ sin θ ρbc

cos ϕ cos θ

sin ϕ sin θac

ρac

sinϕ cos θ ρac

cos ϕ sin θ

cos ϕab

0 − ρab

sin ϕ

= − ρ2

a2b2c2sin ϕ

(f) Let D be a y-simple (type I) region in R2; namely, D = {(x, y) | a ≤ x ≤ b, φ1(x) ≤ y ≤ φ2(x)}.

Then

∫ ∫

D

f(x)g(y) dx dy =

(∫ b

a

f(x) dx

)

(

∫ φ2(b)

φ1(a)g(y) dy

)

False. See Lecture notes from Week #2, Wednesday.

(g) Let D be a simple region in R2 and let F = (P, Q) be an arbitrary vector field of class C1 in

R2. Then the area of D is equal to

1

2

∂D

Pdy − Qdx.

False. Only when ~F = (P, Q) = (x, y) we have Area(D) =1

2

∂D

Pdy − Qdx.

(h) The area of the ellipse x2 + y2/4 = 1 is given by the iterated integral

∫ 1

−1

∫ 2√

1−x2

−2√

1−x2

dy dx.

True. Since y2 = 4(1−x2), we conclude that the integration above is the right set-up to get the

area of the ellipse.

2. (7 points) Prove that the surface area of a sphere of radius R centered at (0, 0, 0) is 4πR2. Show indetail your computations.

See question 1 from Quiz #3.

3. (8 points) Evaluate

∫ ∫

S

~F · d~S, where F (x, y, z) = ~i +~j + z(x2 + y2)~k and S is the surface of the

cylinder x2 + y2 ≤ 1, 0 ≤ z ≤ 1 including the top and the bottom.

I will show two ways of doing the computation.

First way. The vector field ~F = (1, 1, z(x2 + y2)) is C1 everywhere in R3. We can use Gauss’

theorem without any problem. Let B denote the solid cylinder whose boundary ∂B is S. We have

∫ ∫

S

~F · d~S =

∫ ∫ ∫

B

div ~F dV =

∫ ∫ ∫

B

(x2 + y2) dV =

∫ ∫

D

∫ 1

0(x2 + y2) dz dx dy,

Page 6: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

where D = {(x, y) ∈ R2 |x2 + y2 ≤ 1}. Then

∫ ∫

S

~F · d~S =

∫ ∫

D

(x2 + y2) dx dy.

It is convenient to use polar coordinates at this point. We have

∫ ∫

D

(x2 + y2) dx dy =

∫ 2π

0

∫ 1

0

r2

∂(x, y)

∂(r, θ)

dr dθ =

∫ 2π

0

∫ 1

0

r2 r dr dθ =π

2.

Second way. We also have∫ ∫

S

~F · d~S =

∫ ∫

side

~F · d~S +

∫ ∫

top

~F · d~S +

∫ ∫

bottom

~F · d~S,

where side, top and bottom are the three obvious parts of S. Now, providing S with the outwardorientation, the lateral side of the cylinder has normal vector ~n1 = (x, y, 0), the top part has normalvector ~n2 = (0, 0, 1) and the bottom part normal vector ~n3 = (0, 0,−1). Thus,

∫ ∫

S

~F · d~S =

∫ ∫

side

~F · d~S +

∫ ∫

top

~F · d~S +

∫ ∫

bottom

~F · d~S

=

∫ ∫

side

~F · ~n1 dS +

∫ ∫

top

~F · ~n2 dS +

∫ ∫

bottom

~F · ~n3 dS

=

∫ ∫

side

(x + y) dS +

∫ ∫

top

1(x2 + y2) dS +

∫ ∫

bottom

− 0(x2 + y2) dS

=

∫ 2π

0

∫ 1

0cos θ + sin θ) dz dθ +

∫ 2π

0

∫ 1

0r2 r dr dθ + 0

= 0 +π

2=

π

2.

4. (a) (3 points) Let f(x, y, z) = 3xyez2

and let ~c(t) = (3 cos3 t, sin2 t, et), with 0 ≤ t ≤ π. Evaluate∫

c

∇f · d~s.

By the fundamental theorem of line integrals,∫

c

∇f · d~s = f(~c(π)) − f(~c(0)) = f(−3, 0, eπ) − f(3, 0, 1) = 0 − 0 = 0.

(b) (4 points) Evaluate

∫ ∫

D

sin(x2 + y2) dx dy, where D is the region in the first quadrant lying

between the arcs of the circles x2 + y2 = π2 and x2 + y2 = π.

It is convenient to use polar coordinates, with√

π/2 ≤ r ≤ √π and 0 ≤ θ ≤ π/2. We have

∫ ∫

D

sin(x2 + y2) dx dy =

∫ π

2

0

√π

√π

2

sin(r2) r dr dθ =π

2

(

−cos(r2)

2

)∣

√π

√π

2

4.

Page 7: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

5. (8 points) Is there a function h(x, y, z) such that the vector field ~F = (3x2y2z + z, 2x3yz, h(x, y, z))is conservative? If so, then find one such h.

If ~F is conservative, then ~F = ∇f for some function f . Therefore,

∂f

∂x= 3x2y2z + z, (1)

∂f

∂y= 2x3yz, (2)

∂f

∂z= h(x, y, z). (3)

We integrate (1) with respect to x and get

f(x, y, z) = x3y2z + xz + g(y, z), (4)

for some function g which does not depend on x. Now, we differentiate (4) with respect to y andcompare with (2). We have

∂f

∂y= 2x3yz +

∂g

∂y(y, z) = 2x3yz.

Then∂g

∂y(y, z) = 0, which implies that g does not depend on y either. Thus, g = g(z) and

f(x, y, z) = x3y2z + xz + g(z). (5)

Finally, we differentiate (5) with respect to z and compare with (3). We have

∂f

∂z(x, y, z) = x3y2 + x +

d

dzg(z) = h(x, y, z).

Therefore, we can choose g(z) ≡ 0 (or any constant) and set h(x, y, z) = x3y2 + x. This function h

makes ~F a conservative vector field. (You can also check that ∇× ~F = ~0.)

6. (Bonus 5 points) Let S be the surface given by z = e−(x2+y2) and z ≥ e−1. Let ~F = (ey+z − 2y)~i +

(xey+z + y)~j + ex+y~k. Compute the circulation

∂S

~F · d~s of ~F around ∂S.

In this problem we need to use Stokes’ theorem and work with the flat disk x2 + y2 ≤ 1, z = e−1,

instead of S. The answer is

∂S

~F · d~s = 2π. See Lecture Notes from Week #4, Wednesday.

Page 8: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

An Introduction to Mathematica (bonus problems for Math 23B)by Ruben AgapitoMathematics Department at UC Santa Cruz.

In this lab you will use Mathematica to get the answers to the bonus problems quickly. It is advisable to keep a padand a pencil handy. All the problems require some set-up, and this is best done using paper and pencil. Rememberthe following rule of thumb for future sessions with Mathematica:

A few quiet thoughtful moments spent away from the computer can often eliminate hours of wasted effort at the keyboard.

1. Evaluation of Path and Line IntegralsLet's solve the following exercises:

1) Evaluate the path integral of f Hx, y, zL = expI z M along the curve G: aØHtL = I1, 2, t2M, where 0 § t § 1.

2) Evaluate

‡G

x2 „x - xy „y + „z,

along the curve G given by the intersection of the surfaces z = x2 and y = 0, from the point H-1, 0, 1L to H1, 0, 1L.

‡ Solution for No. 1Keep in mind that you should be able to do this first by hand. Mathematica gives you the answer but not theprocedure to get it.

We start off by defining f , a and their composition f Îa. Pay attention to the use of curly braces in the definition ofthe arguments of f . This is necessary in order to get the right composition (but it is not recommended if we want toplot f ).

f@8x_, y_, z_<D := ExpB z F;

a@t_D := 91, 2, t2=;

f@a@tDD

We also need

Norm@a'@tDD

Then we compute the path integral (to get the integral symbol, go to File and select "BasicInput" from the Palettesmenu):

ourlab.nb 1

Page 9: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

‡0

1f@a@tDD Norm@a'@tDD „t

‡ Solution for No. 2We need to parametrize the curve G.

x = t;y = 0;z = t2;

where -1 § t § 1.

We now compute the differentials with respect to the parameter t (which can be done easily without using thecomputer):

„ x = „ t,„ y = 0 „ t,„ z = 2 t „ t

Remark: The symbol „ can be obtained by using the following sequence of keys: ÂddÂ

Thus the integral is given by

‡-1

1It2 - 0 + 2 tM „t

Remark: It is advisable to remove the variables you used in Mathematica before trying a new exercise. The way todo this is by using the command:

Remove@"`*"D

‡ (Bonus point) Problem 1:

Evaluate ‡GIx3, x + yM ÿ „ s×, where G consists of the top half of the circle x2 + y2 = 1 from H1, 0L to H-1, 0L and the

line segment from H-1, 0L to H-2, 3L.

ü Solution:We break up the curve into two paths:

-2 -1.5 -1 -0.5 0.5 1x

0.5

1

1.5

2

2.5

3

y

G1

G2

ourlab.nb 2

Page 10: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

-2 -1.5 -1 -0.5 0.5 1x

0.5

1

1.5

2

2.5

3

y

G1

G2

G1 : aHtL = Hcos t, sin tL, t œ @0, pDG2 : bHtL = H-1 - t, 3 tL, t œ @0, 1D

Now to perform the integration we do the following definitions

F@8x_, y_<D := 9x3, x + y=;

a@t_D := 8Cos@tD, Sin@tD<;

b@t_D := 8-1 - t, 3 t<;

After making these definitions available in memory we compute the line integral

‡0

p

F@[email protected]'@tD „t +‡0

1F@[email protected]'@tD „t

As an additional step we can plot the curve with labels attached:

plot1 =

ParametricPlot@a@tD, 8t, 0, p<, PlotStyle -> [email protected];plot2 = ParametricPlot@b@tD, 8t, 0, 1<, PlotStyle Ø [email protected];Show@8plot1, plot2<, AspectRatio Ø Automatic,Background Ø GrayLevel@1D, AxesLabel Ø 8"x", "y"<, Epilog ->

8Text@"G1", 80.5, 1<, 8-1, 0<D, Text@"G2", 8-1.5, 2<, 8-1, 0<D<D

‡ (Bonus point) Problem 2:

Evaluate the line integral ‡G

F„ s where FHx, yL = ex-1 + x y and G is given by aHtL = t2 i×+ t3 j, 0 § t § 1. (This line

integral is not easy to integrate by hand and numerical integration is advisable. Use the Mathematica command"NIntegrate[f, {x, xmin, xmax}]").

ourlab.nb 3

Page 11: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

Evaluate the line integral ‡G

F„ s where FHx, yL = ex-1 + x y and G is given by aHtL = t2 i×+ t3 j, 0 § t § 1. (This line

integral is not easy to integrate by hand and numerical integration is advisable. Use the Mathematica command"NIntegrate[f, {x, xmin, xmax}]").

ü Solution:

Remove@"`*"D

F@8x_, y_<D := Exp@x - 1D + x * y;

a@t_D := 9t2, t3=;

‡0

1F@a@tDD * Norm@a'@tDD „t

% êê N

2. Double Integrals in MathematicaWe have learned in class that we can use iterated integrals whenever the region of integration is a rectangle, andthe order of integration can be easily interchanged.

‡ Rectangular RegionsExample: Compute the integral Ÿ Ÿ

Dex+y „ x „ y, where D is the region: 0 § x § 1, 0 § y § 1.

Solution: We simply translate the integral into a convenient form understood by Mathematica.

‡0

1

‡0

1Exp@x + yD „x „y

‡ General RegionsSuppose that f is a continuous function over a (y-simple) region D in the plane described by

a § x § b and gHxL § y § hHxL.

Then the integral of f over D is given by the iterated integral

ŸabŸgHxLhHxL f Hx, yL „ y „ x.

On the other hand, if D is described by (a x-simple region)

gHyL § x § hHyL and c § y § d,

then the integral of f over D is given by

ŸcdŸgHyLhHyL f Hx, yL „ x „ y.

Remark: Notice that the limits of the outermost integral consist of numbers and not functions.

Let's study some examples (which you should try first using pencil and paper) and use Mathematica to solve them.

Example: Find the volume of the solid that lies under the surface z = x y2 and over the triangular region withvertices H0, 0L, H1, 1L, and H1, 2L.

ourlab.nb 4

Page 12: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

Example: Find the volume of the solid that lies under the surface z = x y2 and over the triangular region withvertices H0, 0L, H1, 1L, and H1, 2L.

Solution: A picture of the solid is given below:

00.25

0.50.75

1

X0

0.5

1

1.5

2

Y 0

1

2

3

4

Z

00.25

0.50.75

1

X

Inequalities that describe the region are 0 § x § 1 and x § y § 2 x. Consequently, we will integrate first with respectto y and then x.

This computes the volume:

‡0

1

‡x

2 xx y2 „y „x

Example: Find the volume of the solid that lies under the surface z = x2 y2 and over the region described by0 § x § sin y and 0 § y § p.

Solution: A graph of the solid is given below:

00.25

0.50.75

1X0

1

2

3

Y0

1

2

3

Z

00.25

0.50.75

1X

ourlab.nb 5

Page 13: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

00.25

0.50.75

1X0

1

2

3

Y0

1

2

3

Z

00.25

0.50.75

1X

Because of how the region is described, we must integrate first with respect to x and then y.

‡0

p

‡0

Sin@yDx2 y2 „x „y

‡ (Bonus Point) Problem 3:Find the exact volume of the solid that lies between the surfaces z = -x y (bottom face) and z = 2 - 5 x2 y2 (topface) where x2 + y2 § 1.

The solid is given below:

-1-0.5

00.5

1

X

-1

-0.5

00.5

1Y

0

1

2

Z

-1

-0.5

00.5

1Y

ourlab.nb 6

Page 14: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

-1-0.5

00.5

1

X

-1

-0.5

00.5

1Y

0

1

2

Z

-1

-0.5

00.5

1Y

ü Solution:We denote the disc by D : x2 + y2 § 1.The integral we need to compute is

‡ ‡DI2 -5 x2 y2 + x yM„ x„ y.

We can use polar coordinates to integrate this double integral (remember to multiply the integrand by the Jacobianfor polar coordinates):

‡0

2 p

‡0

1I2 -5 r4 HCos@qDL2 HSin@qDL2 + r2 Cos@qD Sin@qDM r „r „q

Also, we could compute the double integral using x and y:

‡-1

1

‡- 1-x2

1-x2

I2 -5 x2 y2 + x yM „y „x

3. Triple IntegralsWhen a description of R in terms of inequalities is available, the integral of f over R can be expressed as aniterated triple integral. If R can be described by inequalities of the form

jHx, yL § z § yHx, yL, uHxL § y § vHxL, and a § x § b,

then the integral of f over R is given by the iterated integral

‡a

b‡uHxL

vHxL‡jHx, yL

yHx, yLf Hx, y, zL„ z„ y „ x.

ourlab.nb 7

Page 15: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

‡a

b‡uHxL

vHxL‡jHx, yL

yHx, yLf Hx, y, zL„ z„ y „ x.

If R is described instead by

jHy, zL § x § yHy, zL, uHzL § y § vHzL, and a § z § b,

then the integral of f over R is given by the iterated integral

‡a

b‡uHzL

vHzL‡jHy, zL

yHy, zLf Hx, y, zL„ x„ y„ z.

There are four other similar arrangements, which result from the remaining permutations of the variables.

Note that the “product” „ x „y „ z may be viewed as a volume differential, „V = „ x „y „ z, which will take differ-ent forms in different coordinate systems.

Exercise: Evaluate Ÿ Ÿ ŸU x2 „ x „ y „ z, where U is the solid bounded by y2 + z2 = 4 a x, y2 = a x, and x = 3 a.

Assume that a is a positive constant. There are two possible choices for U. Work out the convex case.

Solution: We want to draw the solid bounded by the surfaces (considering a = 1)

y2 + z2 = 4 x, y2 = x, x = 3.

We will use Mathematica to visualize this region, though I advise you to try this first by hand.

g = ParametricPlot3DB:1

4Is2 + t2M, s, t>, 8s, -4, 4<, 8t, -3.5, 3.5<F;

h = ParametricPlot3DA9s2, s, t=, 8s, -4, 4<, 8t, -3.5, 3.5<E;

m = ParametricPlot3D@83, s, t<, 8s, -4, 4<, 8t, -3.5, 3.5<D;Show@8g, h, m<, AxesLabel Ø 8"X", "Y", "Z"<,ViewPoint -> 8-1.670, -0.690, -3.500<, Background Ø GrayLevel@1DD

As we can see from the picture, if we decide to project the solid in the XY-plane we will obtain a region boundedby a parabola y2 = a x and the line x = 3 a. The top and bottom part of the solid (making reference to the XY-plane)is given implicitly by the equation y2 + z2 = 4 a x. Then

‡0

3 a

‡- a x

a x

‡- 4 a x-y2

4 a x-y2

x2 „z „y „x

‡ (Bonus point) Problem 4:A solid occupies the region that lies under the paraboloid z = x2 + y2 and above the triangle in the xy-planebounded by the coordinate axes and the line x + y = 1. Its mass density is given by

r@x_, y_, z_D := x y z

Compute the volume of the solid and its total mass.

ü Solution:One way of describing the region is with the inequalities

0 § y § 1, 0 § x § 1 - y, and 0 § z § x2 + y2.

ourlab.nb 8

Page 16: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

A picture of the region is given below:

00.25

0.50.75

1

X

0

0.25

0.5

0.751

Y

0

0.25

0.5

0.75

1

Z

00.25

0.50.75

1

X

0

0.25

0.5

0.751

Y

Here is the volume of the solid

‡0

1

‡0

1-y

‡0

x2+y2

„z „x „y

and this is the mass of the solid

‡0

1

‡0

1-y

‡0

x2+y2

r@x, y, zD „z „x „y

4. Parametrization of Surfaces

‡ Parametrization of the TorusIn class we learned that the following vector function is a parametrization of a torus (obtained by rotating a circleof radius r with center at Ha, 0, 0L about the z-axis)

FHu, vL = HHa + r cos vL cos u, Ha + r cos vL sin u, r sin vL, where Hu, vL œ @0, 2 pLµ @0, 2 pL.

We will translate this into Mathematica code to graph a torus. Select a = 2 and r = 1.

phi@u_, v_D := 8H2 + Cos@vDL Cos@uD, H2 + Cos@vDL Sin@uD, Sin@vD<;ParametricPlot3D@phi@u, vD, 8u, 0, 2 p<, 8v, 0, 2 p<D

‡ (Bonus point) Problem 5: Parametrization of half-cone

The cone located above the XY-plane is given by the graph of the equation z = x2 + y2 . In class we learned twoparametrizations of this surface, one using x and y as parameters, and the other using trigonometric functions andradial segment. Plot these parametric representations of the cone.

ourlab.nb 9

Page 17: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

The cone located above the XY-plane is given by the graph of the equation z = x2 + y2 . In class we learned twoparametrizations of this surface, one using x and y as parameters, and the other using trigonometric functions andradial segment. Plot these parametric representations of the cone.

These are the results you may obtain:

-2-1

01

2

-2 -1 0 1 2

0

1

2

-2-1

01

2

-2 -1 0 1 2

-5-2.5

02.5

5

-5-2.5

02.5

5

0

2

4

-5-2.5

02.5

5

-5-2.5

02.5

5

hcone@x_, y_D := :x, y, x2 + y2 >;

ParametricPlot3D@hcone@x, yD, 8x, -2, 2<, 8y, -2, 2<,ViewPoint -> 81.568, -2.435, 0.779<, Background Ø GrayLevel@1DD

hcone2@r_, q_D := 8r Cos@qD, r Sin@qD, r<;ParametricPlot3D@hcone2@r, qD, 8r, 0, 5<, 8q, 0, 2 p<,ViewPoint -> 81.523, -2.424, 1.070<, Background Ø GrayLevel@1DD

‡ Parametrization of the Möbius Strip (not oriented surface)A nice website about the Möbius strip is given here. In that page you will find a parametrization of this surface.Translate that parametrization into Mathematica notation and get a graph of the Möbius strip.

ourlab.nb 10

Page 18: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of

A nice website about the Möbius strip is given here. In that page you will find a parametrization of this surface.Translate that parametrization into Mathematica notation and get a graph of the Möbius strip.

Let's try now to animate this non-oriented surface.

mobius@u_, v_D := 8Cos@uD + v * Cos@u ê 2D * Cos@uD,Sin@uD + v * Cos@u ê 2D * Sin@uD, v * Sin@u ê 2D<;

mgraph = ParametricPlot3D@mobius@u, vD, 8u, 0, 2 p<,8v, -0.3, 0.3<, Axes Ø False, Boxed Ø False,Background -> [email protected], 0.996078, 0.780392DD;

H*

>>RealTime3D`Show@mgraphD

*L

H* Go back to standard output *L

H*

<<Default3D`*L

ourlab.nb 11

Page 19: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 20: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 21: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 22: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 23: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 24: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 25: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 26: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 27: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 28: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 29: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 30: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 31: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 32: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 33: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 34: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 35: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of
Page 36: Score: Name: Solution Midtermjaruiz/multivariable_calculus/ExcerptsMath23B.pdf(b) The divergence of a vector field at a point is a number that can be interpreted as the outflow of