MH1811 Lecture 4 Optimization Printable
MH1811 Lecture 4 Optimization Printable
5 Lagrangian function
Example
(a) Find all points on the region xy ≥ 4 (in R2 ) which are
closest to the origin (0, 0).
(b) Suppose the temperature on a hot plate is T (x, y ) = x − y .
Find the hottest spot inside and on the ellipse
2x 2 + 9y 2 = 16.
(c) What is the least surface area of a closed right circular
cylindrical can whose volume is 18π cm 3 ?
Example
We want to erect a radio telescope on a newly discovered
planet. To minimize interference, we want to place it where the
magnetic field of the planet is the minimum.
Suppose the planet is spherical with a radius of 6 units. Based
on the coordinate system whose origin is at the center of the
planet, the strength of the magnetic fiend is given by
M(x, y , z) = 6x − y 2 + xz + 60. Where should we locate the
radio telescope?
Definition
(a) A function f of two variables has a global maximum (also
known as absolute maximum ) on its domain D at a point
(a, b) if f (x, y ) ≤ f (a, b) for all points (x, y ) in D.
The number f (a, b) is called a global (absolute) maximum
value.
Definition
Suppose f (x, y ) is a function of two variables x and y and its
domain is Dom(f ).
The number f (a, b) is a local maximum (value) (respectively
local minimum (value) ) if
for all points (x, y ) ∈ Dom(f ) and (x, y ) in some disk with center
(a, b).
5 Lagrangian function
∇f (a, b) = (0, 0) ,
Definition
Suppose (a, b) is an interior point in the domain of f .
(a) The point (a, b) is said to be a singular point if either fx (a, b)
or fy (a, b) (including both) does not exist.
(b) The point (a, b) is called a stationary point if (a, b) is NOT a
singular point, and ∇f (a, b) = (0, 0), i.e., both fx (a, b) = 0
and = fy (a, b) = 0.
(c) A point (a, b) is called a critical point of f if (a, b) is a
stationary point or a singular point.
Definition
A point (a, b) is called a saddle point of f if it is a stationary point
but neither local maximum nor local minimum. That is,
fx (a, b) = 0 and fy (a, b) = 0 but f (a, b) is neither a local
maximum nor local minimum.
Example
√
3 y −x 2
Find all critical points of f (x, y ) = ex .
[Solution]
!
√
3 y −x 2 √ x
∇f (x, y ) = ex 3
y − 2x, p , if y 6= 0
3 3 y2
√
Substitute x = 0 into 3
y − 2x = 0, we have y = 0.
Example
Find all stationary points of f (x, y ) = y 2 − y 4 − x 2 . Determine
whether each of them is a local maximum or local minimum or a
saddle point.
−2x, 2y (1 − 2y 2 ) = (0, 0) .
We have x = 0 and 2y (1 − 2y 2 ) = 0.
1
From 2y (1 − 2y 2 ) = 0, we have y = 0 or y = ± √ .
2
1 −1
Stationary points are (0, 0), 0, √ and 0, √ .
2 2
(These are all critical points of f .)
and
1 1
f 0, ± √ = .
2 4
Thus, both points give local maximum values.
(In fact, they are global maximum.)
5 Lagrangian function
fxx fxy
D = D (a, b) = = fxx (a, b) fyy (a, b) − [fxy (a, b)]2 .
fyx fyy
(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 a saddle point (not a local
extremum).
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 26
Physical
/ 66
Remarks
# "
fxx fxy
1 Recall the Hessian matrix H = . The discriminant
fyx fyy
D is the determinant of H.
Example
Classify all stationary points of f (x, y ) = y 2 − y 4 − x 2 .
1
At (0, ± √ ), we have
2
1
D(0, ± √ ) = −2(2 − 6) = 8 > 0
2
and fxx = −2 < 0.
1
Therefore, we conclude that f (0, ± √ ) are local maxima.
2
Example
Find the local extrema of f (x, y ) = x 4 + y 4 − 4xy + 1.
[SOLUTION] Note that ∇f (x, y ) = 4x 3 − 4y , 4y 3 − 4x .
∇f (x, y ) = 0 ⇐⇒ x 3 − y = 0 and y 3 − x = 0.
0 = x9 − x = x x8 − 1 = x x4 − 1 x4 + 1
= x (x − 1) (x + 1) x 2 + 1 x 4 + 1 .
Therefore, we have
Since D (1, 1) = 128 > 0 and fxx (1, 1) > 0, it follows from
the second derivative test that f (1, 1) = −1 is a local
minimum.
Since D (−1, −1) = 128 > 0 and fxx (−1, −1) > 0, it follows
from the second derivative test that f (−1, −1) = −1 is also
a local minimum.
5 Lagrangian function
Example
(a) Find the shortest distance from the point (1, 2) to the curve
xy = 4.
(b) Suppose the temperature on a hot plate is T (x, y ) = x − y .
Find the hottest spot on the ellipse 2x 2 + 9y 2 = 16.
(c) What is the least surface area of a closed right circular
cylindrical can whose volume is 18π cm 3 ?
and g(x, y ) = k .
(b) Evaluate f at all points (x, y ) that are found from step (a).
The largest of these values is the maximum value while the
smallest of these values is the minimum value.
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 37
Physical
/ 66
∇f (x, y ) = λ∇g (x, y )
1 If λ = 0, then ∇f (x, y ) = 0 (stationary points of f ).
Example
Find the extreme values of the function f (x, y ) = x 2 + 2y 2 on
the circle x 2 + y 2 = 1.
Example
Find the extreme values of the function f (x, y ) = x 2 + 2y 2 on
the disk x 2 + y 2 ≤ 1.
5 Lagrangian function
and g (x, y , z) = k .
(b) Evaluate f at all points (x, y , z) that are found from step (a).
The largest of these values is the maximum value while the
smallest of these values is the minimum value.
Example
A rectangular box without a lid is to be made from 12m2
cardboard. It can be shown by some advanced method that the
maximum volume of such a box exists. Use Lagrange Multiplier
method to find the dimension of the box with maximum volume.
V = xyz.
Lx = yz − λ (2z + y ) = 0 (1)
Ly = xz − λ (2z + x) = 0 (2)
Lz = xy − λ (2x + 2y ) = 0 (3)
−Lλ = 2xz + 2yz + xy − 12 = 0. (4)
4z 2 + 4z 2 + 4z 2 = 12, giving z 2 = 1.
x = y = 2 and z = 1.
5 Lagrangian function
(b) Evaluate f at all points (x, y , z) that are found from step (a).
The largest of these values is the maximum value; the
smallest of these values is the minimum value.
Example
Find the maximum value of the function f (x, y , z) = x + 2y + 3z
subject to the constraints x − y + z = 1 and x 2 + y 2 = 1.
1 = λ + 2xµ, − − −(1)
2 = −λ + 2y µ, − − −(2)
3 = λ + 0 · µ, i.e., λ = 3,
x − y + z = 1,
x 2 + y 2 = 1.