0% found this document useful (0 votes)
532 views

Lab Manual Math 209

This document is a lab manual for Math 209 that provides instructions and examples for 12 labs covering topics in multivariable calculus, including multivariable functions and limits, partial derivatives, directional derivatives and gradients, double and triple integrals, line integrals, Green's theorem, surface integrals, and Stokes' theorem. The table of contents lists the topics and objectives covered in each lab. Notes to instructors provide guidance on pacing and customizing the labs. Example problems in Lab 1 introduce key concepts like domain, range, and limits of multivariable functions.

Uploaded by

Reet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
532 views

Lab Manual Math 209

This document is a lab manual for Math 209 that provides instructions and examples for 12 labs covering topics in multivariable calculus, including multivariable functions and limits, partial derivatives, directional derivatives and gradients, double and triple integrals, line integrals, Green's theorem, surface integrals, and Stokes' theorem. The table of contents lists the topics and objectives covered in each lab. Notes to instructors provide guidance on pacing and customizing the labs. Example problems in Lab 1 introduce key concepts like domain, range, and limits of multivariable functions.

Uploaded by

Reet
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

Math 209

Lab Manual
Dept. of Mathematical and Statistical Sciences
University of Alberta

First Edition: H Kharaghani Version 2.2


Second Edition: T Hohn
Third Edition: E Woolgar The University of Alberta 2019
Table of Contents
Lab 1 Multivariable Functions and Limits 1

Lab 2 Partial Derivatives


Part I: Partial Derivatives, Differentials, and the Tangent Plane 7
Part II: The Chain Rule and Implicit Differentiation 10

Lab 3 Directional Derivatives and Gradients 15

Lab 4 Maximum and Minimum Problems 19

Lab 5 Lagrange Multipliers 25

Lab 6 Double Integrals 29

Lab 7 Polar Coordinates, Centre of Mass, Surface Area 33

Lab 8 Triple Integrals


Part I: Cartesian Coordinates 39
Part II: Cylindrical and Spherical Coordinates 42

Lab 9 Line Integrals


Part I: Definition of Line Integrals 47
Part II: Fundamental Theorem for Line Integrals 52

Lab 10 Green’s Theorem 57

Lab 11 Surface Integrals 61

Lab 12 Stokes’ Theorem and the Divergence Theorem


Part I: Stokes’ Theorem 67
Part II: The Divergence Theorem 70
Note to Instructors and TAs:
This Table of Contents shouldn’t be taken to represent an exact weekly schedule for the
labs. In particular, it probably doesn’t make sense to try to do exactly one lab from this
list every week. Early on, you may find you can cover more than one lab per week, but
later you’ll have to slow down. However, the topics appear in the order that they are
usually taught in the course, so you’ll probably want to go through the labs in the order in
which they appear.

There’s too much material to cover everything in a weekly 50 minute lab period. You can
cover parts of labs if you wish, at your discretion. A few of the labs are divided into parts
to make this easier. For those labs, exercises appear at the end of each individual part.

You’ll probably want to cover some material that is not in the labs. For example, you
may want to do some review before exams, or perhaps you’ll want to cover a topic
directly from the textbook.

The lab manual is divided into detailed examples, questions for the TA to do in the lab,
and exercises for the students to do. Don’t take this literally. TAs should feel free to go
over the detailed examples in class or to assign quiz questions from sources other than the
exercises.
Lab 1
Multivariable Functions and Limits

Definition: A function f of m variables is a rule that assigns to each m-tuple ( x1 ,..., xm ) a


real number denoted f ( x1 ,..., xm ) . The set of allowed m-tuples is called the domain of f.
The set of values f ( x1 ,..., xm ) is called the range of f.

Example 1: Find the domain and range of each of the following functions. In each case,
sketch the graph of the function.

a) z = f ( x, y ) = 1 − x 2 − y 2
Domain: All points in the unit disk centred at the origin
x2 + y 2 ≤ 1.
Range: z can take values between 0 and 1 (inclusive), so the
domain is the closed interval [0,1] ; i.e., 0 ≤ z ≤ 1 .

b) z = f ( x, y ) = 2 − 2 x − 3 y
Domain: All ( x, y ) ∈ R 2 .
Range: All z ∈ R .

c) z = f ( x, y ) = − x 2 + y 2

Domain: All ( x, y ) ∈ R 2 .
Range: All z ≤ 0 .

d) y = f ( x, z ) = 4 − x 2 − z 2
Domain: All ( x, z ) ∈ R 2 .
Range: All y ≤ 4 .

Limits:
In single-variable Calculus, there are two “directional limits”. That is, one can approach a
given point x = a from below (so we have lim− f ( x) ) or from above ( lim+ f ( x) ). The
x →a x →a

overall limit exists if and only if both directional limits exist and agree: lim f ( x) = L if
x→a

and only if lim− f ( x) = L = lim+ f ( x) .


x→a x→a

In 2-variable Calculus, the situation differs in two respects. First, one can approach a
point ( x, y ) = (a, b) from each of infinitely many different directions. If these different

1
directions lead to different limiting values (or if the limit in some direction does not
exist), the overall limit lim f ( x, y ) will not exist. Second, two different paths that
( x , y ) → ( a ,b )

approach (a, b) along the same direction can still lead to different results for the limit,
and again the overall limit will not exist in this case.
So you can prove that lim f ( x, y ) does not exist by finding two paths that approach
( x , y ) → ( a ,b )

(a, b) but that give different results for the limit, or by finding one path that approaches
(a, b) such that the limit along that path does not exist. But to prove a limit does exist,
you need to refer to the definition of a limit (or the squeeze theorem).

Continuous Functions:
A function of two variables is continuous at (a, b) if lim f ( x, y ) = f ( a, b) .
( x , y ) → ( a ,b )

Examples:

xy
a) f ( x, y ) = . Find lim f ( x, y ) .
x + y2
2 ( x , y ) →(0,0)

Solution: Notice that f (0, 0) is not defined. However, we don’t need it to be defined
because we are interested only in the limit as we approach (0, 0) .We will approach along
the line y = mx . By not specifying the slope m, this allows us to discuss all directions of
approach for the line except the vertical direction.
xy
lim f ( x, y ) = lim
( x , y ) →(0,0) ( x , y ) →(0,0) x + y 2
2

.
mx 2 mx 2 m
= lim 2 = lim =
x →0 x + m x
2 2 x →0 1 + m 2
x 2
1 + m2 ( ) ( )
Clearly, the value of this limit depends on the slope of the line along which we approach
the origin, so the overall limit does not exist.
Notice how this approach turns a 2-dimensional limit ( x, y ) → (0, 0) into a familiar one-
dimensional limit x → 0 .

x2 y
b) f ( x, y ) = . Find lim f ( x, y ) .
x4 + y 2 ( x , y ) →(0,0)

Solution: If we carry out the same calculation as above, we now get


x2 y
lim f ( x, y ) = lim
( x , y ) →(0,0) ( x , y ) → (0,0) x 4 + y 2

mx3 mx
= lim = lim 2 =0
( x , y ) → (0,0) x 4 + m 2 x 2 x →0 x + m 2
( )

2
no matter what direction m we approach along.
But the limit still does not exist. To see why, approach along a different path, namely the
parabola y = ax 2 through the origin. Then

x2 y
lim f ( x, y ) = lim
( x , y ) →(0,0) ( x , y ) →(0,0) x 4 + y 2

ax 4 a
= lim =
x →0 x +a x
4 2 4
1 + a2 ( )
which clearly gives different answers for different parabolas through the origin (i.e., for
different choices of a).

To prove a limit exists, we must resort to the definition of a limit. Equivalently, we can
use the Squeeze Theorem.

xy
c) Find lim .
( x , y ) →(0,0)
x2 + y2
Solution: First, let’s approach along lines y = mx .

xy mx 2 m| x|
lim = lim = lim = 0.
( x , y ) →(0,0)
x +y
2 2 x →0
x +m x
2 2 2 x→0
1 + m2
This tells us that if the limit exists, it is zero. But it doesn’t tell us that it does exist.
Switch to polar coordinates x = r cos θ , y = r sin θ . Then

xy r 2 cos θ sin θ
f ( x, y ) = = = r cos θ sin θ
x2 + y 2 r

so we observe that −r ≤ f ( x, y ) ≤ r . That is, f is squeezed between − r and r. Now as


( x, y ) → (0, 0) , we get that r → 0 , so by the Squeeze Theorem, f is squeezed between
two quantities which are both going to zero. Thus f goes to zero as well. This proves that
xy
the limit indeed is given by lim = 0.
( x , y ) →(0,0)
x + y2
2

xy
d) Let f ( x, y ) = . Find lim f ( x, y ) .
x + y2
2 ( x , y ) →(2,5)

Solution: This a a rational function, a ratio of two polynomials. It is continuous wherever


it is defined, which is wherever the denominator is not zero. Therefore, it is continuous at
(2,5) , so we can write
(2)(5) 10
lim f ( x, y ) = f (2,5) = = .
( x , y ) →(2,5) 22 + 52 29

3
Your lab instructor will solve the following problems:

Problem 1: Find the domain and range of the following functions and sketch their graphs:

a) z = f ( x, y ) = x 2 + y 2

b) z = f ( x, y ) = 3 x 2

c) x = f ( y, z ) = 4 − y 2 − z 2

Problem 2: Find each of the following limits, or show that the limit does not exist.
2 x2 y
a) lim
( x , y ) →(0,0) 2 x 4 + 3 y 2

x2 y3
b) lim
( x , y ) →(0,0) 2 x 2 + 3 y 2

2
3e y
c) lim
( x , y ) →( e ,10) 10 ln x

Exercises:

1. Find the domain and range and sketch the graph for each of the following functions:
a) z = f ( x, y ) = 2 y
b) y = f ( x, z ) = 3 x 2 + z

c) z = f ( x, y ) = 12 − x 2 − y 2

2. Find the limit, or show that the limit does not exist:
x2 − y2
a) lim
( x , y ) →(0,0) x 2 + y 2

6 x3
b) lim
( x , y ) →(0,0)
x2 + y 2

x2 − 2 y3 − 4 z
c) lim
( x , y , z ) →(2,1,0) x + y 3 + 2 z

3. Show:
sin( x + y )
a) lim =1
( x , y ) →(0,0) x+ y

4
sin x + sin y ⎛α + β ⎞ ⎛α − β ⎞
b) lim = 1 [Hint: sin α + sin β = 2sin ⎜ ⎟ cos ⎜ ⎟ .]
( x , y ) →(0,0) x+ y ⎝ 2 ⎠ ⎝ 2 ⎠

⎧ x4
⎪ , ( x, y ) ≠ (0, 0)
4. Find the value of k such that f ( x, y ) = ⎨ x 2 + y 2 is continuous at
⎪ k , ( x, y ) = (0, 0)

(0, 0) . Is f ( x, y ) then continuous everywhere? Why?

5
6
Lab 2
Partial Derivatives

Part I: Partial Derivatives, Differentials, and the Tangent Plane

Definition: Let z = f ( x, y ) . Then the partial derivatives of f with respect to x and y are
∂f ∂z f ( x + Δx, y ) − f ( x, y )
f x ( x, y ) = = = lim
∂x ∂x Δx →0 Δx
,
∂f ∂z f ( x , y + Δy ) − f ( x , y )
f y ( x, y ) = = = lim
∂y ∂y Δy →0 Δy
provided these limits exist.

∂z ∂z
Example 1: (
z = ln x 2 + y 2 + 1 . Then = 2 )
2x
∂x x + y + 1
2
and = 2
2y
∂y x + y 2 + 1
. Higher

partial dervatives are defined in the obvious way:

∂2 z ∂ ⎛ ∂z ⎞ ∂ ⎛
f xx := 2 := ⎜ ⎟ = ⎜ 2
2x ⎞ 2 x + y +1 − 4x
2 2 2
( )
⎟=
∂x ∂x ⎝ ∂x ⎠ ∂x ⎝ x + y 2 + 1 ⎠ ( )
2
x2 + y2 + 1

=
(
2 y2 − x2 + 1 )
(x )
2
2
+ y2 +1

∂2 z ∂ ⎛ ∂z ⎞ ∂ ⎛
f yy := 2 := ⎜ ⎟ = ⎜ 2
2y ⎞ 2 x + y +1 − 4 y
2 2
(2
)
⎟=
∂y ∂y ⎝ ∂y ⎠ ∂y ⎝ x + y 2 + 1 ⎠ ( )
2
x2 + y 2 + 1

=
(
2 x2 − y2 + 1 )
(x )
2
2
+ y2 +1
∂2 z ∂ ⎛ ∂z ⎞ ∂ ⎛ 2y ⎞ 4 xy
f yx := := ⎜ ⎟ = ⎜ 2 ⎟=− 2
∂x∂y ∂x ⎝ ∂y ⎠ ∂x ⎝ x + y + 1 ⎠ ( )
2 2
x + y2 +1
∂2 z ∂ ⎛ ∂z ⎞ ∂ ⎛ 2x ⎞ 4 xy
f xy := := ⎜ ⎟ = ⎜ 2 ⎟=− 2
∂y∂x ∂y ⎝ ∂x ⎠ ∂y ⎝ x + y + 1 ⎠ ( )
2 2
x + y2 +1

∂2 z ∂ ⎛ ∂f ⎞ ∂2 z ∂ ⎛ ∂f ⎞
Notice that f xy = = ⎜ ⎟ but f yx = = ⎜ ⎟ . In principle, these are
∂y∂x ∂y ⎝ ∂x ⎠ ∂x∂y ∂x ⎝ ∂y ⎠
different quantities. In practice, when certain reasonable conditions hold, they are equal
(as in the case of our example). This is Clairaut’s theorem.

7
Definition: If f is a function differentiable at ( x0 , y0 ) , the differential of the function
z = f ( x, y ) at ( x0 , y0 ) is the formal expression

dz ( x0 , y0 ) = f x ( x0 , y0 )dx + f y ( x0 , y0 )dy .

Example: Let’s do a 3-dimensional example. Everything we’ve said carries over to higher
dimensions, so take w = f ( x, y, z ) = x 2 y 3 + x sin z . Then

( )
dw = f x dx + f y dy + f z dz = 2 xy 3 + sin z dx + 3x 2 y 2 dy + x cos zdz

Tangent Plane Approximation: Consider two nearby points ( x0 , y0 , z0 ) and ( x, y, z ) ,


where z0 = f ( x0 , y0 ) and z = f ( x, y ) . We define the increments Δx = x − x0 ,
Δy = y − y0 , and Δz = z − z0 = f ( x, y ) − f ( x0 , y0 ) In the formula for the differential, we
can take dx to mean Δx and dy to mean Δy . Then at ( x0 , y0 , z0 ) we have
dz = f x ( x0 , y0 )dx + f y ( x0 , y0 )dy = f x ( x0 , y0 )Δx + f y ( x0 , y0 )Δy

Notice there is no obvious reason to think of this (i.e., of dz) as the same thing as the
increment Δz , which is already defined to be Δz = z − z0 = f ( x, y ) − f ( x0 , y0 ) . This
prompts a definition.
Definition: Let z = f ( x, y ) and say that f x ( x0 , y0 ) and f y ( x0 , y0 ) exist. Say that
dz ≈ Δz , so that
Δz = z − z0 ≈ f x ( x0 , y0 )dx + f y ( x0 , y0 )dy = f x ( x0 , y0 )Δx + f y ( x0 , y0 )Δy [1]

in the sense that Δz differs from dz only by terms that vanish faster than Δx and Δy .
Then we say that f is differentiable at ( x0 , y0 ) and we call the equation [1] the tangent
plane approximation to f at ( x0 , y0 , z0 ) or the equation of the tangent plane to z = f ( x, y )
at ( x0 , y0 , z0 ) . (It should be clear to you that equation [1] represents a plane containing
( x0 , y0 , z0 ) . It’s not to hard to see why it is tangent to the graph of f there: the explanation
can be found in the text.)

Example: Find the tangent plane to z = f ( x, y ) = xe y at ( x0 , y0 ) = (1, 0) and use it to


estimate z = f (1.04, 0.01) = 1.04e0.01 .

ey
Solution: Compute the differential. We get dz = dx + xe y dy . Then the tangent
2 x
plane approximation is (using ( x0 , y0 ) = (1, 0) and dx = Δx , dy = Δy in the differential)
e0 1
Δz ≈ Δx + 1e0 Δy = Δx + Δy . Finally, Δx = 0.04 , Δy = 0.01 , so Δz ≈ 0.03 . Now
2 1 2
z = f (1.04, 0.01) = z0 + Δz = f (1, 0) + Δz = 1 + Δz ≈ 1.03 .

8
(Using a calculator, I get z = f (1.04, 0.01) = 1.04e0.01 ≈ 1.0030053103 .)

Your lab instructor will solve the following problems in the lab:

Problem 1: Find the differentials of the following functions and write the tangent plane
approximation at the given point ( x0 , y0 ) . Use this to estimate the function as required
below.
1
a) f ( x, y ) = x 2 − 2 y 2 + tan( xy ) + , ( x0 , y0 ) = (−2, 0) . Estimate f (−1.95, −0.02) .
x
b) f ( x, y, z ) = ln( xy ) + e yz + sin( xz ) , ( x0 , y0 , z0 ) = (2, 4, π ) . Estimate f (1.9, 4.1, π ) .

Problem 2: The ideal gas law states relates pressure P, volume V, and tempterature T of
∂P ∂V ∂T
an ideal gas by PV = kT , where k is a constant. Show that = −1 .
∂V ∂T ∂P

Exercises:

1. If z = f ( x, y ) = arctan( xy ) , verify that f xy = f yx .

2. Find the differential of f ( x, y ) = xy 2 + x + y . Find the equation of the tangent


plane to the graph of z = f ( x, y ) at ( x0 , y0 ) = (3,1) and use it to estimate
f (2.9, 0.9) .

3. Find the differential of f ( x, y, z ) = x y 2 cos z . Find the equation of the tangent


plane to the graph of w = f ( x, y, z ) at ( x0 , y0 , z0 ) = (4,5, 4π ) and use it to estimate
f (3.99, 4.98, 4.03π ) .

9
Part II: The Chain Rule and Implicit Differentiation
As with single variable Calculus, the chain rule is used to differentiate composite
functions. The easiest way to remember the multivariable chain rule is to use a diagram to
write down all the connections between variables. Then every link in the diagram
represents a partial derivative.

Examples:

∂z
1. Let z = f ( x, y ) = xy + sin x , x = g (u , v) = u + v , and y = h(u, v) = u − v . Find
∂u
∂z
and .
∂v
Solution: The diagram showing connections between the
variables is on the left. Based on it, we write
∂z ∂z ∂x ∂z ∂y
= +
∂u ∂x ∂u ∂y ∂u
= ( y + cos x )(1) + ( x )(1)
= x + y + cos x
∂z ∂z ∂x ∂z ∂y
= +
∂v ∂x ∂v ∂y ∂v
= ( y + cos x )(1) + ( x )( −1)
= − x + y + cos x

∂z ∂z
2. If z = f ( x 2 − y 2 ) , show that x + y = 0.
∂y ∂x
Solution: We treat z as a function of the single variable u
so z = f (u ) , where u = x 2 − y 2 is a function of two
variables. Again, the diagram is at the left.
∂z dz ∂u dz
= = 2x
∂x du ∂x du
∂z dz ∂u dz
= = −2 y
∂y du ∂y du
If we multiply the first equation by y, the second equation
by x, and add the two resulting equations, we get the
result we were asked to prove.

10
3. Let z = f ( x, y ) = x 2 y , x = g (t ) = t1/ 2 , y = h(t ) = 2t + 1 . Write down the total
derivative of z, expressed as a function of t alone.
Solution: The term “total derivative” only makes sense
here because z really depends on only one variable, t.
Equivalently, the diagram has only t at the end of every
chain. Then
dz ∂z dx ∂z dy ⎛ 1 ⎞
= +
dt ∂x dt ∂y dt
= ( 2 xy ) ⎜ 1/ 2 ⎟ + x 2 ( 2 )
⎝ 2t ⎠
( )
⎛ 1 ⎞
( )
2
= 2t1/ 2 (2t + 1) ⎜ 1/ 2 ⎟ + 2 t1/ 2
⎝ 2t ⎠
= 2t + 1 + 2t
= 4t + 1

∂2 z
4. Let z = f ( x, y ) , x = 2u + 3v , and y = u − v . Find a formula giving in terms
∂u∂v
of the second partial derivatives of z with respect to x and y.
∂z ∂z ∂x ∂z ∂y ∂z ∂z
Solution: = + =2 + from the
∂u ∂x ∂u ∂y ∂u ∂x ∂y
diagram at the left. We will need this in a moment.
∂z
Next, notice that is itself a function of x and y, so we
∂u
∂z
get the same diagram for . Thus:
∂u
∂ ⎛ ∂z ⎞ ∂ ⎛ ∂z ⎞ ∂x ∂ ⎛ ∂z ⎞ ∂y
⎜ ⎟= ⎜ ⎟ + ⎜ ⎟
∂v ⎝ ∂u ⎠ ∂x ⎝ ∂u ⎠ ∂v ∂y ⎝ ∂u ⎠ ∂v
∂ ⎛ ∂z ∂z ⎞ ∂x ∂ ⎛ ∂z ∂z ⎞ ∂y
= ⎜2 + ⎟ + ⎜2 + ⎟
∂x ⎝ ∂x ∂y ⎠ ∂v ∂y ⎝ ∂x ∂y ⎠ ∂v
∂ ⎛ ∂z ∂z ⎞ ∂ ⎛ ∂z ∂z ⎞
=3 ⎜2 + ⎟− ⎜2 + ⎟
∂x ⎝ ∂x ∂y ⎠ ∂y ⎝ ∂x ∂y ⎠
∂2 z ∂2 z ∂2 z
=6 2 + −
∂x ∂x∂y ∂y 2
Thus (using Clairaut’s theorem) we get
∂2 z ∂2 z ∂2 z ∂2 z
=6 2 + − .
∂u∂v ∂x ∂x∂y ∂y 2

∂z
5. (Implicit Differentiaion) Find where 0 = x 2 y + z 2 + ln xyz .
∂x

11
Solution: We can’t isolate z but we don’t have to since we can use implicit
differentiation to solve this problem. Specifically, differentiate
F ( x, y, z ) = x y + z + ln xyz with respect to x, keeping in mind that z = f ( x, y )
2 2

∂F
and that therefore 0 = F ( x, y, z ) = F ( x, y, f ( x, y ) ) , then =0.
∂x
⎛ ∂F ⎞ ⎛ ∂F ⎞ ⎛ ∂z ⎞
0=⎜ ⎟ +⎜ ⎟ ⎜ ⎟
⎝ ∂x ⎠ y , z ⎝ ∂z ⎠ x , y ⎝ ∂x ⎠ y
1 ⎛ 1 ⎞ ⎛ ∂z ⎞
= 2 xy + + ⎜ 2z + ⎟ ⎜ ⎟
x ⎝ z ⎠ ⎝ ∂x ⎠
using subscripts in the first line to remind us of which variables
are held constant when we take the partial derivatives
(especially, the subscript z on the very first term reminds us to
∂z
vary x but to hold constant z = f ( x, y ) ). Solving for , we
∂x
obtain
⎛ 1⎞
⎜ 2 xy + ⎟
∂z
=−⎝
x⎠
.
∂x ⎛ 1⎞
⎜ 2z + ⎟
⎝ z⎠

6. Find the equation of the tangent plane to the surface 2 x 2 + 4 y 2 + 16 z 2 = 32 at


⎛ 5⎞
⎜⎜ 2,1, ⎟.
⎝ 2 ⎟⎠

Solution: F ( x, y, z ) = 2 x 2 + 4 y 2 + 16 z 2 − 32 = 0 , so by implicit
differentiation, we get
∂F ∂F ∂z ∂z ∂z x
0= + = 4 x + 32 z ⇒ =− and
∂x ∂z ∂x ∂x ∂x 8z
∂F ∂F ∂z ∂z ∂z y
0= + = 8 y + 32 z ⇒ =−
∂y ∂z ∂y ∂y ∂y 4z

⎛ 5⎞ ∂z 2 1 ∂z 1 1
Then at ⎜⎜ 2,1, ⎟⎟ we have =− =− and =− =− .
⎝ 2 ⎠ ∂x 8 5/2 2 5 ∂y 4 5/2 2 5
The equation of the tangent plane
z − z0 = f x ( x0 , y0 ) ( x − x0 ) + f y ( x0 , y0 ) ( y − y0 )

implies that z −
2
5
=−
1
2 5
( x − 2) −
1
2 5
( y − 1) , so x + y + 2 5 z = 8 . ( )

12
Your lab instructor will solve the following problems:

∂2 z ∂2 z
Problem 1: Let z = cos( x + 2 y ) , x = u 2 v , and y = uv . Find and .
∂u 2 ∂u∂v

Problem 2: Let z = f ( x, y ) and y = g ( x) . Show that

d 2 z ∂2 z ∂2 z ∂2 z ∂z
2 (
′ g ′( x) ) + g ′′( x)
2
= + 2 g ( x ) +
dx 2
∂x 2
∂x∂y ∂y ∂y

Problem 3: If y = 3 f ( x + t ) − 2 g ( x − t ) , find ytt and yxx .

∂z ∂z
Problem 4: Find and where z − arctan z = x + y .
∂x ∂y

____________________

Exercises:

dz π
1. If z = 3xe xy , x = t cos t , and y = t sin t , find at t = .
dt 6

2. (Conversion to polar coordinates) If T = 2 x3 − 3xy + y 2 , x = r cos θ , and y = r sin θ ,


∂T ∂T
find (i) and (ii) .
∂r ∂θ

3. (Conversion to polar coordinates) If x = r cos θ , y = r sin θ , , and z = f ( x, y ) ,


show that
2
⎛ ∂z ⎞ ⎛ ∂z ⎞ ⎛ ∂z ⎞ 1 ⎛ ∂z ⎞
2 2 2

⎜ ⎟ +⎜ ⎟ =⎜ ⎟ + 2 ⎜ ⎟
⎝ ∂x ⎠ ⎝ ∂y ⎠ ⎝ ∂r ⎠ r ⎝ ∂θ ⎠

∂ 2U
4. If U = 3 f ( x, y ) , x = 5t − 2 s , and y = 2t + 2 s , express in terms of the partial
∂t ∂s
derivatives of U with respect to x and y.

∂z ∂z
5. Let z 3 + tz = s 2 + t 2 − 1 . Find and at (t , s) = (1, 0) .
∂t ∂s

6. Find the equation of the plane tangent to the surface y 2 + xz + ln xyz = 2 + e at


( x, y ) = (1,1) .

13
14
Lab 3
Directional Derivatives and Gradients

The gradient of a function z = f ( x, y ) is the vector

∂f ∂f ∂f ∂f
∇f = , = i+ j
∂x ∂y ∂x ∂y

which lies in R 2 , the domain of the function. The definition generalizes to arbitrary
dimensions. For example, the domain of w = f ( x, y, z ) is R 3 , and then the gradient is

∂f ∂f ∂f ∂f ∂f ∂f
∇f = , , = i+ j+ k .
∂x ∂y ∂z ∂x ∂y ∂z
The gradient is always perpendicular to the level sets or level surfaces
f ( x, y,...) = k =constant.
The directional derivative of f (x) (where x = ( x, y ) if the domain is R 2 , x = ( x, y, z ) if
the domain is R 3 , etc) in the direction of the unit vector u is given by
f ( x + hu ) − f ( x )
Du f ( x ) = lim ,
h →0 h
if the limit exists. To compute this, first find the gradient and then use the formula
Du f = u ⋅∇f .

By properties of the dot product, we can write Du f = u ⋅∇f = ∇f cos θ , where θ is the
angle between u and ∇f (in writing this formula, we’ve used that u = 1 ). Therefore, the
directional derivative has greatest magnitude when cos θ = ±1 . That is, f is increasing
most rapidly in the direction u that is parallel to ∇f and decreasing most rapidly in the
direction anti-parallel (parallel, but pointing the other way) to ∇f . Notice that the
maximum rate of change of f is simply
Du f = ∇f

This is obtained by putting cos θ = ±1 into the formula Du f = u ⋅∇f = ∇f cos θ to get
Du f = ± ∇f .

15
Examples:

1. Find the derivative of z = f ( x, y ) = x5 ln y 3 + 1 in the direction of the vector


a = 3, 4 at the point ( x, y ) = (1,1) .

3x5 y 2
Solution: First find the gradient: ∇f = 5 x 4 ln y 3 + 1 , so at ( x, y ) = (1,1) we
y3 + 1
3
have ∇f (1,1) = 5ln 2, . Next find the unit vector in the same direction as a.
2
3 4
Simply divide a by its magnitude a = 32 + 42 = 5 to get u = , . Then the
5 5
3 4 3 6
directional derivative is Du f (1,1) = , ⋅ 5ln 2, = 3ln 2 + .
5 5 2 5

2. Find the maximum rate of change of the function in Example 1 at ( x, y ) = (1,1) . In


which direction does this occur?
3
Solution: We know that ∇f (1,1) = 5ln 2, , so the maximum rate of change is
2
9
∇f (1,1) = 25ln 2 2 + and it occurs in the direction of ∇f (that is, in the
4
3
5ln 2,
∇f 2
direction of the unit vector u = = ).
∇f 9
25ln 2 +
2

Tangent Plane:

Let us write the equation z = f ( x, y ) in the implicit form F ( x, y, z ) = z − f ( x, y ) = 0 . If a


vector u is tangent to the surface F ( x, y, z ) = z − f ( x, y ) = 0 (i.e., tangent to the graph of
z = f ( x, y ) ), then it must have Du F = u ⋅∇F = 0 . So we conclude that the gradient of
F ( x, y, z ) = z − f ( x, y ) = 0 is a normal vector to the tangent plane of z = f ( x, y ) . The
∂f ∂f
gradient of F is easily seen to be the vector − , − ,1 .
∂x ∂y

3. Find the equation of the tangent plane and normal line to the surface
z = 7 − x 2 − 2 xy + y 2 at the point (1, −1,9) .
Solution: Write F ( x, y, z ) = z + x 2 + 2 xy − y 2 − 7 . The gradient is
∇F = 2 x + 2 y, 2 x − 2 y,1 , so ∇F (1, −1) = 0, 4,1 . Then all points ( x, y, z ) that lie
in the plane tangent to F ( x, y, z ) = 0 at (1, −1,9) obey the equation

16
0, 4,1 ⋅ ( x, y, z − 1, −1,9 ) = 0 .

This simplifies to
4y + z = 5 .
The normal line is simply the line through (1, −1,9) parallel to the normal vector
∇F (1, −1) = 0, 4,1 . The parametric equations of this line in terms of a parameter t
are
x(t ) = 1
y (t ) = −1 + 4t
z (t ) = 9 + t
____________

Your lab instructor will solve the following problems in the lab:

Problem 1: Find equations for the tangent plane and normal line to the surface
xy + sin z = 2 at (1, 2, 0) .

Problem 2: Find the greatest rate of change of the function f ( x, y ) = e x − y at ( x, y ) = (1,1) .


In what direction does this occur?

___________

Exercises:

1. Find the directional derivative of f ( x, y, z ) = x 2 − yz + z 2 x at the point P (1, −4,3) in


the direction of the point Q(2, −1,8) [note: you must first find the vector from P to
Q]. What is the maximum rate of increase of f in any direction at P?

2. Find equations for the tangent plane and normal line to the ellipsoid
4 x 2 + 9 y 2 + z 2 − 49 = 0 at the point P (1, −2,3) .

3. The directional derivative of f ( x, y , z ) at a given point P is greatest in the direction


of the vector 2, 2, −1 , and takes the value 2 in this direction. Find the directional
derivative of f ( x, y, z ) at P in the direction of the vector 1, −1, 2 . [Hint: For u a
unit vector, then Du f = u ⋅∇f = ∇f cos θ .]

4. Prove that the sphere x 2 + y 2 + z 2 = a 2 and the cone x 2 + y 2 − z 2 = 0 are orthogonal


at every point of intersection.

17
18
Lab 4
Maximum and Minimum Problems

Consider a function z = f ( x, y ) . Then f (a, b) is a local (or relative) maximum if


f (a, b) ≥ f ( x, y ) for all ( x, y ) in a neighbourhood of (a, b) . On the other hand, f (a, b)
is a local (or relative) minimum if f (a, b) ≤ f ( x, y ) for all ( x, y ) in a neighbourhood of
( a, b) .
If (a, b) is a local maximum or minimum point and if the first partial derivatives f x (a, b)
and f y (a, b) exist there, then it must be that f x (a, b) = 0 and f y (a, b) = 0 .

Therefore we define (a, b) to be a critical point of the function f is either (i)


f x (a, b) = 0 = f y (a, b) or (ii) one of the partial derivatives fails to exist at (a, b) . Every
relative max/min point is a critical point, but not every critical point is a relative
max/min.

Second Derivative test: Suppose that f x (a, b) = 0 = f y (a, b) and that f has continuous
second partial derivatives on a disk containing (a, b) . Define
D(a, b) = f xx (a, b) f yy (a, b) − f xy2 (a, b) .

a) If D(a, b) > 0 and f xx (a, b) > 0 , then f (a, b) is a local minimum.


b) If D(a, b) > 0 and f xx (a, b) < 0 , then f (a, b) is a local maximum.
c) If D(a, b) < 0 then f (a, b) is neither a local maximum nor a local minimum and
(a, b) is called a saddle point.
If D(a, b) = 0 , the test provides no information. Notice we didn’t list the case of
D(a, b) > 0 and f xx (a, b) = 0 . Why not? [Hint: Look at how D is defined.]

To find the absolute maximum and minimum of a function on a closed, bounded region,
first find all the relative maxima and minima. Next, find the largest and smallest values of
the function on the boundary. Compare all these values. The largest is the absolute
maximum. The smallest is the absolute minimum.

Examples:

1. Find and classify the critical points of f ( x, y ) = x 3 − 6 xy + y 3 .


Solution: Since this is a polynomial its derivatives are continuous at all ( x, y ) ∈ R 2 ,
so to find critical points we set

19
f x = 3x 2 − 6 y = 0 ⇒ x 2 = 2 y
f y = 3 y2 − 6x = 0 ⇒ y2 = 2x

Square the top equation and then substitute using the bottom equation to get
( )
x 4 = 8 x at a critical point. This can be written as x x3 − 8 = 0 , so the roots are
x = 0 and x = 2 .
If x = 0 then we see from the equation x 2 = 2 y that y = 0 as well, so ( 0, 0 ) is a
critical point.
If x = 2 then we see from the equation x 2 = 2 y that y = 2 as well, so ( 2, 2 ) is a
critical point. There are no others.
Now f xx = 6 x , f yy = 6 y , and f xy = f yx = −6 , so D( x, y ) = 36( xy − 1) . We can no
complete the following table:

Critical point D f xx Class.

(0, 0) −36 saddle


(2, 2) 108 12 local min

4 y + x2 y 2 + 8x
2. Find and classify all the critical points of the function f ( x, y ) = .
xy
Solution: First, the domain of this function is all ( x, y ) except the axes x = 0 and
y = 0 . All the derivatives of the function are defined and continuous at every point
of the domain. By division, the function simplifies to the form
4 8
f ( x, y ) = + xy +
x y
which is easier to work with when taking derivatives. Let’s now compute the first
and second derivatives:

20
4
fx = y −
x2
8
fy = x − 2
y
8
f xx = 3
x
16
f yy = 3
y
f xy = f yx = 1
128
D ( x, y ) = −1
x3 y 3

Solving f x = 0 = f y on the domain x ≠ 0 , y ≠ 0 yields x 2 y = 4 and xy 2 = 8 . If you


square the first equation and substitute the second one in to it, you get
( )
x 4 y 2 = x 3 xy 2 = 8 x 3 = 16 ⇒ x3 = 2 ⇒ x = 21/ 3 . Then from x 2 y = 4 we get

y=
2
4
2/3 ( )
= 24 / 3 , so we have only one critical point, 22 / 3 , 24 / 3 . At the critical point,

( )
we have D 22 / 3 , 24 / 3 = 2
128
( ) 8
− 1 = 2 − 1 = 1 > 0 and f xx 22 / 3 , 24 / 3 = 2 = 2 > 0 ,
( )( )
2 2 4
2
so this is a local minimum.

3. Find the absolute maximum and minimum of the function f ( x, y ) = x 2 + y 2 + 1 on


the closed triagular plate bounded by the lines x = −1 , y = −1 , and y + 2 x = 2 .
Solution: It will be helpful to note that the vertices of the boundary triangle occur at
( −1, 4 ) , ⎛⎜ , −1⎞⎟ , and ( −1, −1) .
3
⎝2 ⎠

(i) Inside the plate, the conditions f x ( x, y ) = 2 x = 0 , f y ( x, y ) = 2 y = 0 show that


there is one critical point at (0, 0) and no other critical point. The critical
value there is f (0, 0) = 1 . We don’t have to know whether it is a relative max
or min.
(ii) Along the side x = −1 the function becomes g ( y ) = f (−1, y ) = y 2 + 2 ,
−1 ≤ y ≤ 4 . On this domain, we see that the smallest value of g ( y ) = f (−1, y )
is g (0) = f (−1, 0) = 2 and the largest value is g (4) = f ( −1, 4) = 18 . It’s easy
to compute these values using one-variable calculus, but often the function is
simple and you can find the max and min by inspection.

21
(iii) Along the side y = −1 the function becomes h( x) = f ( x, −1) = x 2 + 2 ,
3
−1 ≤ x ≤ . It has minimum value h( x) = f (0, −1) = 2 and maximum value
2
⎛3 ⎞ 17
h( x) = f ⎜ , −1⎟ = .
⎝2 ⎠ 4
(iv) Along the side y + 2 x = 2 , we can write y = 2 − 2 x and substitute to write
3
f ( x, y ) as k ( x) = f ( x, 2 − 2 x) = x 2 + ( 2 − 2 x ) + 1 = 5 x 2 − 8 x + 5 , −1 ≤ x ≤ .
2

2
4
Since k ′( x) = 10 x − 8 , this has minimum value at x = . The value there is
5
2
⎛4⎞ ⎛4⎞ 9
5 ⎜ ⎟ − 8 ⎜ ⎟ + 5 = . The largest value occurs at one of the endpoints, and is
⎝5⎠ ⎝5⎠ 5
k (−1) = 18 .
Looking at all these values, the largest is 18 and occurs at (−1, 4) , so that’s the
absolute maximum. The smallest is 1 and occurs at (0, 0) so that’s the absolute
minimum.
____________

Your lab instructor will solve the following problems in the lab:

1. Find and classify all the critical points of the function f ( x, y ) = x 4 − 12 xy + y 4 .

2. Find the absolute minimum of the function f ( x, y ) = x 4 + 2 x 2 y 2 + y 4 + 1 inside the


circle x 2 + y 2 = a 2 for any a > 0 . Conclude that this is the absolute minimum of the
function on R 2 .

3. (
Find the absolute minimum and maximum of the function f ( x, y ) = x 2 − 4 x cos y )
π π
on the rectangular region 1 ≤ x ≤ 3 , − ≤ y≤ .
4 4

4. A flat circular plate has the shape of the unit disk x 2 + y 2 ≤ 1 . The plate is heated so
that the temperature at any point ( x, y ) is given by T ( x, y ) = x 2 + 2 y 2 − x . Find the
hottest and coldest points and temperatures on the plate.

Exercises:

1. Find and classify the relative maxima and minima of


f ( x, y ) = x + y − 3 x − 12 y + 20 .
3 3

22
2. A rectangular box has four sides and a bottom but no top. The volume of the box is
108 m 2 . Find the dimension of the box such that the surface area is a minimum.

3. Find the absolute maximum and minimum of the function f ( x, y ) = 1 + 4 x − 5 y on


the closed triangular region with vertices (0, 0) , (2, 0) , and (0,3) .

23
24
Lab 5
Lagrange Multipliers

Consider a function f ( x, y, z ) which we want to maximize or minimize, subject to one or


more additional conditions called constraints that can be expressed in the form
F ( x, y, z ) = 0 . Then at the extremum of f, it is not hard to show that the gradient of the
function f must be parallel to the gradient of the constraint, so
∇f = λ ∇ F
at the extremum (if ∇F is not zero there), where λ is a constant of proportionality called
a Lagrange multiplier. If there are two constraints, say F ( x, y, z ) = 0 and G ( x, y, z ) = 0 ,
then at the extremum of f we write
∇f = λ∇F + μ∇G
where λ and μ are constants (we assume ∇F and ∇G are not zero at the extremum).

Exercise 1: Find the point on the plane x + 2 y + 3 z = 6 that lies closest to the origin.
Solution: Here the constraint is that the point ( x, y, z ) that we seek must lie on the given
plane. We can write the constraint as F ( x, y, z ) = x + 2 y + 3z − 6 = 0 . The function we
wish to minimize is the distance D = x 2 + y 2 + z 2 from the origin to ( x, y, z ) . By the
way, the distance is a minimum if and only if the square distance is a minimum, so we
can equivalently minimize the square distance function f ( x, y, z ) = D 2 = x 2 + y 2 + z 2 .
Using ∇f = λ∇F we get
2 x, y, z = λ 1, 2,3

so we get three equations


1 3
x= λ, y = λ, z = λ, [1]
2 2
for 4 unknowns x, y, z, and λ . We need one more equation. That’s the constraint itself:
x + 2 y + 3z − 6 = 0 . [2]
14 6
Plugging the expressions [1] into [2], we get λ − 6 = 0 , or λ = . Plugging this into
2 7
3 6 9
[1] yields x = , y = , z = . Finally, plug this into the formula for D to find the
7 7 7
2 2 2
⎛3⎞ ⎛6⎞ ⎛9⎞ 126
minimum distance, which is D = ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟ = .
⎝7⎠ ⎝7⎠ ⎝7⎠ 7

25
Example 2: Find the extreme values of the function f ( x, y, z , t ) = xyzt , subject to the
constraints x − z = 2 and y 2 + t = 4 , on the domain 0 ≤ x ≤ 2 , −2 ≤ y ≤ 2 .
Solution: First the boundary values: At x = 0 we see that f (0, y, z , t ) = 0 , while at x = 2 ,
the constraint x − z = 2 gives z = 0 so again f ( x, y, 0, t ) = 0 . Likewise if y = ±2 then the
constraint y 2 + t = 4 gives t = 0 , and then again we obtain f ( x, y, z , 0) = 0 .
Next we find the extreme values in the interior of the domain. Write the constraints as
F ( x, y , z , t ) = x − z − 2 = 0
G ( x, y , z , t ) = y 2 + t − 4 = 0
Then we have the condition
∇f = λ∇F + μ∇G ⇒ yzt , xzt , xyt , xyz = λ 1, 0, −1, 0 + μ 0, 2 y, 0,1 .

This gives four equations:


yzt = λ
xzt = 2μ y
.
xyt = −λ
xyz = μ
From these 4 equations and the 2 constraints, we should be able to solve for the 6
unknowns x, y, z, t, λ , and μ . First observe that if λ = 0 then by the first equation in this
list yzt = 0 , so then f ( x, y, z , t ) = xyzt = 0 as well. Next observe that if μ = 0 then by the
last equation in the list xyz = 0 , so once again f ( x, y, z , t ) = xyzt = 0 .
So now assume that neither λ nor μ are zero. Add the first equation to the third to get
yzt + xyt = ( x + z ) yt = 0 . Since neither y nor t can be zero, we must have z = − x . From
the constraint x − z − 2 = 0 , we then get that x = 1 and z = −1 .
Likewise, the second and fourth equations can be combined to yield xzt − 2 xy 2 z = 0 .
Since neither x nor z can be zero, we get t = 2 y 2 . Using this in the constraint
y 2 + t − 4 = 0 , we get 3 y 2 = 4 , so y = ±2 / 3 and t = 8 / 3 .

⎛ 2 8⎞ 16
At these points, we see that f ⎜1, ± , −1, ⎟ = . Comparing to the value
⎝ 3 3⎠ 3 3
f ( x, y, z , t ) = 0 that we got when either one of the multipliers was zero or when we were
16
on the boundary of the domain, we see that the absolute maximum is and occurs at
3 3
⎛ 2 8⎞ 16 ⎛ 2 8⎞
⎜1, − , −1, ⎟ , while the absolute minimum is − and occurs at ⎜1, , −1, ⎟ .
⎝ 3 3⎠ 3 3 ⎝ 3 3⎠

26
Exercise 3: Find the volume of the largest rectangular box which has three of its vertices
on the positive x-, y-, and z-axes and one of its vertices on the plane 2 x + 3 y + 4 z = 12 .

Solution: We must maximize the volume V ( x, y, z ) = xyz , subject to the constraint


F ( x, y, z ) = 2 x + 3 y + 4 z − 12 = 0 . So we must solve
∇V = λ ∇F ⇒ yz , xz , xy = λ 2,3, 4

together with the constraint. The above vector equation gives three scalar equations:
yz = 2λ
xz = 3λ .
xy = 4λ
Right away, we can tell that if any of the coordinates were zero then we’d have
V ( x, y, z ) = xyz = 0 , which is a minimum not a maximum of the volume. So the
coordinates are all nonzero and we see that λ can’t be zero either. Then we can divide
x 3
the second equation by the first to get = and we can divide the third by the second to
y 2
y 4
get = . That is, 2 x = 3 y = 4 z . Using this, we can eliminate y and z from the
z 3
4
constraint, which becomes 6 x = 12 , so x = 2 . Then y = and z = 1 . Thus
3
⎛ 4 ⎞ 8
V ⎜ 2, ,1⎟ = is the maximum volume.
⎝ 3 ⎠ 3

27
Your lab instructor will solve the following problems in the lab:

1. Say the termperature T at any point ( x, y, z ) in space is given by T = 4 xyz 2 . Find


the hottest point on the sphere x 2 + y 2 + z 2 = 100 .
2. Show that the product of the angles of a triangle is largest when the triangle is
equilateral.
3. Let C denote the line of intersection of the planes 3x + 2 y + z = 6 and
x − 4 y + 2 z = 8 . Find the point on C that is closest to the origin.
4. A container is constructed in the shape of a cylinder with a top and a bottom (e.g., a
beer can). If the surface area of the container has a fixed value S, find the radius and
height of the container that will maximize the enclosed volume.

Exercises:

1. Find the maximum value of f ( x, y, z ) = x + y + z on the sphere x 2 + y 2 + z 2 = 25 .


2. Let C be the curve of intersection of the surface y 2 − z 2 = 1 and the plane x − y = 1 .
Find the minimum value of f ( x, y, z ) = x 2 + y 2 + z 2 on C.
3. What is the volume of the largest rectangular box (with edges parallel to the axes)
x2 y 2 z 2
which can be inscribed in the ellipsoid + + = 1?
36 9 16
4. Find the point on the plane z = 4 x + 9 y which is closest to the point (1,1, 2) .

28
Lab 6
Double Integrals

The double integral of the continuous function f ( x, y ) over the rectangular region R is
defined by the double Riemann sum

∑∑ f ( x , y ) Δx Δy
n m

∫∫ f ( x, y )dA = lim * *
ij ij ij ij
m , n →∞
R i =1 j =1

Double integrals can also be defined over more general regions. They can be computed as
interated integrals; i.e., we can write them out as nested 1-dimensional integrals. For
example, the double integral of f ( x, y ) over the rectangle R = [a, b] × [c, d ] (this can also
be written as R = {( x, y ) | a ≤ x ≤ b, c ≤ y ≤ d } ) is

d b b d
∫∫
R
f ( x, y )dA = ∫
c ∫ a
f ( x, y )dxdy = ∫
a ∫ c
f ( x, y ) dydx .

You should read ∫∫ f ( x, y)dxdy as ∫ ( ∫ f ( x, y)dx )dy ; that is, you do the “inside” integral
first.
For rectangular regions, the order doesn’t matter, but for nonrectangular regions, it
usually does matter. For example, let D = {( x, y ) | a ≤ x ≤ b, g1 ( x) ≤ y ≤ g 2 ( x)} be the
region bounded on the left by the vertical line x = a , on the right by the vertical line
x = b , below by the curve y = g1 ( x) , and above by the curve y = g 2 ( x) . This is
sometimes called a type I region. Then there is only one way to iterate this integral. We
have to do the y-integration first:

b g2 ( x )
∫∫ f ( x, y)dA = ∫ ∫
D
a g1 ( x )
f ( x, y )dydx .

You should be able to see that doing the x-integration first makes no sense.

29
There are also type II regions. These are bounded horizontally by lines and vertically by
curves, so they have the form D = {( x, y ) | g1 ( y ) ≤ x ≤ g 2 ( y ), c ≤ y ≤ d } . For these, do the
x-integration first.

d g2 ( y )
∫∫ f ( x, y)dA = ∫ ∫
D
c g1 ( y )
f ( x, y )dxdy .

Example 1: Find ∫∫ f ( x, y)dA if R is the rectangle R = [0,1] × [1, 2] and


R
f ( x, y ) = xy + x 2 .

Solution:

∫ ( xy + x ) dxdy
2 1
∫∫ f ( x, y )dA = ∫ 2
1 0
R
x =1
⎡12 1 ⎤
= ∫ ⎢ x 2 y + x3 ⎥ dy
1
⎣2 3 ⎦ x =0
2⎛ 1 1⎞
= ∫ ⎜ y + ⎟ dy
1
⎝2 3⎠
y =2
⎡1 1 ⎤ 13
= ⎢ y2 + y⎥ =
⎣4 3 ⎦ y =1 12
Notice that when we do the x-integration, y is treated as a constant.

Example 2: Find ∫∫ f ( x, y)dA if D is the region D = {( x, y) | 0 ≤ x ≤ 1 + y, − 1 ≤ y ≤ 1} and


D
f ( x, y ) = x + y .
Solution: This is written as a type II region, so write
1+ y
∫∫ f ( x, y)dA = ∫ ∫ ( x + y ) dxdy
1

−1 0
D
x =1+ y
⎡11 ⎤
= ∫ ⎢ x 2 + xy ⎥ dy

−1 2
⎦ x =0
1 ⎛1 ⎞

−1 2
(
= ∫ ⎜ 1 + 2 y + y 2 + y (1 + y ) ⎟ dy

)
1 ⎛1 3 ⎞
= ∫ ⎜ + 2 y + y 2 ⎟ dy

−1 2 2 ⎠
y =1
⎡1 1 ⎤
= ⎢ y + y 2 + y3 ⎥ =2
⎣2 2 ⎦ y =−1

30
Notice that in this case, we could also write D as a type I region
D = {( x, y ) | 0 ≤ x ≤ 2, x − 1 ≤ y ≤ 1} . You may wish to compute this integral as an integral

∫∫ f ( x, y)dA = ∫ ∫ ( x + y ) dydx
2 1
over this type I region by writing to ensure you get the
0 x −1
D
same answer either way.

Example 3: Sometimes a double integral that can be written both in type I form and in
type II form is hard or impossible to compute in one form but easy to compute in the
other form. This trick is sometimes called interchanging the order of integration, for
1 1
∫ ∫
2
obvious reasons. To see how it works, use it to compute e x dxdy .
0 y

Solution: The problem here is that we’ve written this as type II, but we do not know how
to do the inside integral. However, notice by referring to the sketch of the region of
integration D on the right, that we can rewrite this as type I:
D = {( x, y ) | y ≤ x ≤ 1, 0 ≤ y ≤ 1}
= {( x, y ) | 0 ≤ x ≤ 1, 0 ≤ y ≤ x}
Then we can write
1 1 1 x
∫ ∫ e x dxdy = ∫ ∫
2 2
e x dydx
0 y 0 0
y=x
= ∫ ⎡ ye x ⎤ dx
1 2

0⎣ ⎦ y =0
1
= ∫ xe x dx
2

1 1 u e −1
= ∫
2 0
e du =
2
which was easy to evaluate with the simple substitution u = x 2 .

( )
1 1
Example 4: Evaluate ∫ ∫
0 y2
cos x3/ 2 dxdy .

Solution: Again we are unable to do the inside integral, but by referring to the sketch of
the region of integration, we can rewrite the integral:

cos ( x3/ 2 ) dxdy = ∫ cos ( x3/ 2 ) dydx


1 1 1 x
∫ ∫
0 y 2
0 ∫ 0

y= x
= ∫ ⎡⎣ y cos ( x3/ 2 ) ⎤⎦
1
dx
0 y =0

= ∫ x1/ 2 cos ( x3/ 2 ) dx =


1 2 1 2
0 3 ∫ 0
cos udu = sin(1)
3
using the substitution u = x3/ 2 .

31
Your lab instructor will solve the following problems in the lab:

Evaluate the following integrals:


3 5
a) ∫ ∫
0 −2
(2 xy + x)dxdy .

1 x
b) ∫ ∫
0 0
xydydx .

c) ∫∫ e
y2
dA , where D = {( x, y ) | 0 ≤ x ≤ y, 0 ≤ y ≤ 1} .
D

π π sin y
d) ∫ ∫
0 x y
dydx .

8 2 1
e) ∫ ∫
0 x1/ 3 y +1
4
dydx .

Exercises:

1. Evaluate

∫∫ x y 2 dA , R = [0, a ] × [0, b] .
2
a)
R

b) ∫∫
R
1 − y 2 dA , R is the triangle with vertices (0, 0) , (1, 0) , and (1,1) .

∫∫ xy dA , D is the region in the first quadrant lying between the curves y = x2


2
c)
D

and x = y 2 .

d) ∫∫ e
y3
{ }
dA , D = ( x, y ) | 0 ≤ x ≤ 1, x ≤ y ≤ 1 .
D

2. The volume of the solid region that lies above the region D in the xy-plane and
under the graph of z = f ( x, y ) ≥ 0 is given by the double integral V = ∫∫ f ( x, y )dA .
D
Find the volume of the region enclosed by the planes z = x + y , z = 6 , x = 0 ,
y = 0 , and z = 0 . [Hint: sketch the region first.]

3. Find the volume of the region that lies below the surface z = 1 − x 2 and above the
region in the xy-plane given by D = {( x, y ) | 0 ≤ x ≤ 1, 0 ≤ y ≤ x} .

32
Lab 7
Polar Coordinates, Centre of Mass, Surface Area
The transformation between polar and Cartesian coordinates is given by
x = r cos θ
y = r sin θ
or, in the opposite direction

r = x2 + y2
y .
tan θ =
x

The double integral over the region D = {(r , θ ) | a ≤ r ≤ b, α ≤ θ ≤ β } is


β b
∫∫ f ( x, y)dA = ∫ α ∫
D
a
f (r cos θ , r sin θ )rdrdθ .

The easiest way to remember this is the mnemonic formula dA = dxdy = rdrdθ .

Applications of Double Integrals:

An application that we’ve already seen is that if f ( x, y ) ≥ 0 for all ( x, y ) ∈ D then

∫∫ f ( x, y)dA = vol
D

is the volume of the region lying under the graph of z = f ( x, y ) and above the region D
in the xy-plane.

Our second application will be to surface area. The graph of z = f ( x, y ) is a surface in 3-


dimensional space. Let S be the part of that surface that lies directly over (or under, if f is
negative of course) the region D in the xy-plane. Then the surface area of S is given by a
double integral:
2
⎛ ∂f ⎞ ⎛ ∂f ⎞
2

A( S ) = ∫∫ 1 + ⎜ ⎟ + ⎜ ⎟ dA .
D ⎝ ∂x ⎠ ⎝ ∂y ⎠

For our third application, consider a lamina (a flat, thin object or thin film) whose mass
density per unit area is ρ ( x, y ) . If the lamina occupies a region D is the xy-plane then the
total mass of the lamina is
m = ∫∫ ρ ( x, y )dA .
D

The mass moments of the lamina about the coordinate axes are defined to be

33
M x = ∫∫ y ρ ( x, y )dA
D

M y = ∫∫ x ρ ( x, y )dA
D

These are used to compute the centre of mass ( x , y ) , which is defined by

My
x=
m .
M
y= x
m
In fact, one can even compute moments of inertia which measure the resistance of the
lamina to rigid rotation about one of the coordinate axes. These are given by
I x = ∫∫ y 2 ρ ( x, y )dA
D
.
I y = ∫∫ x 2 ρ ( x, y )dA
D

The moment of inertia about the origin is


I 0 = ∫∫ ( x 2 + y 2 ) ρ ( x, y )dA = ∫∫ r 2 ρ ( x, y )dA = I x + I y .
D D

Example 1: Evaluate ∫∫ cos ( 2θ )dA , where D is the region in the first quandrant lying
D
inside the curve r = sin(2θ ) .
Solution: Using the graph of r = sin(2θ ) , we see that we
⎧ π⎫
can express D as D = ⎨(r ,θ ) | 0 ≤ r ≤ sin 2θ , 0 ≤ θ ≤ ⎬ .
⎩ 2⎭
Therefore we must compute
π /2 sin ( 2θ )
∫∫ cos ( 2θ )dA = ∫
D
0 ∫ 0
cos ( 2θ ) rdrdθ

r = sin ( 2θ )
π /2 ⎡1 2 ⎤
=∫
0 ⎢⎣ 2 r cos ( 2θ ) ⎥⎦ dθ
r =0

1 π /2 2
sin ( 2θ ) cos ( 2θ ) dθ
2 ∫0
=

1 π /2
= ⎡⎣sin 3 ( 2θ ) ⎤⎦ = 0
4 0

34
2 4− x2 xy
Example 2: Evaluate ∫ ∫
0 0
x + y2
2
dydx .

Solution: From the sketch, we see this is a double integral


over a region D that can be expressed as

{
D = ( x, y ) | 0 ≤ x ≤ 2, 0 ≤ y ≤ 4 − x 2 }
,
⎧ π⎫
= ⎨(r ,θ ) | 0 ≤ r ≤ 2, 0 ≤ θ ≤ ⎬
⎩ 2⎭

so D is just a quarter-circle of radius 2 centred on the origin. If we re-express the double


integral in polar coordinates (don’t forget: dA = rdrdθ ), we get
4− x2 xy π /2 ( r cos θ )( r sin θ ) rdrdθ
∫ ∫
2
dydx = ∫ ∫
2

0 0
x2 + y2 0 0 r
π /2 2
=∫ sin θ cos θ dθ ∫ r 2 dr
0 0
θ =π / 2 r =2
⎡1 ⎤ ⎡1 3 ⎤
= ⎢ sin 2 θ ⎥ r
⎣2 ⎦θ =0 ⎢⎣ 3 ⎥⎦ r =0
4
=
3

Example 3: Find the volume of the solid region lying in the first octant and inside both
the sphere x 2 + y 2 + z 2 = 4 and the cylinder x 2 + ( y − 1) = 1 .
2

Solution: Since the region lies in the first octant, it lies


above the xy-plane and over the first quadrant of that plane.
The sphere lies above the disk of radius 2 about the origin
in the xy-plane. The cylinder covers the disk of radius 1
about centre (0,1). So the region D looks like the picture on
the right.
Now the circle x 2 + ( y − 1) = 1 in the z = 0 plane can be
2

described in polar coordinates as

x 2 + ( y − 1) = 1
2

⇒ r 2 cos 2 θ + ( r sin θ − 1) = 1
2

⇒ r 2 − 2r sin θ = 0
⇒ r = 2sin θ or r = 0

35
Thus we want to evaluate ∫∫ 4 − x 2 − y 2 dA where D = {(r , θ ) | 0 ≤ r ≤ 2sin θ , 0 ≤ θ ≤ π } .
D
Using polar coordinates, we can write the integral as
π /2 2sin θ
∫∫ D
4 − x 2 − y 2 dA = ∫
0 ∫ 0
4 − r 2 rdrdθ

r = 2sin θ
⎡ 1 ⎤
( )
π /2
=∫
3/ 2
⎢⎣ − 3 4 − r
2
⎥⎦ dθ
0
r =0

8 π /2
3 ∫0 ⎣
= ⎡1 − cos3 θ ⎤⎦dθ

4
= ( 3π − 4 )
9
where in the last step we left out the details of computing the final one-dimensional
integral over theta.

Example 4: Compute the surface area of the portion of the sphere lying above D in the
last example.
Solution:

z = 4 − x2 − y2
∂z x ∂z y
⇒ =− , =−
∂x 4 − x2 − y 2 ∂y 4 − x2 − y2
2
⎛ ∂z ⎞ ⎛ ∂z ⎞ x2 + y 2
2
2
⇒ 1+ ⎜ ⎟ + ⎜ ⎟ = 1+ =
⎝ ∂x ⎠ ⎝ ∂y ⎠ 4− x − y
2 2
4 − x2 − y 2
so the surface area is
2
⎛ ∂z ⎞ ⎛ ∂z ⎞
2

S ( D) = ∫∫ 1 + ⎜ ⎟ + ⎜ ⎟ dA
D ⎝ ∂x ⎠ ⎝ ∂y ⎠
π / 2 2sin θ 2
=∫ ∫ rdrdθ
0 0
4 − r2
π /2 r = 2sin θ
=∫ ⎡− 4 − r 2 ⎤ dθ
0 ⎣ ⎦ r =0
π /2
= 2∫
0
(1 − cos θ )dθ
⎡π ⎤
= 2 ⎢ − 1⎥
⎣2 ⎦

36
Your lab instructor will solve the following problems in the lab:

1. Find the volume lying between the paraboloids z = x 2 + y 2 and 3z = 4 − x 2 − y 2 .


2. A thin plate lying in the xy-plane is bounded by the curves x 2 + 4 y 2 = 12 and
x = 4 y 2 and has a mass density ρ ( x, y ) = x . Find the total mass of the plate.
3. The centroid of an object is the centre of mass computed under the assumption that
the mass density is ρ = 1 . Find the centroid of the region in the xy-plane that lies
inside the cardioid r = a (1 + cos θ ) and outside the circle r = a .

4. Find the surface area of the part of the paraboloid z = x 2 + y 2 that lies under the
plane z = 4 .

Exercises:

1. Evaluate ∫∫
R
x 2 + y 2 dA where R is the region in the xy-plane lying between the

curves x + y 2 = 9 and x 2 + y 2 = 16 .
2

2. Find the volume lying inside both the sphere x 2 + y 2 + z 2 = a 2 and the cylinder
x 2 + y 2 = ax .
3. Find the surface area of that part of the hyperbolic paraboloid z = x 2 − y 2 that lies
inside the cylinder x 2 + y 2 = 4 .
4. Find the mass and centre of mass of the triangular region in the xy-plane with
vertices (0, 0) , (1,1) , and (4, 0) if the mass density is ρ ( x, y ) = x .

37
38
Lab 8
Triple Integrals
Part I: Cartesian Coordinates
The triple integral of f ( x, y, z ) over a 3-dimensional region B is defined by the triple
Riemann sum

∑∑∑ f ( x , y , z )ΔV .
l m n

∫∫∫ f ( x, y, z )dV = lim * * *


ij ij ij
l , m , n →∞
B i =1 j =1 k =1

For the case where B is a rectangular box B = {( x, y, z ) | a ≤ x ≤ b, c ≤ y ≤ d , s ≤ z ≤ t} , we


can write this as an iterated intergral
b d t
∫∫∫ f ( x, y, z )dV = ∫ ∫ ∫
B
a c s
f ( x, y, z )dzdydx .

Just as with 2-dimensional integrals, Fubini’s theorem allows us to interchange the order
of integration if f is a continuous function on B.
Triple integrals on more general bounded regions can be expressed as iterated integrals.
For example, if E = {( x, y, z ) | a ≤ x ≤ b, g1 ( x) ≤ y ≤ g 2 ( x), u1 ( x, y ) ≤ z ≤ u2 ( x, y )} , then
we can write
b g2 ( x ) u2 ( x , y )
∫∫∫
B
f ( x, y, z )dV = ∫
a ∫ g1 ( x ) ∫ u1 ( x , y )
f ( x, y, z )dzdydx .

Example 1: Find ∫∫∫ ydV


E
where E is the tetrahedron with

vertices (0, 0, 0) , (1, 0, 0) , (0,1, 0) , and (0, 0,1) .


Solution: We can express E as the region
E = {( x, y, z ) | ( x, y ) ∈ D, 0 ≤ z ≤ 1 − x − y}

because the plane z = 1 − x − y is one face of the tetrahedron. The region D is the triangle
in the xy plane given by
D = {( x, y ) | 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 − x} .

Then we can iterate


y =1− x
1− x 1− x − y 1− x ⎡1 1 ⎤
y (1 − x − y ) dydx = ∫ ⎢ y 2 (1 − x ) − y 3 ⎥
1 1 1
∫∫∫ ydV = ∫ ∫ ∫
B
0 0 0
ydzdydx = ∫
0 ∫ 0

0 2 3 ⎦ y =0
dx

1⎛ 1 1 3⎞ 1 1 1
= ∫ ⎜ (1 − x ) − (1 − x ) ⎟ dx = ∫ (1 − x ) dx =
3 3


0 2 3 ⎠ 6 0 24

39
Example 2: Evaluate ∫∫∫
E
y 2 + z 2 dV where E is the region

lying between the paraboloid x = y 2 + z 2 and the plane


x =1.
Solution: This time we can write E as

{
E = ( x, y, z ) | y 2 + z 2 ≤ x ≤ 1, ( y, z ) ∈ D }
where

{
D = ( y, z ) | y 2 + z 2 ≤ 1 . }
We can partially iterate the integral in the form
1
∫∫∫
E
y 2 + z 2 dV = ∫∫ ∫
D
y2 + z2
y 2 + z 2 dxdA

= ∫∫ y 2 + z 2 [ x ]x = y 2 + z 2 dA
x =1
.
D

(
= ∫∫ ⎡ y 2 + z 2 ) ( ) ⎤dA
1/ 2 3/ 2
− y2 + z2
⎢⎣ ⎥⎦
D

Now the easiest way to do this integral is to introduce polar coordinates in the yz-plane,
so r 2 = y 2 + z 2 . Then we get D = {(r , θ ) | 0 ≤ r ≤ 1, 0 ≤ θ ≤ 2π } and

∫ ( r − r ) rdrdθ
2π 1
∫∫∫ y 2 + z 2 dV = ∫ 3
0 0
E
r =1
2π ⎡1 3 1 5 ⎤
=∫ ⎢⎣ 3 r − 5 r ⎥⎦ dθ .
0
r =0


=
15
Example 3: Find the volume of the region that lies under
the plane z = 1 + x + y and above the region in the xy-
plane bounded by the curves y = x , y = 0 , and x = 1 .
Solution: First, the volume of a 3-dimensional region E is given by
V ( E ) = ∫∫∫ dV .
E

We can write
E = {( x, y, z ) | 0 ≤ z ≤ 1 + x + y, ( x, y ) ∈ D}

{
D = ( x, y ) | 0 ≤ x ≤ 1, 0 ≤ y ≤ x . }
Then we can write the volume as

40
1 x 1+ x + y
V ( E ) = ∫∫∫ dV = ∫ ∫ ∫ dzdydx
0 0 0
E

∫ (1 + x + y ) dydx
1 x
=∫
0 0

y= x

1 1 ⎤
= ∫ ⎢ y (1 + x) + y 2 ⎥ dx
0
⎣ 2 ⎦ y =0
1⎛ 1 ⎞
= ∫ ⎜ x1/ 2 + x 3/ 2 + x ⎟ dx
0
⎝ 2 ⎠
1
⎡2 2
5/ 2
1 ⎤ 2 2 1 79
= ⎢ x 3/ 2 + + x2 ⎥ = + + =
⎣3 5 4 ⎦ 0 3 5 4 60

_______________________

Your lab instructor will solve the following problems in the lab:
1 2x y
1. Evaluate ∫ ∫ ∫
0 x 0
2 xyzdzdydx .

2. Evaluate ∫∫∫ 2 xdV


E
{ }
where E = ( x, y, z ) | 0 ≤ x ≤ 4 − y 2 , 0 ≤ y ≤ 2, 0 ≤ z ≤ y .

3. Find the volume of the tetrahedron enclosed by the coordinate planes and the plane
2x + y + z = 4 .

Exercises:

1. Let B be the rectangular box B = {( x, y, z ) | 0 ≤ x ≤ a, 0 ≤ y ≤ b, 0 ≤ z ≤ c} . Evaluate

∫∫∫ ( xy )
+ z 3 dV .
2

2. Evaluate ∫∫∫ ( 3 + 2 xy ) dV ,
E
where E is the region lying above the xy-plane and

below the sphere x 2 + y 2 + z 2 = 4 .


3. Find the volume of the region E = {( x, y, z ) | 0 ≤ x ≤ 5, 0 ≤ y ≤ 3 x, y ≤ z ≤ x + 2} .

41
Part II: Cylindrical and Spherical Coordinates
Cylindrical coordinates (r , θ , z ) can be transformed to Cartesian coordinates by
x = r cos θ
y = r sin θ ,
z=z
where r ∈ [0, ∞) , θ ∈ [0, 2π ] , and z ∈ (−∞, ∞) .
Spherical coordinates ( ρ ,θ , φ ) are related to Cartesian coordinates by
x = ρ cos θ sin φ
y = ρ sin θ sin φ ,
z = ρ cos φ
where ρ ∈ [0, ∞) , θ ∈ [0, 2π ] , and φ ∈ [0, π ] . Then φ is the
polar angle and is measured downwards starting from the
positive z-axis (the polar axis) and θ is the azimuthal angle
measured counterclockwise from the positive x-axis.
Notice that the spherical radial coordinate measures
disatnce from the origin and is

ρ = x2 + y 2 + z 2
while the cylindrical radial coordinate measures distance from the z-axis and is

r = x2 + y2 .
The triple integral of f ( x, y, z ) over the region

E = {( r ,θ , z ) | α ≤ θ ≤ β , h1 (θ ) ≤ r ≤ h2 (θ ), u1 (r ,θ ) ≤ z ≤ u2 (r ,θ )}

specified in cylindrical coordinates can be expressed as the iterated integral

∫∫∫
E
f ( x, y, z )dV = ∫ ⎛⎜ ∫
β h2 (θ )

α ⎝ h1 (θ ) (∫ u2 ( r ,θ )

u1 ( r ,θ ) )
f (r cos θ , r sin θ , z )dz rdr ⎞⎟ dθ .

The triple integral of f ( x, y, z ) over the region

E = {( ρ ,θ , φ ) | a ≤ ρ ≤ b, α ≤ θ ≤ β , c ≤ φ ≤ d }

specified in spherical coordinates can be expressed as the iterated integral

∫∫∫ f ( x, y, z)dV = ∫ ⎜⎝ ∫ α ( ∫
E
d

c
⎛ β b

a ⎠ )
f ( ρ cos θ sin φ , ρ sin θ sin φ , ρ cos φ ) ρ 2 d ρ dθ ⎞⎟ sin φ dφ .

It is useful to keep in mind the mnemonic expression


dV = dxdydz = rdrdθ dz = ρ 2 sin φ d ρ dθ dφ

42
for the 3-dimensional volume element. Confusingly, many textbooks use θ for the polar
angle and φ for the azimuth. The important thing to remember is that, whatever you call
it, the polar angle has domain [0, π ] and its sine appears in the volume element. The
azimuthal angle is the one with domain [0, 2π ] , and its sine does not appear in dV. [Also,
many books use r for the spherical radial coordinate and ρ for the cylindrical radius.]

Example 1: Let E be the region lying above the xy-plane and below the sphere
x 2 + y 2 + z 2 = 4 . Compute ∫∫∫ zdV .
E

Solution: First let’s try cylindrical coordinates. Then the region E can be expressed as

{
E = (r , θ , z ) | 0 ≤ r ≤ 4 − z 2 , 0 ≤ θ ≤ 2π , 0 ≤ z ≤ 2 }
and then we get
2π 2 4− z 2
∫∫∫ zdV = ∫
E
0 ∫ ∫ 0 0
zrdrdzdθ

r = 4− z 2
2 4− z 2 2 ⎡1 2 ⎤
= 2π ∫ ∫ zrdrdz = 2π ∫ ⎢2 r ⎥ zdz .
0 0 0
⎣ ⎦ r =0
2
⎡ 1 ⎤
(4 − z )
2
=π∫ 2
zdz = π ⎢ 2 z 2 − z 4 ⎥ = 4π
0
⎣ 4 ⎦0
You can also do it with spherical polar coordinates by expressing E as
⎧ π⎫
E = ⎨( ρ ,θ , φ ) | 0 ≤ ρ ≤ 2, 0 ≤ θ ≤ 2π , 0 ≤ φ ≤ ⎬ .
⎩ 2⎭
Then
2π π /2 2
∫∫∫ zdV = ∫ ∫ ∫
E
0 0 0
( ρ cos φ ) ρ 2 d ρ sin φ dφdθ

= 2π (∫ π /2

0
sin φ cos φ dφ )( ∫ 2

0
ρ 3d ρ ) .
π /2 2
⎡1 ⎤ ⎡1 ⎤
= 2π ⎢ sin 2 φ ⎥ ⎢ ρ 4 ⎥ = 4π
⎣2 ⎦0 ⎣ 4 ⎦0

∫∫∫ z dV
2
Example 2: Compute where E is the region lying inside the sphere
E

x 2 + y 2 + ( z − 1) 2 = 1 of radius 1 with centre (0, 0,1) .


Solution: We can rewrite the equation of this sphere in spherical coordinates as follows:

43
( )
1 = x 2 + y 2 + ( z − 1) 2 = x 2 + y 2 + z 2 − 2 z + 1 = ρ 2 − 2 ρ cos φ + 1
⇒ 0 = ρ − 2 ρ cos φ = ρ ( ρ − 2 cos φ )
2
.
⇒ 0 = ρ − 2 cos φ or ρ = 0
so we can write
⎧ π⎫
E = ⎨( ρ ,θ , φ ) | 0 ≤ ρ ≤ 2 cos φ , 0 ≤ θ ≤ 2π , 0 ≤ φ ≤ ⎬ .
⎩ 2⎭
Then we can compute
2π π /2 2cos φ
∫∫∫ z dV = ∫ ∫ ∫ ( ρ cos φ ) ρ 2 d ρ sin φ dφdθ
2 2
0 0 0
E
π /2 2cos φ
= 2π ∫ cos 2 φ sin φ ∫ ρ 4 d ρ dφ
0 0
π /2
π /2 32 8π 8π
= 2π ∫ cos7 φ sin φ dφ = − cos8 φ =
0 5 5 0 5

Example 3: Find the volume of the solid that occupies the region that lies within the cone
z = 3r and below the sphere x 2 + y 2 + z 2 = r 2 + z 2 = 4 .
Solution: Let’s first convert this to spherical coordinates.
Then z = 3r ⇒ ρ cos φ = 3ρ sin φ , so the cone therefore
sin φ 1
is given by the equation = tan φ = (except of
cos φ 3
π
course at the vertex ρ = 0 ), and this implies that φ = .
6
Now it’s easy to convert the sphere x 2 + y 2 + z 2 = r 2 + z 2 = 4 to polar coordinates. It
becomes ρ = 2 , so

⎧ π⎫
E = ⎨( ρ ,θ , φ ) | 0 ≤ ρ ≤ 2, 0 ≤ θ ≤ 2π , 0 ≤ φ ≤ ⎬
⎩ 6⎭
and the integral becomes very easy. It’s
2
π /6 2π π /6 ⎡1 3 ⎤
sin φ dφ ∫ ρ d ρ = 2π [ − cos φ ]0
2 2 π /6
V (E) = ∫ ∫ ∫ ρ d ρdθ sin φ dφ = 2π ∫
2 2
⎢⎣ 3 ρ ⎥⎦
0 0 0 0 0
0
.
16π ⎛ 3⎞
= ⎜⎜ 1 − ⎟
3 ⎝ 2 ⎟⎠

44
Your lab instructor will solve the following problems in the lab:

1. Use cylindrical coordinates to find the volume of the region lying in the first octant,
bounded above by the paraboloid z = 4 − x 2 − y 2 and lying within the cylinder
x2 + y 2 = 2 x .
2. Find the volume of the region that lies inside the cone φ = α and the sphere ρ = a .

3. Compute ∫∫∫ z
E
x 2 + y 2 + z 2 dV where E is the region in problem 2.

Exercises:

∫∫∫ x dV
2
1. Compute where E is the interior of the unit sphere centred on the origin.
E

2. Consider the plane y = z and the paraboloid z = x 2 + y 2 . Convert these equations to


cylindrical coordinates. Solve them simultaneously to determine the r and θ values
where these two surfaces intersect. Find the volume of the region that lies between
these two surfaces.
3. Find the volume of the region that lies between the paraboloids z = 10 − x 2 − y 2 and
(
z = 2 x2 + y2 −1 . )

45
46
Lab 9
Line Integrals
Part I: Definition of Line Integrals

The line integral with respect to arclength of a function f along a parametrized curve C
given by r (t ) = x(t ), y (t ) in R 2 with α ≤ t ≤ β is
2 2
β ⎛ dx ⎞ ⎛ dy ⎞
∫ f ( x, y )ds = ∫ f ( x(t ), y (t ) ) ⎜ ⎟ + ⎜ ⎟ dt .
C α
⎝ dt ⎠ ⎝ dt ⎠

The line integrals with respect to x and y of a function f along a parametrized curve C
given by r (t ) = x(t ), y (t ) in R 2 with α ≤ t ≤ β are
β dx
∫ f ( x, y )dx = ∫ f ( x(t ), y (t ) ) dt
C α dt
.
β dy
∫ f ( x, y )dy = ∫ f ( x(t ), y (t ) ) dt
C α dt

The line integral of the vector field F ( x, y ) = P( x, y ), Q( x, y ) along a parametrized


curve C given by r (t ) = x(t ), y (t ) in R 2 with α ≤ t ≤ β is

∫ C
F ⋅ dr = ∫ F ⋅ T(t )ds = ∫
C C
( Pdx + Qdy )
r′(t )
where T = is the unit tangent vector along the curve.
r′(t )

All these definitions generalize to 3 and more dimensions. For example, in R 3 let C be
the space curve r (t ) = x(t ), y (t ), z (t ) and let F( x, y, z ) = P( x, y, z ), Q( x, y, z ), R( x, y, z )
be a vector field. Then we have
2 2 2
β ⎛ dx ⎞ ⎛ dy ⎞ ⎛ dz ⎞
∫ f ( x, y, x)ds = ∫ f ( x(t ), y (t ), z (t ) ) ⎜ ⎟ + ⎜ ⎟ + ⎜ ⎟ dt
C α
⎝ dt ⎠ ⎝ dt ⎠ ⎝ dt ⎠
and

∫ C
F ⋅ dr = ∫ F ⋅ T(t )ds = ∫
C C
( Pdx + Qdy + Rdz ) .
It has become conventional not to write the parentheses in the last equation, which is
therefore often written as

47
∫ C
F ⋅ dr = ∫ F ⋅ T(t )ds = ∫ Pdx + Qdy + Rdz .
C C

In summary, all line integrals are nothing more than ordinary one-dimensional integrals
with respect to the parameter of a curve.

Example 1: A thin wire can be described as a curve C. Its mass m is the line integral of
the linear mass density ρ along the curve, so

m = ∫ ρ ds .
C

Find the mass of a thin wire that has shape y = 4 x , 0 ≤ x ≤ 8 , and has linear mass
density ρ = y .
Solution: There are many ways to parametrize a curve. One way to parametrize this curve
is to use x itself as the parameter, so x(t ) = t , y (t ) = 4 t , 0 ≤ t ≤ 8 . Then we get
2 2
⎛ dx ⎞ ⎛ dy ⎞ 4
ds = dx + dy = ⎜ ⎟ + ⎜ ⎟ dt = 1 + dt .
2 2

⎝ dt ⎠ ⎝ dt ⎠ t
Thus
8
4 8
m = ∫ yds = ∫ 4 t 1 + dt = 4 ∫ t + 4dt = ( t + 4 )
8 64 3/ 2
( )
8 8
= ⎡⎣123/ 2 − 43/ 2 ⎤⎦ =
3/ 2
3 −1
C 0 t 0 3 0 3 3
.

Example 2: Evaluate ∫ (8 x + 4 y ) ds
C
where C is the part of the circle x 2 + y 2 = 25 that
lies in the first quadrant, beginning at (1, 0) and ending at (0,1) .
Solution: We must parametrize the circle. We will choose the parametrization
x(t ) = 5cos t
y (t ) = 5sin t .
π
0≤t ≤
2
It’s very important to note that the chosen parametrization has the correct sense. That is,
we have been told to begin at (1, 0) and follow the circle through the first quadrant until
the curve C ends at (0,1) . Therefore, the parameter should be chosen so that it increases
as we follow the curve from (1, 0) to (0,1) in the first quadrant. [That’s why we didn’t
π
choose x(t ) = 5sin t , y (t ) = 5cos t , 0 ≤ t ≤ for example.]
2
With our chosen parametrization then
2 2
⎛ dx ⎞ ⎛ dy ⎞
( 5sin t ) + ( 5cos t )
2 2
ds = dx + dy = ⎜ ⎟ + ⎜ ⎟ dt =
2 2
dt = 5dt
⎝ dt ⎠ ⎝ dt ⎠

48
so
π /2
∫ C (8x + 4 y ) ds = ∫ 0 ( 40 cos t + 20sin t ) 5dt = [ 200sin t − 100 cos t ]0
π /2
= 300 .

Example 3: Compute the line integral of the vector field


F = x, 2 y over the curve C given by the triangle with vertices
(0, 0) , (1, 0) , and (1,1) , oriented counterclockwise.
Solution: “Oriented counterclockwise” means we choose the paraemeter to increase as
we move around the curve in a counterclockwise sense. Let the curve be comprised of
three parts as in the diagram:
C = C1 ∪ C2 ∪ C3 .
Then we have to compute

∫ C
F ⋅ dr = ∫ F ⋅ dr + ∫ F ⋅ dr + ∫ F ⋅ dr .
C1 C2 C3

C1 : This is the line segment from (0, 0) to (1, 0) . We can parametrize it as


x(t ) = t
x′(t ) = 1
y (t ) = 0 ⇒
y′(t ) = 0
0 ≤ t ≤1
and
1
1 2 1
∫ 0 ⎡⎣( t )(1) + 2 ( 0 )( 0 )⎤⎦ dt = 2 t 0 = 2 .
1
∫ C1 F ⋅ dr = ∫ C1 xdx + 2 ydy =

C2 : This is the line segment from (1, 0) to (1,1) . We can parametrize it as


x(t ) = 1
x′(t ) = 0
y (t ) = t ⇒
y′(t ) = 1
0 ≤ t ≤1
and

∫ C2 F ⋅ dr = ∫ C2 xdx + 2 ydy = ∫ 0 ⎡⎣(1)( 0 ) + 2 ( t )(1)⎤⎦ dt = t 0 = 1 .


1 1
2

C3 : This is the line segment from (1,1) to (0, 0) . We can parametrize it (being careful
about the direction of the curve) as
x(t ) = 1 − t
x′(t ) = −1
y (t ) = 1 − t ⇒
y′(t ) = −1
0 ≤ t ≤1
and

49
3
F ⋅ dr = ∫ xdx + 2 ydy = ∫ ⎡⎣(1 − t )( −1) + 2 (1 − t )( −1) ⎤⎦ dt = ∫ ( 3t − 3) dt = − .
1 1
∫ C3 C3 0 0 2
1 3
Therefore ∫ C
F ⋅ dr = ∫ F ⋅ dr + ∫ F ⋅ dr + ∫ F ⋅ dr =
C1 C2 C3 2
+1− = 0 .
2

Example 4: Evaluate ∫ C
zydx + xzdy + xydz where C is the parametrized curve given by

x(t ) = t
y (t ) = t 2
.
z (t ) = t 3
0≤t ≤2
Solution:
2⎡ dx dy dz ⎤
∫ C
zydx + xzdy + xydz = ∫ ⎢ z (t ) y (t ) + x(t ) z (t ) + x(t ) y (t ) ⎥ dt
0
⎣ dt dt dt ⎦ .
2 2
= ∫ ⎡⎣t 5 + 2t 5 + 3t 5 ⎤⎦ dt = 6 ∫ t 5 dt = t 6 = 64
2

0 0 0

50
Your lab instructor will solve the following problems in the lab:

x, y
1. Evaluate ∫ F ⋅ dr where F( x, y ) = and C is the curve
( )
3/ 2
x2 + y2
C

r (t ) = e cos t ,sin t , 0 ≤ t ≤ 1 .
t

2. Evaluate ∫ C
F ⋅ dr where F( x, y, z ) = xz , y + z , x where C is the curve

r (t ) = et , e − t , e 2t , 0 ≤ t ≤ 1 .

3. Evaluate ∫ C
y 3dx − x 3 dy where C is the triangle with vertices (0, 0) , (1, 0) , and
(0,1) , oriented counterclockwise. Is there a scalar field whose gradient is
y 3 , − x3 ?

Exercises:

1. If F = 3 x − 2 y, y + 2 z , − x 2 , evaluate ∫ C
F ⋅ dr where C is the curve with initial
endpoint (0, 0, 0) and final endpoint (1,1,1) and defined by
a) the parametric equations x(t ) = t , y (t ) = t 2 , z (t ) = t 3 , 0 ≤ t ≤ 1 ,
b) union of line segments joining (0, 0, 0) to (0,1, 0) to (0,1,1) to (1,1,1) ,
c) the straight line from (0, 0, 0) to (1,1,1) ,
d) the portion of the curve of intersection of the surfaces x = z 2 and z = y 2
between the two endpoints.
1 5/ 2
2. Evaluate ∫ C
xy 2 / 5 ds where C is the curve r (t ) =
2
t, t , 0 ≤ t ≤1.

51
Part II: Fundamental Theorem for Line Integrals

If F = ∇f then we say that f is the potential function for the vector field F and F is called
a conservative vector field. The fundamental theorem for line integrals states that, for a
curve C parametrized by r (t ) with a ≤ t ≤ b then

∫ F ⋅ dr = f ( r (t ) ) a = f ( r (b) ) − f ( r (a) ) .
b

In particular, if F is a conservative vector field then ∫ C


F ⋅ ds depends only on the
endpoints of the curve and does not otherwise depend on the details of the curve. This is
usually described by saying that line integrals of conservative vector fields are
independent of the path.
Notice further that if the path is a closed curve so that r (b) = r (a ) , then the right-hand
side of the above equation is zero, so

∫ C
F ⋅ dr = 0 .

That is, the line integral of a conservative vector field around a closed loop is zero.
Moreover, it is a fact that if ∫ C
F ⋅ dr = 0 for every closed path C in an open connected
region D, then F is a conservative vector field on D.

Example 5: Return to Example 3, where F = x, 2 y . We found there that ∫ C


F ⋅ dr = 0
for one particular closed loop C. The reason for this is that F is conservative and
therefore ∫ F ⋅ dr would be zero around every closed loop. To check this, we try to find
C

a potential function f. This is done by noticing that if such an f exists and if we write
∂f ∂f
F = P, Q , then it must be the case that P = and Q = . So we first try to solve the
∂x ∂y
∂f
differential equation P = . In our case, P ( x, y ) = x so
∂x
∂f 1
x= ⇒ f ( x, y ) = x 2 + g ( y )
∂x 2
where g ( y ) is the “constant”of integration. Differentiating this with respect to y yields
∂f
= g ′( y ) .
∂y
∂f
But we compare this to Q = , where in our case Q( x, y ) = 2 y . Then we must have
∂y
g ′( y ) = 2 y ⇒ g ( y ) = y 2 + const

52
so finally we can write
1 2
f ( x, y ) = x + y 2 + const .
2
We have now explicitly found a potential function f such that F = ∇f , so F is
conservative on R 2 and therefore ∫ C
F ⋅ dr = 0 for every closed curve C in R 2 . Thus the
result of Example 3 is just one example of this.
Example 6: We now revisit Example 4. There we computed ∫ C
zydx + xzdy + xydz . Is this
the line integral of a conservative vector field? From the definition

∫ C
F ⋅ dr = ∫
C
( Pdx + Qdy + Rdz )
where F( x, y, z ) = P( x, y, z ), Q( x, y, z ), R( x, y, z ) , we see that in this case

F = P, Q, R = yz , xz , xy .

So if this field is conservative, then we must have


∂f
P= = yz...[1]
∂x
∂f
Q= = xz...[2]
∂y
∂f
R= = xy...[3]
∂z
The only technique we have at this stage for checking whether a field is conservative is to
try to find an explicit potential function. If we succeed, it’s conservative. Integrating [1]
yields f ( x, y, z ) = xyz + g ( y, z ) . Differentiating this with respect to y yields
∂f ∂g ∂g
= xz + . Comparing to [2], we see that = 0 , so g ( y, z ) = g ( z ) does not depend
∂y ∂y ∂y
on y. Likewise, differentiating f ( x, y, z ) = xyz + g ( y, z ) with respect to z and comparing
to [3], we get that g ′( z ) = 0 so g is a constant. But this shows that
f ( x, y, z ) = xyz + const is indeed a potential function for F = P, Q, R = yz , xz , xy .
Thus F is conservative. Moreover, by the Fundamental Theorem for Line Integrals, we
can now write, for the curve C from example 4, that

∫ zydx + xzdy + xydz = f ( x(t ), y (t ) z (t ) ) 0 = x(t )t (t ) z (t ) 0 = t 6 = 64 .


2 2 2

C 0

53
Example 6: Let C be a curve from p to q. Show that ∫ C
x 2 ydx + 3 xy 2 dy is not independent
of the path C.
Solution: If it were independent of the path, then the vector field
F = P, Q = x 2 y,3 xy 2

would be conservative, so
∂f ∂f
F= ,
∂x ∂y
for some potential f. But Clairaut’s theorem tells us that
∂2 f ∂2 f
= .
∂x∂y ∂y∂x
∂f ∂f
Since = P and = Q for a conservative vector field, we get that
∂x ∂y
∂P ∂Q
= .
∂y ∂x
If this condition is violated, then F = P, Q cannot be conservative. But for our vector
field, we have
∂P
P = x2 y ⇒ = x2
∂y
and
∂Q
Q = 3xy 2 ⇒ = 3y2
∂x
∂P ∂Q
so ≠ and so F cannot be conservative.
∂y ∂x

54
Your lab instructor will solve the following problems in the lab:

x
1. Evaluate ∫ C
arctan ydx +
1+ y2
dy where C is any curve from (0,1) to (1,1) .

∫ (4x + 9 x 2 y 2 ) dx + ( 6 x 3 y + 6 y 5 ) dy = 0 for any closed curve C.


3
2. Show that
C

Exercises:

1. a) Use the methods of Example 6 to check that F = 3 y 2 + 5 y − 6 x, 6 xy + 5 x is


conservative.
b) Use the Fundamental Theorem for Line Integrals to compute

∫ (3 y + 5 y − 6 x ) dx + ( 6 xy + 5 x ) dy
2
C

along any path C joining initial endpoint (1, 0) to final endpoint (2,1) .

∫ (y ) ( )
+ 2 xy dx + x 2 + 2 xy dy = 0 for any closed curve C.
2
2. Show that
C

3. Find a potential function for F( x, y, z ) = e x cos y + yz , xz − e x sin y, xy . Use it to

∫ (e cos y + yz ) dx + ( xz − e x sin y ) dy + xydz where C is any curve from


x
evaluate
C

⎛ 1⎞
( 0, 0, 0 ) to ⎜ 0, π , ⎟ .
⎝ π⎠

55
56
Lab 10
Green’s Theorem

We say that a closed curve in the plane is positively oriented if the parameter, say t,
increases as the curve is traversed counterclockwise and the curve is traversed exactly
once as the parameter ranged through its allowed domain a ≤ t ≤ b . The curve is simple if
it does not self-intersect other than at the endpoints t = a and t = b (which clearly must
join to each other since the curve is closed).
Let C be a positively oriented, piecewise smooth, simple closed curve be the boundary of
a region D. Say that P and Q have continuous first partial derivatives on an open region
containing D. The Green’s Theorem states that
⎛ ∂Q ∂P ⎞
∫ C
Pdx + Qdy = ∫∫ ⎜
D ⎝ ∂x

∂y
⎟ dA .

The theorem also holds if the curve C bounding the region
D has several disjoint components, provided that when we
say that C is positively oriented, we mean that the region D
lies to the left when each component of the boundary curve
is traversed in the direction of increasing value of the
parameter.

Example 1: Use Green’s theorem to show that the area of D is given by the formula
1
2 ∫C
A( D) = xdy − ydx .

Solution: We can read off that P = − y and Q = x (don’t be fooled that we wrote the line
∂Q ∂P
integral in reverse order). Therefore − = 2 and so
∂x ∂y

1 1 ⎛ ∂Q ∂P ⎞ 1
2 ∫ C
xdy − ydx = ∫∫ ⎜ − ⎟ dA = ∫∫ 2dA = ∫∫ dA = A( D) .
2 D ⎝ ∂x ∂y ⎠ 2 D D

Example 2: Evaluate the line integral

∫ C ⎣ ( ) ⎦ (
⎡sin x 2 + 2 y ⎤ dx + y 3 − x dy )
for the curve C given in the diagram at the right.
Solution: Without Green’s Theorem, this would be a nasty integral, But with it, it’s easy.
∂Q ∂P
( )
We have P = sin x 2 + 2 y and Q = y 3 − x so −
∂x ∂y
= −1 − 2 = −3 . Then

∫ C ⎣ ( ) ⎦ ( )
⎡sin x 2 + 2 y ⎤ dx + y 3 − x dy = −3 dA .
∫∫D

57
It’s a simple exercise (we leave it to you!) from first-year calculus to show that the area
of the region D in the diagram is
13
A( D) = ∫∫ dA = .
D
3
Thus

∫ C
⎡ ( ) ⎤ (
⎣sin x + 2 y ⎦ dx + y − x dy = −13 .
2 3
)
Example 3: Use Green’s Theorem to evaluate the line
integral ∫ −3 x 2 ydx + e y dy where C is the closed curve
2

consisting of the line segment y = x − 2 from (1, −1) to


(4, 2) together with the portion of the parabola x = y 2 from
(4, 2) back to (1, −1) .
Solution:
⎛ ∂Q ∂P ⎞ 2 y+2
∫ −3 x 2 ydx + e y dy = ∫ Pdx + Qdy = ∫∫ ⎜ − ⎟ dA = ∫∫ 3 x dA = ∫ −1 ∫ y 2 3 x dxdy
2
2 2
C C
D ⎝
∂x ∂y ⎠ D
2
x= y+2 ⎡1 1 ⎤
= ∫ ⎡⎣ x 3 ⎤⎦ 2 dy = ∫ ⎡( y + 2 ) − y 6 ⎤ dy = ⎢ ( y + 2) 4 − y 7 ⎥ .
2 2 3
−1 ⎣ ⎦
−1 x= y
⎣4 7 ⎦ −1
1269
=
28
________________________

Your lab instructor will solve the following problems in the lab:

∫ ( 3x ) ( )
− 2 y dx + 11y 5 + 2 x dy where C is the
2
1. Use Green’s Theorem to evaluate
C

circle x 2 + y 2 = 10 , traversed counterclockwise.

∫ ( 6 xy ) ( )
− 5 y dx + 9 x 2 y 2 − 5 x dy where C is the ellipse x 2 + 4 y 2 = 16 ,
3
2. Evaluate
C

traversed counterclockwise.

∫ (2x ) ( )
− xy 3 dx + y 2 − 6 xy dy = 0 where C is
2
3. Use Green’s Theorem to show that
C

the square with vertices ( ±1, ±1) . Note that this does not mean that
F = 2 x 2 − xy 3 , y 2 − 6 xy is conservative, and in fact it is not conservative.

58
Exercises:

1. Use Green’s Theorem to compute ∫ C


F ⋅ dr where C is the curve in each of the

diagrams below and F = x 2 y 2 ,3x − y 3 :

a) b)

∫ ( )
⎡e x 11 − x 3 + 2 y ⎤ dx + [ − x + arcsin y ] dy
2
2. Evaluate where C is the circle
C⎣ ⎦
( x − 2 ) + ( y + 3)
2 2
= 64 , traversed counterclockwise.

3. Show that for a region D enclosed by a positively oriented cimple closed curve C,
the area of D is given by
A( D ) = ∫ xdy = − ∫ ydx .
C C

59
60
Lab 11
Surface Integrals

Consider a smooth parametrized surface S defined by


r (u , v) = x(u , v), y (u, v), z (u , v) ,

where u and v take values in some domain D in R 2 .

Now define the vectors


∂r ∂x ∂y ∂z
ru = = , ,
∂u ∂u ∂u ∂u
.
∂r ∂x ∂y ∂z
rv = = , ,
∂v ∂v ∂v ∂v
These vectors are tangent to the surface so, provided they are not parallel and neither one
is 0, their cross-product is a normal vector to the surface. Indeed, the vector ru × rv is
perpendicular to the tangent plane to S and has magnitude equal to the area of the
parallelogram in the tangent plane whose sides are ru and rv . It’s not hard to see (consult
the text) that the surface area of the surface S is just
A( S ) = ∫∫ ru × rv dA .
D

It’s very important to note here that dA refers to the area element in the uv-plane where
the parameters take their values. This isn’t the xy-plane, as you can see from the diagram
above, except in the special case that x and y themselves are chosen to be the parameters.
We’ll deal with that case momentarily.
More generally, the surface integral of a function f ( x, y, z ) over a smooth parametrized
surface S is

∫∫ f ( x, y, z )dS = ∫∫ f ( x(u, v), y(u, v), z (u, v) ) r × r


S D
u v dA .

Notice that the surface area arises as the special case f ( x, y, z ) = 1 . Also notice that the
integral on the right-hand side is a now-familiar double integral over the region D in the
uv-plane.
Now consider the case of a graph z = g ( x, y ) (we can’t use f for this because f has
already been used to mean something else in the equation defining the surface integral).

61
We can consider this to be just a special case of a parametrized surface where the
parameters u and v are just the x and y coordinates themselves. In formal terms we should
write
x(u, v) = u
y (u , v) = v ,
z (u , v) = g (u, v)
but we often write the more direct but at first perhaps odd-looking expressions
x=x
y=y .
z = g ( x, y )
Thus it’s easy to compute (from the formulas on the last page) that
∂g ∂g
ru = rx = 1, 0, , rv = ry = 0,1,
∂x ∂y
∂g ∂g
⇒ ru × rv = rx × ry = − , − ,1 .
∂x ∂y
2
⎛ ∂g ⎞ ⎛ ∂g ⎞
2

⇒ ru × rv = rx × ry = 1 + ⎜ ⎟ + ⎜ ⎟
⎝ ∂x ⎠ ⎝ ∂y ⎠
So in this case, the formula for the surface integral for a function f ( x, y , z ) over the
surface z = g ( x, y ) becomes

∫∫ f ( x, y, z )dS = ∫∫ f ( x(u, v), y(u, v), z (u, v) ) r × r


S D
u v dA

2
⎛ ∂g ⎞ ⎛ ∂g ⎞
2

= ∫∫ f ( x, y, g ( x, y ) ) 1 + ⎜ ⎟ + ⎜ ⎟ dA
D ⎝ ∂x ⎠ ⎝ ∂y ⎠
where now we can think of D as a domain in the xy-plane.

62
Finally, we define the surface integral of a vector field F over a surface S, also called the
flux of F through S, to be

∫∫ F ⋅ dS = ∫∫ ( F ⋅ n ) dS ,
S S

where we write dS = ndS with n a unit normal vector to the surface S. There are always
two such vectors. For a graph, we choose the one that points up (in the positive z-
direction). For a parametrized surface, we take the one that agrees with ru × rv . That
r ×r
vector is obviously n = u v , so we get the simple formula
ru × rv

⎛ ru × rv ⎞
∫∫S F ⋅ dS = ∫∫S ( F ⋅ n ) dS = ∫∫D ⎜⎜ F ⋅ ru × rv ⎟⎟ ru × rv dA
⎝ ⎠
⇒ ∫∫ F ⋅ dS = ∫∫ F ⋅ ( ru × rv ) dA
S D

In the special case of a graph z = g ( x, y ) , we have from the last page that

∂g ∂g
ru × rv = rx × ry = − , − ,1
∂x ∂y

so then, writing F = P, Q, R , we get the formula

∂g ∂g ⎡ ∂g ∂g ⎤
∫∫ F ⋅ dS = ∫∫ F ⋅
S D
− , − ,1 dA = ∫∫ ⎢ − P
∂x ∂y D ⎣
∂x
−Q
∂y
+ R ⎥ dA .

∫∫ z dS where S is the hemisphere z = 1 − x 2 − y 2 .


2
Example 1: Evaluate
S

Solution: This is a graph (because it’s the upper hemisphere of the unit sphere; the full
unit sphere cannot be written as the graph of a single function, but is the union of the
graphs of the two functions z = ± 1 − x 2 − y 2 ).
Since it’s a graph, we can use the formula
2
⎛ ∂g ⎞ ⎛ ∂g ⎞
2

∫∫ f ( x, y, z )dS = ∫∫ f ( x, y, g ( x, y) )
S D
1 + ⎜ ⎟ + ⎜ ⎟ dA
⎝ ∂x ⎠ ⎝ ∂y ⎠

where z = g ( x, y ) = 1 − x 2 − y 2 . Then it’s easy to compute that


2
⎛ ∂g ⎞ ⎛ ∂g ⎞
2
x2 y2 1
1+ ⎜ ⎟ + ⎜ ⎟ = 1+ + = .
⎝ ∂x ⎠ ⎝ ∂y ⎠ 1− x − y 1− x − y
2 2 2 2
1 − x2 − y 2
Then

63
z2 1 − x2 − y2
∫∫ z dS = ∫∫ dA = ∫∫ dA = ∫∫ 1 − x 2 − y 2 dA
2

S D 1− x − y
2 2
D 1− x − y
2 2
D

where D is the disk x 2 + y 2 ≤ 1 . This is easiest in polar coordinates, where we get


1
⎡ 1 ⎤
( )
2π 1
∫∫ z dS = ∫∫ 1 − x − y dA = ∫ ∫
3/ 2
2 2 2
1 − r 2 rdrdθ = 2π ⎢ − 1 − r 2 ⎥⎦ = 3 .
S D
0 0
⎣ 3 0

Example 2: Find the area of the surface S given by the parametric equations
x(u, v) = u cos v , y (u, v) = u sin v , z (u, v) = v , 0 ≤ u ≤ 1 , 0 ≤ v ≤ π .
Solution: We compute that
ru = cos v,sin v, 0
rv = −u sin v, u cos v,1
.
⇒ ru × rv = sin v, − cos v, u
⇒ ru × rv = 1 + u 2
Then
π 1 1
A( S ) = ∫∫ ru × rv dA = ∫ ∫ 1 + u 2 dudv = π ∫ 1 + u 2 du
0 0 0
D
.
(
⎤ π
)
1
⎡u 1
= π ⎢ 1 + u 2 + ln u + 1 + u 2 ⎥ = ⎡ 2 + ln 1 + 2 ⎤
⎣2 2 ⎦0 2 ⎣ ⎦ ( )
Example 3: Compute the surface integral of F = 2i + 5 j + 3k over the part of the cone
z = x 2 + y 2 that lies within the cylinder x 2 + y 2 = 1 .
Solution: We use the formula

⎡ ∂g ∂g ⎤ ⎡ x y ⎤
∫∫S F ⋅ dS = ∫∫D ⎢⎣ ∂x ∂y ⎥⎦
− P − Q + R dA = ∫∫D ⎢ x 2 + y 2
⎢ − 2 − 5
2
+ 2
+ 3 ⎥ dA ,
⎥⎦
⎣ x y

which we evaluate using polar coordinates with D = {(r , θ ) | 0 ≤ r ≤ 1, 0 ≤ θ ≤ 2π } .

⎡ x y ⎤ 2π 1 ⎡ −2r cos θ 5r sin θ ⎤


∫∫S F ⋅ dS = ∫∫D ⎢ x 2 + y 2
⎢ −2 − 5
x +y
2 2
+ 3 ⎥
⎥⎦
dA = ∫ 0 ∫0 ⎢
⎣ r

r
+ 3⎥ rdrdθ

⎣ .
π 2 ⎡
π 5 3⎤
= ∫ ∫ [ −2 cos θ − 5sin θ + 3] rdrdθ = ∫ ⎢ − cos θ − sin θ + ⎥ dθ = 3π
2 1

0 0 0
⎣ 2 2⎦

64
2 xi + 2 yj
Example 4: Find the flux of the vector field F = + k downward through the
x2 + y 2
surface S described parametrically by r = u cos vi + u sin vj + u 2k , 0 ≤ u ≤ 1 , 0 ≤ v ≤ 2π .
Solution: We compute the normal vector as follows
ru = cos v,sin v, 2u
rv = −u sin v, u cos v, 0 .
⇒ ru × rv = −2u 2 cos v, −2u 2 sin v, u = −2u 2 cos vi − 2u 2 sin vj + uk

The vertical component of this vector is u , which is ≥ 0 because 0 ≤ u ≤ 1 , but we are


asked to find the component of downward flux, so we must choose a normal vector that
points down. If we compute the flux using this vector, we will get the upward flux, which
is now easy so let’s compute it. The upward flux is
⎛ 2 xi + 2 yj ⎞
∫∫ F ⋅ dS = ∫∫ F ⋅ ( r × r ) dA = ∫∫ ⎜⎝
u v
x +y
2 2 ( )
+ k ⎟ ⋅ −2u 2 cos vi − 2u 2 sin vj + uk dA
S D D ⎠
⎛ −4 xu 2 cos v − 4 yu 2 sin v ⎞
= ∫∫ ⎜ + u ⎟ dA
D ⎝
x +y
2 2

(
= ∫∫ −4u cos 2 v − 4u sin 2 v + u dA )
D

∫ ( −3u ) dudv
1
=∫
0 0

= −3π
Now this is the upward flux, but we want the downward flux. This means that we chose
r ×r
our normal vector n = u v to point upward, but we want it to point downward. That is
ru × rv
achieved by replacing n by −n , which just changes the answer by an overall sign. The
downward flux is +3π .

65
Your lab instructor will solve the following problems in the lab:

1. Find the surface area of the portion of the paraboloid x 2 + y 2 = 6 z that lies within
the sphere x 2 + y 2 + z 2 = 16 .
2. Find the flux of the vector field F( x, y, z ) = 2 x,3 x, 2 z outward through the surface
{ }
comprised of the finite cylinder ( x, y, z ) | x 2 + y 2 = 4, − 2 ≤ z ≤ 3 together with the
{ } { }
two “end caps” ( x, y, z ) | x 2 + y 2 ≤ 4, z = −2 and ( x, y, z ) | x 2 + y 2 ≤ 4, z = 3 .

3. Find the flux of the vector field F = 2i + j + k upward through the surface S
described parametrically by r = u 2 vi + uv 2 j + v 3k , 0 ≤ u ≤ 1 , 0 ≤ v ≤ 1 .

Exercises:

1. Evaluate ∫∫ f ( x, y, z )dS
S
where S is the upper hemisphere of the sphere of radius a

centred on the origin z = a 2 − x 2 − y 2 and f ( x, y, z ) = x 2 .

2. Evaluate ∫∫ f ( x, y, z )dS
S
where S is the portion of the plane 2 x + 3 y + z = 6 lying in

the first octant and f ( x, y, z ) = x + y .


3. Find the flux of the vector field F( x, y, z ) = x, y, z upward through the hemisphere
z = a2 − x2 − y 2 .

4. Find the flux of the vector field F( x, y, z ) = 2 x, y, − z outward through the surface
S of the parallelopiped bounded by the planes x = ±1 , y = ±2 , and z = ±3 . (Note
that S is comprised of 6 different planar faces.)

66
Lab 12
Stokes’ Theorem and the Divergence Theorem
Part I: Stokes’ Theorem

If C is a simple, piecewise-smooth closed curve bounding an oriented, piecewise-smooth


surface, then Stokes’ Theorem relates the line integral of a vector field over C to a
surface integral over S:

∫ F ⋅ dr = ∫∫ ( curlF ) ⋅ ndS
C
S

where C is paremetrized so that C and the unit normal n to the surface S obey the right-
hand rule (e.g., if C is a curve in the xy-plane traversed counterclockwise, then n points
up).
Note the following connections. Let C be a simple closed curve in R 3 . Then
F is conservative ⇔ F = ∇Φ ⇔ curlF = 0
for some potential Φ , and then

∫ C
F ⋅ dr = 0 .

It is also true that if ∫ C


F ⋅ dr = 0 for every simple closed curve in a domain D then there
is a function Φ on D such that F = ∇Φ .

Example 1: Evaluate ∫ C
( ) ( )
2 xydx + x 2 + 2 yz dy + y 2 + 1 dz where C is the circle defined

by the intersection of the cylinder x 2 + y 2 = 9 with the horizontal plane z = 5 .


Solution: We could compute the line integral directly, but an easy computation shows
that
i j k
∂ ∂ ∂
curlF = ∇ × F = = 0,
∂x ∂y ∂z
2 xy x + 2 yz
2
y2 +1

( ) ( )
so F = 2 xyi + x 2 + 2 yz j + y 2 + 1 k is conservative on R 3 and therefore

∫ C
( ) (
2 xydx + x 2 + 2 yz dy + y 2 + 1 dz = 0 . )

67
Example 2: Use Stokes’ Theorem to compute ∫ C
F ⋅ dr where F = y, y 3 , xz 2 and C is

the curve of intersection of the paraboloid x 2 + y 2 = 9 − z and the cylinder x 2 + y 2 = 5 .


Solution: First note that
i j k
∂ ∂ ∂
curlF = ∇ × F = = −z2 j − k .
∂x ∂y ∂z
y y3 xz 2
Now we can pick any surface S to use in Stokes’s theorem

∫ F ⋅ dr = ∫∫ ( curlF ) ⋅ ndS
C
S

provided it’s smooth, oriented, and has the curve of


intersection C as its boundary. One choice for S is to use
the part of the paraboloid x 2 + y 2 = 9 − z that lies within
the cylinder (see diagram). However, there are easier
choices. Notice that if you plug x 2 + y 2 = 5 into
x 2 + y 2 = 9 − z , you get z = 4 . This tells you that the
intersection curve of these two surfaces lies in the plane
z = 4 . So we can equally well choose S to be the portion of
the plane z = 4 that lies within the cylinder x 2 + y 2 = 5 .
Then the unit normal vector to the plane is just n = k so

∫ F ⋅ dr = ∫∫ ( curlF ) ⋅ ndS = ∫∫ 0, − z 2 , −1 ⋅ 0, 0,1 dS = − ∫∫ dS


C
S S S

where S is the part of the plane z = 4 lying inside the cylinder x 2 + y 2 = 5 , so ∫∫ dS


S
is

just the area of a disk of radius 5 , which is 5π . Therefore

∫ C
F ⋅ dr = −5π .

Note: We did not specify the direction in which we should traverse the curve C. If we had
chosen to traverse it in the other direction, we would have got ∫ F ⋅ dr = 5π . Because of
C

this ambiguity in the description of the problem, both answers are acceptable.

68
Your lab instructor will solve the following problems in the lab:

1. Use Stokes’ Theorem to evaluate ∫ C


2 ydx − zdy + 3dz where C is the curve of

intersection of the paraboloid z = 4 − x 2 − y 2 with the cylinder x 2 + y 2 = 1 (see the


note at the end of Example 2).
2. Use Stokes’ Theorem to evaluate ∫ C
2 ydx + xdy + zdz where C is the curve of

intersection of the plane z = x with the cylinder x 2 + y 2 = 1 , oriented so that the


curve counterclockwise about the vertical axis (as viewed from above).

Exercises:

1. Use Stokes’ Theorem to evaluate ∫ C


zdx + z 2 dy + z 3 dz where C is the curve of

intersection of the plane x + y + z = 6 with the cylinder x 2 + y 2 = 1 , oriented so that


the curve runs counterclockwise about the vertical axis (as viewed from above).
2. Use Stokes’ Theorem to evaluate ∫ C
ydx − xdy + z 2 dz where C is the curve of

intersection of the parabolic cylinder z = y 2 with the cylinder x 2 + y 2 = 4 , oriented


so that the curve runs counterclockwise about the vertical axis (as viewed from
above).

69
Part II: The Divergence Theorem

Let E be a bounded solid region in R 3 with smooth boundary surface S. Let F be a vector
field whose component functions have continuous first partial derivatives on an open
region containing E. Then the divergence theorem relates 3-dimensional integrals over E
to surface integrals over S by

∫∫ F ⋅ dS = ∫∫∫ div FdV ,


S E

where we recall that the Divergence of F = P, Q, R is defined by

∂P ∂Q ∂R
divF = + + = ∇⋅F
∂x ∂y ∂z
and where dS = ndS , with n the unit normal of S pointing outward away from E.

∫∫ F ⋅ dS where F = yi − xj + z k
2
Example 1: Use the divergence theorem to compute and
S

S is the solid bounded between the paraboloid z = x 2 + y 2 and the plane z = 1 .


Solution: It is easy to see that divF = 2 z , so by the
divergence theorem we have

∫∫ F ⋅ dS = ∫∫∫ div FdV = ∫∫∫ 2 zdV .


S E E

Using cylindrical coordinate, we can describe E as the


region

{
E = (r ,θ , z ) | 0 ≤ r ≤ 1, 0 ≤ θ ≤ 2π , r 2 ≤ z ≤ 1 }
so then
2π 1 1
∫∫ F ⋅ dS = ∫∫∫ 2 zdV = ∫ ∫ ∫
S E
0 0 r2
2 zdz rdrdθ
.

( )
1
= 2π ∫ r − r dr =
5
0 3
Note: You can of course do this integral without using the divergence theorem. The
integral over S then has two pieces:
(i) S1 is the part of the z = 1 plane that lies inside the paraboloid. Then dS = kdA and

∫∫ F ⋅ dS = ∫∫ 1dA = π .
S1 S1

(ii) S 2 is the part of the paraboloid z = x 2 + y 2 that lies below the z = 1 plane. Then,
writing F = P ( x, y, z )i + Q( x, y, z ) j + R( x, y, z )k = yi − xj + z 2k , we get (where we

70
pick n to be the unit normal vector pointing upward and we use formulas from the
previous lab)
⎡ ∂z ∂z ⎤
∫∫ F ⋅ dS = ∫∫ ⎢⎣− P ∂x − Q ∂y + R ⎥⎦ dA
S2 D

= ∫∫ ⎡⎣ − y ( 2 x ) + x ( 2 y ) + z 2 ⎤⎦ dA
D

= ∫∫ z 2 dA
D

where D is the disk of radius 1. Since z = x 2 + y 2 on S 2 , we can use polar


coordinates to write
2π 1 1 π
∫∫ F ⋅ dS = ∫∫ z dA = ∫ ∫ r 4 rdrdθ = 2π ∫ r 5 dr =
2
.
S2 D
0 0 0 3

Finally, to get the total surface integral over S, we must add these two contributions
together. But first notice that the unit normal must point out of S, and therefore must
point upward along S1 but downward along S 2 . Therefore, we must reverse the sign of
the last integral. Then
π 2π
∫∫ F ⋅ dS = π − 3 =
S
3
.

This is of course the same answer that we got using the divergence theorem, but it was
somewhat more work.
Example 2: Find the flux of the vector field F( x, y, z ) = 2 x,3 x, 2 z outward through the
{
surface comprised of the finite cylinder ( x, y, z ) | x 2 + y 2 = 4, − 2 ≤ z ≤ 3 together with }
{ } {
the two “end caps” ( x, y, z ) | x 2 + y 2 ≤ 4, z = −2 and ( x, y, z ) | x 2 + y 2 ≤ 4, z = 3 . }
Solution: This was a problem taken from the previous lab, where it required computing a
surface integral explicitly. The desired surface integral is

∫∫
S
2 x,3 x, 2 z ⋅ dS ,

where S has three different components (the cylinder and the two end caps) so we had to
do three separate surface integrals and add the results. Instead, now we can do it (very
∂ ∂ ∂
quickly) with the divergence theorem. Note that divF = (2 x) + (3 x) + (2 z ) = 4 so
∂x ∂y ∂z

∫∫ 2 x,3 x, 2 z ⋅ dS = ∫∫∫ div ( 2 x,3 x, 2 z ) dV = 4∫∫∫ dV = 4vol ( E ) = 4 ( height ) π rad 2 ( ).


S E E

= 80π

71
Your lab instructor will solve the following problems in the lab:

1. Use the divergence theorem to compute ∫∫ S


y, − x, z ⋅ dS where S is the surface

bounding the region that lies above the cone z = x 2 + y 2 and below the plane
z = 3.
2. Use the divergence theorem to compute the surface integral ∫∫ F ⋅ dS
S
where

2
( 2 3
) ( 2
)
F = xz i + x y − z j + 2 xy + y z k and S is the surface bounding the region that
lies below the hemisphere z = a 2 − x 2 − y 2 and above the plane z = 0 .
3. Let the smooth closed surface S be the boundary of a bounded region E such that
the component functions of the vector field F = P, Q, R have continuous second
partial derivatives on an open region containing E. Prove that

∫∫ ( ∇ × F ) ⋅ dS = 0 .
S

Exercises:

1. Use the divergence theorem to compute ∫∫ F ⋅ dS ( )


where F = 3x − 2 x 2 i − yj + zk
S

and S is the surface of the solid that lies in the first octant and is bounded by the
parabolic cylinder x = 4 − z 2 , the plane y = 3 , and the three coordinate planes.

2. Use the divergence theorem to compute ∫∫


S
2 x + z, 2 xz + y, − y 2 + 3 z ⋅ dS where S is

the sphere of radius 4 centred at (−3,1, 2) .

3. Compute ∫∫
S
3x − z , y, − x − 2 ⋅ dS where S is the tetrahedron lying in the first octant

whose faces are the plane x + y + z = 3 and the three coordinate planes.

72

You might also like