Absolute Extremes
Constrained Optimization
MAT 102 Calculus II - Spring 2024
C3: Absolute Extremes, Lagrange Multipliers
Amber Habib
Department of Mathematics
School of Natural Sciences
Shiv Nadar University
March 28, 2025
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Review
• First Derivative Test: If f (x, y ) has a local extreme at (a, b) and
its partial derivatives exist at (a, b) then fx (a, b) = fy (a, b) = 0.
• f (x, y ) has a critical point at (a, b) if fx (a, b) = fy (a, b) = 0 or one
of these partial derivatives does not exist.
• A saddle point is a critical point that is not a local extreme.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Review
• First Derivative Test: If f (x, y ) has a local extreme at (a, b) and
its partial derivatives exist at (a, b) then fx (a, b) = fy (a, b) = 0.
• f (x, y ) has a critical point at (a, b) if fx (a, b) = fy (a, b) = 0 or one
of these partial derivatives does not exist.
• A saddle point is a critical point that is not a local extreme.
• Second Derivative Test: Let f (x, y ) have continuous second order
partial derivatives, and let (a, b) be a critical point of f . Let
D = fxx (a, b)fyy (a, b) − fxy (a, b)2 .
1
2
3
D > 0 and fxx (a, b) > 0 implies (a, b) is a local minimum.
D > 0 and fxx (a, b) < 0 implies (a, b) is a local maximum.
D < 0 implies (a, b) is a saddle point.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Extreme Value Theorem
Let A ⊆ R2 .
• (a, b) is a boundary point of A if every open disc centred at (a, b)
contains points from both A and Ac .
• The boundary of A consists of all the boundary points of A. It is
denoted by ∂A.
• A is closed if it contains its boundary.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Extreme Value Theorem
Let A ⊆ R2 .
• (a, b) is a boundary point of A if every open disc centred at (a, b)
contains points from both A and Ac .
• The boundary of A consists of all the boundary points of A. It is
denoted by ∂A.
• A is closed if it contains its boundary.
• A is bounded if it is contained in a disc with finite radius.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Extreme Value Theorem
Let A ⊆ R2 .
• (a, b) is a boundary point of A if every open disc centred at (a, b)
contains points from both A and Ac .
• The boundary of A consists of all the boundary points of A. It is
denoted by ∂A.
• A is closed if it contains its boundary.
• A is bounded if it is contained in a disc with finite radius.
Extreme Value Theorem: Suppose
1
D is a closed and bounded subset of R2 .
2
f : D → R is continuous.
Then f has an absolute maximum and an absolute minimum in D.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A. That is, all the points that are in A
but not in ∂A.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A. That is, all the points that are in A
but not in ∂A.
Let f (x, y ) be continuous on a closed and bounded D. We can
find the absolute extreme values of f as follows:
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A. That is, all the points that are in A
but not in ∂A.
Let f (x, y ) be continuous on a closed and bounded D. We can
find the absolute extreme values of f as follows:
1
Find the values of f at its critical points in interior of D.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A. That is, all the points that are in A
but not in ∂A.
Let f (x, y ) be continuous on a closed and bounded D. We can
find the absolute extreme values of f as follows:
1
Find the values of f at its critical points in interior of D.
2
Find the extreme values of f on the boundary of D (a
one-variable problem after parametrizing the boundary curve).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Finding Extreme Values
The interior of A is A \ ∂A. That is, all the points that are in A
but not in ∂A.
Let f (x, y ) be continuous on a closed and bounded D. We can
find the absolute extreme values of f as follows:
1
Find the values of f at its critical points in interior of D.
2
Find the extreme values of f on the boundary of D (a
one-variable problem after parametrizing the boundary curve).
3
The largest of the calculated values of f is its absolute
maximum, the smallest is its absolute minimum.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy =⇒ Critical points are y = 0
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy =⇒ Critical points are y = 0
So there are no critical points in the interior of D.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy =⇒ Critical points are y = 0
So there are no critical points in the interior of D.
Part 2: The boundary
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy =⇒ Critical points are y = 0
So there are no critical points in the interior of D.
Part 2: The boundary
The boundary
√ of D is in three pieces: the line segment
√ ℓ from
(0, 0) to (0, 3), the line
√ segment m
√ from (0, 0) to ( 3, 0), the
quarter-circle c from ( 3, 0) to (0, 3).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
Consider f (x, y ) = xy 2 on
1.5
1.0
D = {(x, y ) : x ≥ 0, y ≥ 0, x 2 + y 2 ≤ 3}.
0.5
0.5 1.0 1.5
Part 1: The interior
fx (x, y ) = y 2 , fy (x, y ) = 2xy =⇒ Critical points are y = 0
So there are no critical points in the interior of D.
Part 2: The boundary
The boundary
√ of D is in three pieces: the line segment
√ ℓ from
(0, 0) to (0, 3), the line
√ segment m
√ from (0, 0) to ( 3, 0), the
quarter-circle c from ( 3, 0) to (0, 3).
On ℓ and m the values of f are identically 0.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
√
√
Consider f (r(t)) = 3 3 cos t sin2 t = 3 3 cos t(1 − cos2 t).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
√
√
Consider f (r(t)) = 3 3 cos t sin2 t = 3 3 cos t(1 − cos2 t).
√
The function g (u) = 3 3u(1 − u 2 ), 0 ≤ u ≤ 1 takes on the same
values.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
√
√
Consider f (r(t)) = 3 3 cos t sin2 t = 3 3 cos t(1 − cos2 t).
√
The function g (u) = 3 3u(1 − u 2 ), 0 ≤ u ≤ 1 takes on the same
values.
√
√
0 = g ′ (u) = 3 3(1 − 3u 2 ) =⇒ u = 1/ 3
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
√
√
Consider f (r(t)) = 3 3 cos t sin2 t = 3 3 cos t(1 − cos2 t).
√
The function g (u) = 3 3u(1 − u 2 ), 0 ≤ u ≤ 1 takes on the same
values.
√
√
0 = g ′ (u) = 3 3(1 − 3u 2 ) =⇒ u = 1/ 3
√
1
1
The corresponding g value is 3 3 × √ × (1 − ) = 2
3
3
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
The quarter-circle c can be parametrized by
√
r(t) = 3(cos t, sin t), 0 ≤ t ≤ π/2
√
√
Consider f (r(t)) = 3 3 cos t sin2 t = 3 3 cos t(1 − cos2 t).
√
The function g (u) = 3 3u(1 − u 2 ), 0 ≤ u ≤ 1 takes on the same
values.
√
√
0 = g ′ (u) = 3 3(1 − 3u 2 ) =⇒ u = 1/ 3
√
1
1
The corresponding g value is 3 3 × √ × (1 − ) = 2
3
3
Comparing the values 0 and 2 we see that the absolute maximum
is 2 and the absolute minimum is 0.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Exercise 28 of Sec 11.7 in [Stewart])
2.0
1.5
1.0
0.5
1.5
1.5
1.0
1.0
0.5
Amber Habib
0.0
0.0
0.5
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Exercises
1
Find three positive numbers whose sum is 100 and whose
product is a maximum.
2
Find the absolute maximum and minimum values of f on the
set D:
f (x, y ) = x 4 + y 4 − 4xy + 2,
D = {(x, y ) : 0 ≤ x ≤ 3, 0 ≤ y ≤ 2}.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Table of Contents
1
Absolute Extremes
2
Constrained Optimization
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
A rectangular box with open top is made from 12m2 of cardboard.
How much volume can it have?
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
A rectangular box with open top is made from 12m2 of cardboard.
How much volume can it have?
Let the base dimensions be x and y , and the height be z. Then
the volume is V = xyz.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
A rectangular box with open top is made from 12m2 of cardboard.
How much volume can it have?
Let the base dimensions be x and y , and the height be z. Then
the volume is V = xyz.
12 − xy
The area is 12 = xy + 2xz + 2yz. We solve this for z =
.
2(x + y )
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
A rectangular box with open top is made from 12m2 of cardboard.
How much volume can it have?
Let the base dimensions be x and y , and the height be z. Then
the volume is V = xyz.
12 − xy
The area is 12 = xy + 2xz + 2yz. We solve this for z =
.
2(x + y )
Thus the volume becomes a function of x and y :
V (x, y ) =
xy (12 − xy )
,
2(x + y )
Amber Habib
x, y > 0, and xy < 12
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
A rectangular box with open top is made from 12m2 of cardboard.
How much volume can it have?
Let the base dimensions be x and y , and the height be z. Then
the volume is V = xyz.
12 − xy
The area is 12 = xy + 2xz + 2yz. We solve this for z =
.
2(x + y )
Thus the volume becomes a function of x and y :
V (x, y ) =
xy (12 − xy )
,
2(x + y )
x, y > 0, and xy < 12
Any local maximum can be detected by the first derivative test.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
2(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
2(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2 =⇒ x = y .
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2 =⇒ x = y .
Further,
12 − x 2 − 2xy = 0
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2 =⇒ x = y .
Further,
12 − x 2 − 2xy = 0 =⇒ 12 − 3x 2 = 0
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2 =⇒ x = y .
Further,
12 − x 2 − 2xy = 0 =⇒ 12 − 3x 2 = 0 =⇒ x = y = 2
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example (Example 5 of Section 11.7 in [Stewart])
First Derivative Test:
0=
∂V
∂x
=
=
=
0=
∂V
∂y
=
2(12y − 2xy 2 )(x + y ) − 2(12xy − x 2 y 2 )
4(x + y )2
12y 2 − y 2 x 2 − 2xy 3
2(x + y )2
2
y (12 − x 2 − 2xy )
=⇒ 12 − x 2 − 2xy = 0
2(x + y )2
x 2 (12 − y 2 − 2xy )
=⇒ 12 − y 2 − 2xy = 0
2(x + y )2
Now, 12 − x 2 − 2xy = 12 − y 2 − 2xy =⇒ x 2 = y 2 =⇒ x = y .
Further,
12 − x 2 − 2xy = 0 =⇒ 12 − 3x 2 = 0 =⇒ x = y = 2 =⇒ V = 4.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Constrained Optimization
The last example was one of constrained optimization: We had
to maximize a function V (x, y , z) but there was a constraint of
the form g (x, y , z) = k controlling the allowed combinations of
x, y , z.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Constrained Optimization
The last example was one of constrained optimization: We had
to maximize a function V (x, y , z) but there was a constraint of
the form g (x, y , z) = k controlling the allowed combinations of
x, y , z.
In the example we were able to solve the constraint for z in terms
of x, y and thus reduce the problem to a two-variable
unconstrained optimization problem.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Constrained Optimization
The last example was one of constrained optimization: We had
to maximize a function V (x, y , z) but there was a constraint of
the form g (x, y , z) = k controlling the allowed combinations of
x, y , z.
In the example we were able to solve the constraint for z in terms
of x, y and thus reduce the problem to a two-variable
unconstrained optimization problem.
The elimination of the constraint in this manner is not always
possible and we need a more general technique.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
This means that we consider the level set S of g for the value k,
and ask for the extreme values of f on S.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
This means that we consider the level set S of g for the value k,
and ask for the extreme values of f on S.
Suppose f has an extreme value (on S) at the point x0 ∈ S.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
This means that we consider the level set S of g for the value k,
and ask for the extreme values of f on S.
Suppose f has an extreme value (on S) at the point x0 ∈ S.
Consider any differentiable curve r(t) in S that passes through x0 :
r(t0 ) = x0 .
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
This means that we consider the level set S of g for the value k,
and ask for the extreme values of f on S.
Suppose f has an extreme value (on S) at the point x0 ∈ S.
Consider any differentiable curve r(t) in S that passes through x0 :
r(t0 ) = x0 .
Then f (r(t)) has an extreme value at t0 . Hence,
0=
d
f (r(t)) = ∇f (x0 ) • r′ (t0 ).
dt t0
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Optimization with One Constraint
Let f (x) be a function of n variables. We seek to maximize or
minimize it, subject to a constraint of the form g (x) = k.
This means that we consider the level set S of g for the value k,
and ask for the extreme values of f on S.
Suppose f has an extreme value (on S) at the point x0 ∈ S.
Consider any differentiable curve r(t) in S that passes through x0 :
r(t0 ) = x0 .
Then f (r(t)) has an extreme value at t0 . Hence,
0=
d
f (r(t)) = ∇f (x0 ) • r′ (t0 ).
dt t0
So, ∇f (x0 ) is normal to S and hence parallel to ∇g (x0 ).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method
Consider the problem of finding the extreme values of f (x) subject
to the constraint g (x) = k. Assume that f and g are differentiable
and that ∇g is non-zero on the level set g (x) = k. We proceed as
follows:
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method
Consider the problem of finding the extreme values of f (x) subject
to the constraint g (x) = k. Assume that f and g are differentiable
and that ∇g is non-zero on the level set g (x) = k. We proceed as
follows:
1
Introduce a new variable λ (the Lagrange multiplier)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method
Consider the problem of finding the extreme values of f (x) subject
to the constraint g (x) = k. Assume that f and g are differentiable
and that ∇g is non-zero on the level set g (x) = k. We proceed as
follows:
1
Introduce a new variable λ (the Lagrange multiplier)
2
Find all solutions to the equations
∇f (x) = λ∇g (x)
g (x) = k
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method
Consider the problem of finding the extreme values of f (x) subject
to the constraint g (x) = k. Assume that f and g are differentiable
and that ∇g is non-zero on the level set g (x) = k. We proceed as
follows:
1
Introduce a new variable λ (the Lagrange multiplier)
2
Find all solutions to the equations
∇f (x) = λ∇g (x)
g (x) = k
3
Evaluate f at all the points found in the previous step. The
maximum and minimum are among these (if they exist).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method
Consider the problem of finding the extreme values of f (x) subject
to the constraint g (x) = k. Assume that f and g are differentiable
and that ∇g is non-zero on the level set g (x) = k. We proceed as
follows:
1
Introduce a new variable λ (the Lagrange multiplier)
2
Find all solutions to the equations
∇f (x) = λ∇g (x)
g (x) = k
3
Evaluate f at all the points found in the previous step. The
maximum and minimum are among these (if they exist).
(Note: If f , g are functions of n variables then this method
creates n + 1 equations in n + 1 variables.)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z),
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z),
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z), xy = λ(2x+2y ),
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z), xy = λ(2x+2y ), xy +2xz+2yz = 12
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z), xy = λ(2x+2y ), xy +2xz+2yz = 12
First note that λ = 0 would imply yz = xz = xy = 0 and violate
the last equation.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z), xy = λ(2x+2y ), xy +2xz+2yz = 12
First note that λ = 0 would imply yz = xz = xy = 0 and violate
the last equation. Also x, y , z ̸= 0 since the maximum volume
must be non-zero.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Let us take up again the task of maximizing V (x, y , z) = xyz
subject to xy + 2xz + 2yz = 12.
∇V = (yz, xz, xy ),
∇g = (y + 2z, x + 2z, 2x + 2y )
We have to solve
yz = λ(y +2z), xz = λ(x+2z), xy = λ(2x+2y ), xy +2xz+2yz = 12
First note that λ = 0 would imply yz = xz = xy = 0 and violate
the last equation. Also x, y , z ̸= 0 since the maximum volume
must be non-zero.
We can transform the first three equations into
xyz = λ(xy + 2xz), xyz = λ(xy + 2yz), xyz = λ(2xz + 2yz)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
The last set of equations implies
xy + 2xz = xy + 2yz = 2xz + 2yz
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
The last set of equations implies
xy + 2xz = xy + 2yz = 2xz + 2yz
Hence x = y and y = 2z.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
The last set of equations implies
xy + 2xz = xy + 2yz = 2xz + 2yz
Hence x = y and y = 2z.
The constraint now gives 4z 2 + 4z 2 + 4z 2 = 12, and so
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
The last set of equations implies
xy + 2xz = xy + 2yz = 2xz + 2yz
Hence x = y and y = 2z.
The constraint now gives 4z 2 + 4z 2 + 4z 2 = 12, and so
z = 1,
Amber Habib
x =y =2
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Assume that f , g and h are differentiable and that ∇g and ∇h are not
parallel on the intersection of the level sets g (x) = k and h(x) = ℓ.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Assume that f , g and h are differentiable and that ∇g and ∇h are not
parallel on the intersection of the level sets g (x) = k and h(x) = ℓ.
1
Introduce two new variables λ and µ (Lagrange multipliers)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Assume that f , g and h are differentiable and that ∇g and ∇h are not
parallel on the intersection of the level sets g (x) = k and h(x) = ℓ.
1
Introduce two new variables λ and µ (Lagrange multipliers)
2
Find all solutions to the equations
∇f (x)
=
λ∇g (x) + µ∇h(x)
g (x)
=
k
h(x)
=
ℓ
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Assume that f , g and h are differentiable and that ∇g and ∇h are not
parallel on the intersection of the level sets g (x) = k and h(x) = ℓ.
1
Introduce two new variables λ and µ (Lagrange multipliers)
2
Find all solutions to the equations
3
∇f (x)
=
λ∇g (x) + µ∇h(x)
g (x)
=
k
h(x)
=
ℓ
Evaluate f at all the points found in the previous step. The
maximum and minimum are among these (if they exist).
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Lagrange Multipliers Method for 2 Constraints
Consider the problem of finding the extreme values of f (x) subject to two
constraints g (x) = k and h(x) = ℓ.
Assume that f , g and h are differentiable and that ∇g and ∇h are not
parallel on the intersection of the level sets g (x) = k and h(x) = ℓ.
1
Introduce two new variables λ and µ (Lagrange multipliers)
2
Find all solutions to the equations
3
∇f (x)
=
λ∇g (x) + µ∇h(x)
g (x)
=
k
h(x)
=
ℓ
Evaluate f at all the points found in the previous step. The
maximum and minimum are among these (if they exist).
(Note: If f , g , h are functions of n variables then this method
creates n + 2 equations in n + 2 variables.)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
We are asked to find the distance between the ellipse x 2 + 2y 2 = 1
and the line x + y = 4.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
We are asked to find the distance between the ellipse x 2 + 2y 2 = 1
and the line x + y = 4.
Let (x1 , y1 ) be a point on the ellipse and (x2 , y2 ) be a point on the
line.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
We are asked to find the distance between the ellipse x 2 + 2y 2 = 1
and the line x + y = 4.
Let (x1 , y1 ) be a point on the ellipse and (x2 , y2 ) be a point on the
line.
p
The distance between these points is (x1 − x2 )2 + (y1 − y2 )2 .
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
We are asked to find the distance between the ellipse x 2 + 2y 2 = 1
and the line x + y = 4.
Let (x1 , y1 ) be a point on the ellipse and (x2 , y2 ) be a point on the
line.
p
The distance between these points is (x1 − x2 )2 + (y1 − y2 )2 .
We have to find the minimum value of this distance. Note that we
may as well minimize the squared distance. Thus our problem is:
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
We are asked to find the distance between the ellipse x 2 + 2y 2 = 1
and the line x + y = 4.
Let (x1 , y1 ) be a point on the ellipse and (x2 , y2 ) be a point on the
line.
p
The distance between these points is (x1 − x2 )2 + (y1 − y2 )2 .
We have to find the minimum value of this distance. Note that we
may as well minimize the squared distance. Thus our problem is:
Minimize D(x1 , y1 , x2 , y2 ) = (x1 − x2 )2 + (y1 − y2 )2 subject to
x12 + 2y12 = 1
(1)
x2 + y2 = 4
(2)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
2(y1 − y2 ) = 4λy1 (4)
−2(x1 − x2 ) = µ
(5)
−2(y1 − y2 ) = µ
(6)
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
(3)&(4)
=⇒
λ ̸= 0
2(y1 − y2 ) = 4λy1 (4)
−2(x1 − x2 ) = µ
(5)
−2(y1 − y2 ) = µ
(6)
Amber Habib
MAT 102 Calculus II - Spring 2024
(7)
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
(3)&(4)
=⇒
λ ̸= 0
2(y1 − y2 ) = 4λy1 (4)
(3)&(5)
=⇒
µ = −2λx1 (8)
−2(x1 − x2 ) = µ
(5)
−2(y1 − y2 ) = µ
(6)
Amber Habib
MAT 102 Calculus II - Spring 2024
(7)
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
(3)&(4)
=⇒
λ ̸= 0
2(y1 − y2 ) = 4λy1 (4)
(3)&(5)
=⇒
µ = −2λx1 (8)
(4)&(6)
=⇒
µ = −4λy1 (9)
−2(x1 − x2 ) = µ
(5)
−2(y1 − y2 ) = µ
(6)
Amber Habib
MAT 102 Calculus II - Spring 2024
(7)
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
(3)&(4)
=⇒
λ ̸= 0
2(y1 − y2 ) = 4λy1 (4)
(3)&(5)
=⇒
µ = −2λx1 (8)
(7)
−2(x1 − x2 ) = µ
(5)
(4)&(6)
=⇒
µ = −4λy1 (9)
−2(y1 − y2 ) = µ
(6)
(8)&(9)
=⇒
x1 = 2y1
Amber Habib
MAT 102 Calculus II - Spring 2024
(10)
Absolute Extremes
Constrained Optimization
Example
Note that the two curves don’t intersect.
We introduce the Lagrange multipliers λ, µ and obtain the
following equations:
2(x1 − x2 ) = 2λx1 (3)
(3)&(4)
=⇒
λ ̸= 0
2(y1 − y2 ) = 4λy1 (4)
(3)&(5)
=⇒
µ = −2λx1 (8)
(7)
−2(x1 − x2 ) = µ
(5)
(4)&(6)
=⇒
µ = −4λy1 (9)
−2(y1 − y2 ) = µ
(6)
(8)&(9)
=⇒
x1 = 2y1
2
1
(1) & (10) =⇒ x1 = √ , y1 = √
6
6
Amber Habib
MAT 102 Calculus II - Spring 2024
(10)
(11)
Absolute Extremes
Constrained Optimization
Example
(5), (6) & (11)
=⇒
1
x2 − y2 = √
6
Amber Habib
MAT 102 Calculus II - Spring 2024
(12)
Absolute Extremes
Constrained Optimization
Example
(5), (6) & (11)
=⇒
(2) & (12)
=⇒
1
x2 − y2 = √
(12)
6
1
1
x2 = 2 + √ , y2 = 2 − √ (13)
2 6
2 6
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
Example
(5), (6) & (11)
=⇒
(2) & (12)
=⇒
1
x2 − y2 = √
(12)
6
1
1
x2 = 2 + √ , y2 = 2 − √ (13)
2 6
2 6
So the minimum distance is
s
2 2
√
1
1
1
2
3
√ −2− √
+ √ −2+ √
= 2 2− √
6
2 6
6
2 6
2 6
Amber Habib
MAT 102 Calculus II - Spring 2024
Absolute Extremes
Constrained Optimization
References
Stewart, Essential Calculus:
1
Chapter 11, Partial Derivatives
§11.7 Maximum and Minimum Values (23, 25, 29, 30,
31, 34, 40, 43, 47)
§11.8 Lagrange Multipliers (1, 5, 8, 13, 15, 16, 24)
Marsden and Weinstein, Calculus III
1
Chapter 16, Gradients, Maxima, and Minima
§16.4 Constrained Extrema and Lagrange Multipliers
Amber Habib
MAT 102 Calculus II - Spring 2024
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )