Lab Manual Math 209
Lab Manual Math 209
Lab Manual
Dept. of Mathematical and Statistical Sciences
University of Alberta
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
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
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)
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
xy
d) Let f ( x, y ) = . Find lim f ( x, y ) .
x + y2
2 ( x , y ) →(2,5)
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
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
∂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
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.)
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:
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⎠
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
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
∂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 ⎜ ⎟
⎝ ∂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
13
14
Lab 3
Directional Derivatives and Gradients
∂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:
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
Tangent Plane:
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) .
___________
Exercises:
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) .
17
18
Lab 4
Maximum and Minimum Problems
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) .
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:
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:
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
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.
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:
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:
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.
23
24
Lab 5
Lagrange Multipliers
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
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 .
⎛ 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 .
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:
Exercises:
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 .
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.
−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:
y= x
= ∫ ⎡⎣ y cos ( x3/ 2 ) ⎤⎦
1
dx
0 y =0
31
Your lab instructor will solve the following problems in the lab:
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) .
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 easiest way to remember this is the mnemonic formula dA = dxdy = rdrdθ .
∫∫ 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.
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
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
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 .
{
D = ( x, y ) | 0 ≤ x ≤ 2, 0 ≤ y ≤ 4 − x 2 }
,
⎧ π⎫
= ⎨(r ,θ ) | 0 ≤ r ≤ 2, 0 ≤ θ ≤ ⎬
⎩ 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
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:
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
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 .
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} .
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
{
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
4π
=
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 .
3. Find the volume of the tetrahedron enclosed by the coordinate planes and the plane
2x + y + z = 4 .
Exercises:
∫∫∫ ( xy )
+ z 3 dV .
2
2. Evaluate ∫∫∫ ( 3 + 2 xy ) dV ,
E
where E is the region lying above the xy-plane and
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 ,θ )}
∫∫∫
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 }
∫∫∫ f ( x, y, z)dV = ∫ ⎜⎝ ∫ α ( ∫
E
d
c
⎛ β b
a ⎠ )
f ( ρ cos θ sin φ , ρ sin θ sin φ , ρ cos φ ) ρ 2 d ρ dθ ⎞⎟ sin φ 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
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
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
∫ 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 .
∫ C
F ⋅ dr = ∫ F ⋅ dr + ∫ F ⋅ dr + ∫ F ⋅ dr .
C1 C2 C3
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
∫ 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.
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 .
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) .
Exercises:
∫ (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
⎛ 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
∫ 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
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
∫ ( 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:
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
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
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
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
∂g ∂g ⎡ ∂g ∂g ⎤
∫∫ F ⋅ dS = ∫∫ F ⋅
S D
− , − ,1 dA = ∫∫ ⎢ − P
∂x ∂y D ⎣
∂x
−Q
∂y
+ R ⎥ dA .
⎦
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 ⎠
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
2π
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
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
= −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
2. Evaluate ∫∫ f ( x, y, z )dS
S
where S is the portion of the plane 2 x + 3 y + z = 6 lying in
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
∫ 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 .
Example 1: Evaluate ∫ C
( ) ( )
2 xydx + x 2 + 2 yz dy + y 2 + 1 dz where C is the circle defined
( ) ( )
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
∫ F ⋅ dr = ∫∫ ( curlF ) ⋅ ndS
C
S
∫ 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:
Exercises:
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
∂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
{
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θ
.
2π
( )
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
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
= 80π
71
Your lab instructor will solve the following problems in the lab:
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:
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.
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