Professional Documents
Culture Documents
MATH1.5 Calculus II - Chapter 2 (Handout)
MATH1.5 Calculus II - Chapter 2 (Handout)
5 CALCULUS II - AY2019/20
Chapter 2: Extremums of Functions of Several Variables
1 Directional Derivatives
3 Optimization Problems
4 Double Integrals
1 Directional Derivatives
3 Optimization Problems
4 Double Integrals
f (a + h, b) − f (a, b)
fx (a, b) = lim ,
h→0 h
and
f (a, b + h) − f (a, b)
fy (a, b) = lim .
h→0 h
Then the rate of change along the direction u is thus the limit of
the ratio
f (a + hu1 , b + hu2 ) − f (a, b)
as h → 0.
h
Definition (1.)
The directional derivative of f at (a, b) in the direction of the unit vector
u = (u1 , u2 ) is
Theorem (2.)
If f (x, y ) is a differentiable function of two variables x and y , then f has
a directional derivative in the direction of any unit vector u = (u1 , u2 )
and
Du f (x, y ) = ∇f · u = fx (x, y )u1 + fy (x, y )u2 .
v 1
u= = √ (2, 5).
kvk 29
Now we have
(2, 5)
Du f (x, y ) = ∇f (x, y ) · u = (2xy 3 , 3x 2 y 2 − 4) · √ ,
29
(2, 5) −4 · 2 + 8 · 5 32
Du f (2, −1) = (−4, 8) · √ = √ =√ .
29 29 29
Du f (x, y , z) = ∇f (x, y , z) · u.
Definition (6.)
The directional derivatives of f at x0 along the unit vector u is
f (x + hu) − f (x0 )
Du f (x0 ) = lim .
h→0 h
Du f (x) = ∇f (x) · u,
i.e.,
Du f (x1 , x2 , . . . , xn ) = ∇f (x1 , x2 , . . . , xn ) · u.
1 Directional Derivatives
3 Optimization Problems
4 Double Integrals
We know that the value Du f gives the rate of change in f along the
direction u.
Note that θ = 0 means u has the same direction as the gradient vector
∇f and θ = π means u has the opposite direction of the gradient vector
∇f .
Theorem (1.)
Suppose f is a differentiable function (of two or three variables).
(a) The maximum rate of change in f at P0 is k∇f (P0 )k and it occurs
∇f (P0 )
in the direction u = , which is the same direction as the
k∇f (P0 )k
gradient vector ∇f (P0 ).
Solution.
(a) The rate of change of f at point P along a direction of the unit
vector u is given by Du f (P) = ∇f (P) · u.
Du f (2, 0) = ∇f (2, 0) · u
3 4 3 4
= (1, 2) · − , = − + 2 · = 1.
5 5 5 5
(b) We have computed ∇f (2, 0) = (1, 2). Then the maximum rate of
change in f at P is
p √
k∇f (2, 0)k = k(1, 2)k = 12 + 22 = 5.
Remark. The direction −∇f (P) (respectively −∇F (P) is used in the
steepest descent algorithm in seeking the global minimum value of f
(respectively of F ).
Definition (3.)
(a) Points at which fx or fy do not exist are called singular points.
(b) If (a, b) is not a singular point, and ∇f (a, b) = (0, 0), i.e. both
fx (a, b) = fy (a, b) = 0, then we call the point (a, b) a stationary
point.
Solution. We have
√ √ x
3 y −x 2
∇f (x, y ) = ex 3
y − 2x, p , if y 6= 0.
3 3 y2
We have
√
3 y − 2x = 0
∇f (x, y ) = 0 ⇐⇒ x
p 3
= 0.
3 y2
x
From p 3
= 0, we get x = 0.
3 y2
√
Substituting x = 0 into 3 y − 2x = 0, we obtain y = 0.
Now we see how to use partial derivatives to find and classify the local
extrema of functions of two variables.
then f has a local minimum at (a, b), and f (a, b) is called a local
minimum value.
The following result tells us possible points for local extrema are
stationary points if both fx and fy exist.
Theorem (7.)
If f has a local extremum at (a, b), where (a, b) is an interior point, and
the first-order partial derivatives exist there, then (a, b) is a stationary
point, i.e.
∇f (a, b) = (0, 0).
However, note that at a stationary point (a, b), the value f (a, b) may or
may not be a local maximum or a local minimum.
Definition (8.)
A point (a, b) is called a saddle point of f if it is a stationary point but
neither local maximum nor local minimum.
Solution. We have found above that stationary points of f are (0, 0),
(0, √1 ), and (0, − √1 ).
2 2
1 2
1 2 1
f (x, y ) = − y − − x 2 ≤ , for all (x, y ).
4 2 4
1 1
Also we have f 0, ± √ = .
2 4
Thus both points 0, ± √1 give local maximum values. (In fact,
2
they are global maximum.)
MATH1.5 CALCULUS II - AY2019/20 29 / 101
(b) The origin (0, 0) is a stationary point, and f (0, 0) = 0.
Note that
- along x = 0, f (x, y ) = y 2 − y 4 = y 2 (1 − y 2 )≥ 0 = f (0, 0), if
−1 ≤ y ≤ 1.
Then we have
(a) If D > 0 and fxx (a, b) > 0, then f (a, b) is a local minimum.
(b) If D > 0 and fxx (a, b) < 0, then f (a, b) is a local maximum.
(c) If D < 0, then f (a, b) is not a local extremum (a saddle point.)
Solution. We have found above that stationary points of f are (0, 0),
(0, √1 ), and (0, − √1 ).
2 2
Thus there are three critical points: (0, 0),(1, 1), and (−1, −1).
MATH1.5 CALCULUS II - AY2019/20 35 / 101
Example 12 (cont.)
Since D(1, 1) = 128 > 0 and fxx (1, 1) > 0, it follows that
f (1, 1) = −1 is a local minimum.
Since D(−1, −1) = 128 > 0 and fxx (−1, −1) > 0, it follows that
f (−1, −1) = −1 is also a local minimum.
Definition (13.)
(a) A function f of two variables has a global (absolute) maximum on
its domain D at a point (a, b) if
Theorem (15.)
Suppose f (x, y ) is continuous in its domain D, where D is closed and
bounded. Then f has global maximum and global minimum.
1 Directional Derivatives
3 Optimization Problems
4 Double Integrals
For example,
Find the shortest distance from the point (1, 2) to the curve
xy = 4.
Step 2. Evaluate f at all points (x, y ) that are found from Step 1.
The largest of these values is the maximum value, while the
smallest of these values is the minimum value.
Thus the maximum and minimum of f are at the following fours points
(0, ±1), (±1, 0).
Step 2. Evaluate f at all points (x, y , z) that are found from Step 1.
The largest of these values is the maximum value, while the
smallest of these values is the minimum value.
MATH1.5 CALCULUS II - AY2019/20 49 / 101
Example (4.)
A rectangular box without a lid is to be made from 12m2 cardboard.
Find the maximum volume of such a box.
From (9) and (10), we have 2yz + xy = 2xz + 2yz, which yields y = 2z.
4z 2 + 4z 2 + 4z 2 = 12 ⇐⇒ z2 = 1 ⇐⇒ z = 1,
which gives x = y = 2.
To check whether 4 is max or min, we just take any point (x, y , z) with
g(x, y , z) = 12 and compute V (x, y , z) to compare with 4.
5 5 10
=⇒ Take say 2, 1, , for which V 2, 1, = < 4. So we
3 3 3
conclude that V (2, 2, 1) = 4 is the maximum volume.
1 Directional Derivatives
3 Optimization Problems
4 Double Integrals
Note that the solid lies above D and under the surface z = f (P).
Remark. In particular, when f (P) = 1 on D, we obtain the area A(D) of
the region D as ZZ
A(D) = 1 dA.
D
MATH1.5 CALCULUS II - AY2019/20 57 / 101
• Application: Total charge, total mass, and moment of
a lamina
Application 2.
The total charge Q is given by
ZZ
Q= σ(P) dA.
D
Application 3.
(a) The total mass M is given by
ZZ
M= ρ(x, y ) dA.
D
(b) The moment of the entire lamina about the x-axis, respectively
y -axis, is
ZZ ZZ
Mx = y ρ(x, y ) dA, respectively My = xρ(x, y ) dA.
D D
(c) The coordinates (x̄, ȳ ) of the center of the mass of the lamina are
My Mx
x̄ = , ȳ = .
M M
MATH1.5 CALCULUS II - AY2019/20 59 / 101
• Double Integrals over Rectangles
ZZ
We begin with discussing the double integral f (x, y ) dA of a
R
function f (x, y ) over a closed rectangle R in R2 , where
In each sub-rectangle Rij , we choose a point (xij∗ , yij∗ ) and compute the
value
f xij∗ , yij∗ ∆Aij .
Definition (4.)
The double integral of f (x, y ) over R is defined as follows:
ZZ X n
m X
f (x, y ) dA = lim f (xij∗ , yij∗ )∆Aij ,
R kPk→0
i=1 j=1
if the limit exists, where kPk denotes the longest diagonal of all the
sub-rectangles Rij ’s, xij∗ , yij∗ and ∆Aij as defined above.
Z b Z d
• Iterated integral f (x, y ) dy dx
a c
The iterated integral
!
Z b Z d Z b Z d
f (x, y ) dy dx = f (x, y ) dy dx
a c a c
is obtained by
first integrate w.r.t. y (holding x fixed) from y = c to y = d,
then integrate the resulting function w.r.t. x from x = a to x = b.
is obtained by
first integrate w.r.t. x (holding y fixed) from x = a to x = b,
then integrate the resulting function w.r.t. y from y = c to y = d.
Z b Z d Z d Z b
Both f (x, y ) dy dx and f (x, y ) dx dy are iterated
a c c a
integrals (but w.r.t. different orders of x and y ).
We have ZZ Z 2Z π
y sin(xy ) dA = y sin(xy ) dy dx.
R 1 0
In this case, we should use integration by parts for the internal integral:
y =π
Z π Z π
− cos(xy ) − cos(xy )
y sin(xy ) dy = y
− 1 dy
0 |{z} | {z } |{z} x
0
|{z}
0
x
u v0 u | {z } u | {z }
v y =0 v
sin(xy ) y =π
−π cos(πx) 1 π
= + 2
= 2 sin πx − cos πx.
x x y =0 x x
Therefore, we have
sin πx 2
ZZ
sin 2π sin π
y sin(xy ) dA = − =− + = 0.
R x 1 2 1
Theorem (8.)
If f is continuous on a region D of type I, i.e. on
n o
D = (x, y ) : a ≤ x ≤ b, g1 (x) ≤ y ≤ g2 (x) ,
then ZZ Z b Z g2 (x)
f (x, y ) dA = f (x, y ) dy dx.
D a g1 (x)
Then we have
ZZ Z 1 Z 1+x 2
(x + 2y ) dA = (x + 2y ) dy dx
D −1 2x 2
Z 1h iy =1+x 2
= xy + y 2 dx
−1 y =2x 2
Z 1 32
= −3x 4 − x 3 + 2x 2 + x + 1 dx = .
−1 15
Theorem (10.)
If f is continuous on a region D of type II, i.e. on
n o
D = (x, y ) : c ≤ y ≤ d, h1 (y ) ≤ x ≤ h2 (y ) ,
then ZZ Z d Z h2 (y )
f (x, y ) dA = f (x, y ) dx dy .
D c h1 (y )
Then, we have
√
ZZ Z 4Z y
2 2
V = (x + y ) dA = (x 2 + y 2 ) dx dy
D 0 y /2
Z 4
1 3 13 3 5 216
= y2 − y +y2 dy = .
0 3 24 35
(x − 1)2 = 2x + 6 ⇐⇒ x 2 − 4x − 5 = 0
⇐⇒ (x − 5)(x + 1) = 0 ⇐⇒ x = −1, x = 5.
y2
D = (x, y ) : −2 ≤ y ≤ 4, −3≤x ≤y +1 ,
2
then we have
4 y +1 4 x=y +1
x 2y
ZZ Z Z Z
xy dA = xy dx dy = dy
D −2 y2
−3 −2 2 2
x= y2 −3
2
Z 4
1
= y (−y 4 + 16y 2 + 8y − 32) dy = 36.
−2 8
Solution.
Z If we wish to integrate w.r.t. y first, then we have to evaluate
2
sin(y ) dy . Unfortunately, it is impossible to find the integral of
sin(y 2 ) as it is not an elementary function.
We have
Z 1Z y Z 1h ix=y
sin(y 2 ) dx dy = x sin(y 2 ) dy
0 0 0 x=0
Z 1
= y sin(y 2 ) dy
0
1
1 1
= − cos(y 2 ) = (1 − cos 1).
2 0 2
Therefore, Z 1Z 1
1
sin(y 2 ) dy dx = (1 − cos 1).
0 x 2
Proposition (14.)
If R = R1 ∪ R2 , where R1 and R2 are two non-overlapping regions, then
ZZ ZZ ZZ
f (x, y ) dA = f (x, y ) dA + f (x, y ) dA.
R R1 R2
and n √ o
D2 = (x, y ) : −1 ≤ x ≤ 5, x − 1 ≤ y ≤ 2x + 6 .
It is clear that this needs more work than the first method.
Proposition (16.)
Suppose
f and g are functions of two variables defined on D,
f and g are both integrable over D.
Then, for any real numbers c and d, we have
ZZ ZZ ZZ
[c f (x, y ) + d g(x, y )] dA = c f (x, y ) dA + d g(x, y ) dA.
D D D
Proposition (17.)
(a) If f (x, y ) ≥ g(x, y ) for all (x, y ) ∈ D, then
ZZ ZZ
f (x, y ) dA ≥ g(x, y ) dA.
D D