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

MH1811 Lecture 4 Optimization Printable

Uploaded by

Ronn Chua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

MH1811 Lecture 4 Optimization Printable

Uploaded by

Ronn Chua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

MH1811 Mathematics 2

Global & Local Extreme Values

Main instructor — Dr Duzhin Fedor, slides mostly developed


by Dr Tan Geok Choo

Division of Mathematical Sciences


School of Physical and Mathematical Sciences
Nanyang Technological University

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
1 / 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
2 / 66
Optimization Problems

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 ?

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
3 / 66
Optimization Problems

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?

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
4 / 66
Global Maximum and Minimum Values

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.

(b) If f (x, y ) ≥ f (a, b) for all (x, y ) in D, f (a, b) is called a


global (absolute) minimum value.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
5 / 66
Example.
Where are the global maximum and minimum values of the
function f (x, y ) = x 2 + 2y 2 on the circle x 2 + y 2 = 1?

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
6 / 66
Existence of Global Maximum and Minimum
In general, the global maximum or minimum of a function may
not exist.
However, when f is continuous on its domain and satisfies some
good conditions, the existence of global extrema is guaranteed.
One result is stated below.
Theorem
Suppose f (x, y ) is continuous in its domain D, where D is closed
and bounded. Then f has global maximum and global minimum.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
7 / 66
Closed and Bounded Sets

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
8 / 66
Local Maximum and Minimum Values

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

f (x, y ) ≤ f (a, b)( respectively f (x, y ) ≥ f (a, b))

for all points (x, y ) ∈ Dom(f ) and (x, y ) in some disk with center
(a, b).

Note: A global maximum (respectively minimum) is a local


maximum (respectively minimum).
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of Physical
9 / 66
Local Extreme Values

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 10
Physical
/ 66
Quiz
https://forms.gle/iUUUFKVmZqh4pmiq9

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 11
Physical
/ 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 12
Physical
/ 66
Local Extrema Values at Interior Point
The next theorem tells us possible interior points for local
extrema.
Theorem
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

∇f (a, b) = (0, 0) ,

i.e., fx (a, b) = 0 and fy (a, b) = 0.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 13
Physical
/ 66
Critical points: Singular or Stationary Points

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.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 14
Physical
/ 66
Saddle Point
Thus, a local extremum at (a, b), where (a, b) is an interior point
and ∇f (a, b) exists, is a stationary point.
However, at a stationary point (a, b), the value f (a, b) may or
may not be a local maximum or a local minimum.

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.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 15
Physical
/ 66
Example 1.

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

Since ∇f (x, y ) is not defined when y = 0, singular points are


(x, 0), x ∈ R.

For stationary points, we solve ∇f (x, y ) = 0, if y 6= 0.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 16
Physical
/ 66

x 3 y −x 2
Example 1. f (x, y ) = e .
Suppose y 6= 0.
∇f (x, y ) = 0 is equivalent to
√ x
3
y − 2x = 0 and p = 0.
3 3 y2
x
From √
3
= 0, we have x = 0.
3 y2


Substitute x = 0 into 3
y − 2x = 0, we have y = 0.

But y 6= 0. Therefore, there is no stationary point.

Conclusion: Critical points are (x, 0), x ∈ R.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 17
Physical
/ 66
Example 2.

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.

[SOLUTION] Note that

∇f (x, y ) = −2x, 2y − 4y 3 = −2x, 2y (1 − 2y 2 ) ,


 

is defined at every (x, y ). Thus there is no singular point.

To find stationary points, we solve ∇f (x, y ) = (0, 0).

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 18
Physical
/ 66
Example 2. f (x, y ) = y 2 − y 4 − x 2
∇f (x, y ) = (0, 0), i.e.,

−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 .)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 19
Physical
/ 66
Example 2. f (x, y ) = y 2 − y 4 − x 2
 
1
The stationary points 0, ± √ are local maxima:
2
We do a completing squares:
 2
2 1 2 14 1
2
f (x, y ) = y − y − x = − y − − x2 ≤ ,
4 2 4

and  
1 1
f 0, ± √ = .
2 4
Thus, both points give local maximum values.
(In fact, they are global maximum.)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 20
Physical
/ 66
Example 2. f (x, y ) = y 2 − y 4 − x 2
The stationary point (0, 0) is a saddle point:
Note that f (0, 0) = 0.

Along x = 0, we note that


f (x, y ) = y 2 − y 4 = y 2 (1 − y 2 ) ≥ 0 = f (0, 0) if −1 < y < 1.

Along y = 0, we note that f (x, y ) = −x 2 ≤ 0 = f (0, 0) for x < 0.

Thus, every disc centered at (0, 0) contains points where f takes


positive values as well as points where f is negative. The value
f (0, 0) is neither a local maximum nor local minimum.

The function f (x, y ) = y 2 − y 4 − x 2 has a saddle point at (0, 0).


Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 21
Physical
/ 66
Saddle Point

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 22
Physical
/ 66
Quiz
https://forms.gle/NFSXXYMQ1Z2rZ1XE8

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 23
Physical
/ 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 24
Physical
/ 66
Local Maximum and Minimum Values
In Mathematics 1 or single-variable calculus, we have discussed
that one of the main applications of derivatives is to classify
local extrema via first or second derivatives .

Now, we will see how to use second partial derivatives to


classify stationary points of a function of two variables.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 25
Physical
/ 66
Second Derivative Test

Theorem (Second Derivative Test)


Suppose the second partial derivatives of f are continuous in a
disk with center (a, b), and suppose that (a, b) is a stationary
point, i.e.,∇f (a, b) = 0. Let

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.

2 If D = 0, the test gives no information: f could be a local


maximum, a local minimum at (a, b), or (a, b) could be a
saddle point of f .
3 The second derivative test is not applicable to functions of 3
or more variables. There are other tests using positive
definite matrices and eigenvalues for functions with 3 or
more variables.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 27
Physical
/ 66
Example 3.

Example
Classify all stationary points of f (x, y ) = y 2 − y 4 − x 2 .

[SOLUTION] From Example 2, stationary points of f are


   
1 −1
(0, 0), 0, √ and 0, √ .
2 2
We will use Second Derivative Test to classify them.
Second partial derivatives:
fxx = −2, fxy = 0, fyx = 0, fyy = 2 − 12y 2
−2 0
Discriminant D(x, y ) = 2
= −2(2 − 12y 2 ).
0 2 − 12y
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 28
Physical
/ 66
Example 3. (Cont’d). f (x, y ) = y 2 − y 4 − x 2
Discriminant D(x, y ) = −2(2 − 12y 2 ).

At (0, 0), D(0, 0) = −4 < 0. Thus (0, 0) is a saddle point.

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

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 29
Physical
/ 66
Example 4.

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.

Thus, we have x = x 9 and hence

0 = x9 − x = x x8 − 1 = x x4 − 1 x4 + 1
  

= x (x − 1) (x + 1) x 2 + 1 x 4 + 1 .
 

It follows that x = 0, x = 1 or x = −1.


The three critical points are (0, 0) , (1, 1) and (−1, −1).
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 30
Physical
/ 66
Example 4 f (x, y ) = x 4 + y 4 − 4xy + 1.
Now we calculate the second derivatives

fxx = 12x 2 , fxy = fyx = −4 and fyy = 12y 2 .

Therefore, we have

D (x, y ) = fxx fyy − (fxy )2 = 144x 2 y 2 − 16.

Since D (0, 0) = −16 < 0, it follows from the second


derivative test that (0, 0) is a saddle point.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 31
Physical
/ 66
Example 4 f (x, y ) = x 4 + y 4 − 4xy + 1.

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.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 32
Physical
/ 66
Quiz
https://forms.gle/EVJtoRaCL89QDMGj7

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 33
Physical
/ 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 34
Physical
/ 66
Optimization Problems: Equality Constraint

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 ?

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 35
Physical
/ 66
One Equality Constraint
Now, we will discuss the method of Lagrange multipliers for
finding possible candidates for the maximum or minimum value
of a function f (x, y ) subject to an equality constraint of the form
g (x, y ) = k .

Remark If it is known that f has a global maximum or a minimum


value on the domain defined by the equality constraint, then we
compare the values of f at the points obtained from Lagrange
Multiplier method and determine the global maximum (or
minimum) of f subject to the equality constraint.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 36
Physical
/ 66
Lagrange Multipliers for f (x, y ).
ASSUMPTION Global Extreme values exist.

To find the maximum and minimum values of f (x, y ) subject to


the constraint g (x, y ) = k :
(a) Find all values of x, y and λ such that

∇f (x, y ) = λ∇g (x, y )

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 ).

2 If λ 6= 0, then both vectors ∇f (x, y ) and ∇g (x, y ) are


parallel or opposite to each other.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 38
Physical
/ 66
Diagram: ∇f (x, y ) = λ∇g (x, y )

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 39
Physical
/ 66
Example 1.

Example
Find the extreme values of the function f (x, y ) = x 2 + 2y 2 on
the circle x 2 + y 2 = 1.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 40
Physical
/ 66
Example 1. Diagram ( via Level curves).

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 41
Physical
/ 66
Example 1. (Solution)
The circle x 2 + y 2 = 1 is closed and bounded and
f (x, y ) = x 2 + 2y 2 is continuous.
Thus, the maximum and minimum values of f exist.

We apply the Lagrange Multiplier method to find the maximum


and minimum of f (x, y ) = x 2 + 2y 2 subject to the constraint
g (x, y ) = 1, where g (x, y ) = x 2 + y 2 .
We will solve
∇f = λ∇g and g (x, y ) = 1.
∇f = λ∇g means fx = λgx and fy = λgy .

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 42
Physical
/ 66
Example 1 f (x, y ) = x 2 + 2y 2 on x 2 + y 2 = 1.

fx = λgx ⇐⇒ 2x = 2xλ − − (1)


fy = λgy ⇐⇒ 4y = 2y λ − − (2)
x 2 + y 2 = 1. − − (3)

Now, we proceed to solve for x, y and λ.


From (1), we have x(1 − λ) = 0 so that x = 0 or λ = 1.
If x = 0, then (2) gives y = 1 or −1. (From (2), λ = 2.)
We have obtained two points, namely, (0, 1) and (0, −1).

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 43
Physical
/ 66
Example 1. f (x, y ) = x 2 + 2y 2 on x 2 + y 2 = 1
If λ = 1, then from (2), y = 0 and thus x = 1 or −1.
We have obtained two points, namely, (1, 0) and (−1, 0).

Evaluating f at these four points:

f (0, 1) = 2, f (0, −1) = 2, f (1, 0) = 1, f (−1, 0) = 1.

Therefore the maximum value of f on the circle x 2 + y 2 = 1 is 2


and the minimum value of f on the circle is 1.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 44
Physical
/ 66
Example 2.

Example
Find the extreme values of the function f (x, y ) = x 2 + 2y 2 on
the disk x 2 + y 2 ≤ 1.

[SOLUTION] Note that the constraint set x 2 + y 2 ≤ 1 is not an


equality constraint. The domain is the set of all points inside and
on the boundary of the unit circle.

The function f (x, y ) = x 2 + 2y 2 is continuous on R2 and the disk


x 2 + y 2 ≤ 1 is closed and bounded.

Therefore, f has global extreme values on this closed disk.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 45
Physical
/ 66
Example 2. f (x, y ) = x 2 + 2y 2 on x 2 + y 2 ≤ 1.
Step 1: Find all possible candidates for the extreme values in
the interior of the disk. That is, solve ∇f (x, y ) = (0, 0) where
(x, y ) is inside the unit circle.

So, we solve ∇f (x, y ) = (0, 0), where x 2 + y 2 < 1.

∇f (x, y ) = (0, 0) ⇐⇒ 2x = 0 & 4y = 0

Thus, x = 0 and y = 0, and (0, 0) satisfies x 2 + y 2 < 1.


Only one stationary point (0, 0) and f (0, 0) = 0.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 46
Physical
/ 66
Example 2. f (x, y ) = x 2 + 2y 2 on x 2 + y 2 ≤ 1.
Step 2: Find the candidates for extreme values of f on the
boundary, i.e., x 2 + y 2 = 1.
Here we apply Lagrange Multipliers.

According to Example 1, these points are found to be

(0, 1) , (0, −1) , (1, 0) , (−1, 0) .

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 47
Physical
/ 66
Example 2. (Cont’d).
Step 3: Compute and compare the values of f at all points
obtained in Steps 1 and 2:

f (0, 1) = 2, f (0, −1) = 2, f (1, 0) = 1, f (−1, 0) = 1, f (0, 0) = 0.

We conclude that the global (absolute) maximum of f on the


disk x 2 + y 2 ≤ 1 is f (0, ±1) = 2
and the global (absolute) minimum is f (0, 0) = 0.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 48
Physical
/ 66
Quiz
https://forms.gle/dQKkGE9dHbhjGhF2A

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 49
Physical
/ 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 50
Physical
/ 66
Lagrange Multipliers: f (x, y , z).
ASSUMPTION Global Extreme values exist.

To find the maximum and minimum values of f (x, y , z) subject


to the constraint g (x, y , z) = k :
(a) Find all values of x, y , z and λ such that

∇f (x, y , z) = λ∇g (x, y , z)

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.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 51
Physical
/ 66
Lagrangian Function
An equivalent formulation of the method of Lagrange multipliers:
to find extreme values of a function f (x1 , . . . , xn ) subject to a
constraint g(x1 , . . . , xn ) = 0, we write the Lagrangian function

L(x1 , . . . , xn , λ) = f (x1 , . . . , xn ) − λg(x1 , . . . , xn )

and find its stationary points.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 52
Physical
/ 66
Example 3. Lagrange Multipliers

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.

[SOLUTION] Let x, y and z denote the length, width and height


of the box respectively. Then the volume of the box is

V = xyz.

The area of the four sides and the bottom is

2xz + 2yz + xy = 12.


Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 53
Physical
/ 66
Example 3 (cont’d). Solution
The Lagrangian function is

L(x, y , z, λ) = xyz − λ(2xz + 2yz + xy − 12)

Finding stationary points:

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)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 54
Physical
/ 66
Example 3 (cont’d). Solution
Multiplying (1) by x, (2) by y and (3) by z we have

xyz = λ (2xz + xy ) (5)


xyz = λ (2yz + xy ) (6)
xyz = λ (2xz + 2yz) . (7)

Note that λ 6= 0, for otherwise, yz = xz = xy = 0 from (1) , (2)


and (3), and this will contradict (4).
Therefore from (5) and (6), we have 2xz + xy = 2yz + xy ,which
gives x = y (note z 6= 0, why?).
From (6) and (7), we have 2yz + xy = 2xz + 2yz, which yields
y = 2z.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 55
Physical
/ 66
Example 3 (cont’d). Solution
Substituting x = y = 2z into (4) (2xz + 2yz + xy = 12), we have

4z 2 + 4z 2 + 4z 2 = 12, giving z 2 = 1.

Since x, y and z are positive, we have

x = y = 2 and z = 1.

The value V (2, 2, 1) = 4 is the maximum volume.


Note There is only one point found from the Lagrange Multiplier
Method. Since V (x, y , z) > 0, thevalue found
 cannot be a
4 8
global minimum ( for example: V 2, 1, = < 4).
3 3

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 56
Physical
/ 66
Quiz
https://forms.gle/zbpJbeszTzb7VyWy7

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 57
Physical
/ 66
Outline

1 Optimization Problems & Extreme Values

2 Local Extrema & Interior Points

3 Second Derivative Test for Local Extrema.

4 Lagrange Multiplier for One Equality Constraint

5 Lagrangian function

6 Two Equality Constraints (Optional)

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 58
Physical
/ 66
Two Constraints: Algorithm
Assumption: Global extreme values exist.
To find the maximum and minimum values of f (x, y , z) subject
to the constraints g (x, y , z) = k and h (x, y , z) = c
(a) Find all values of x, y , z, λ and µ such that

∇f (x, y , z) = λ∇g (x, y , z) + µ∇h (x, y , z) ,

g (x, y , z) = k and h (x, y , z) = c.

(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.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 59
Physical
/ 66
Diagram.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 60
Physical
/ 66
Example 4.

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.

[SOLUTION] The equation x 2 + y 2 = 1 described infinite-length


cylinder (center (0, 0, z), radius 1) parallel to the z-axis.

The two constraints define a closed and bounded curve.

The continuous function f has extreme values on this constraint


set.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 61
Physical
/ 66
Example 4. x − y + z = 1 & x 2 + y 2 = 1.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 62
Physical
/ 66
Example 4. (Cont’d) f (x, y , z) = x + 2y + 3z.
Let g(x, y , z) = x − y + z and h(x, y , z) = x 2 + y 2 . We proceed
to solve for x, y , z, λ and µ which satisfy

∇f = λ∇g + µ∇h, g(x, y , z) = 1 & h(x, y , z) = 1.



 1 = λ + 2xµ, − − −(1)

 2 = −λ + 2y µ, − − −(2)



3 = λ + 0 · µ, i.e., λ = 3,

x − y + z = 1,




 x 2 + y 2 = 1.

Substituting λ = 3 into (1) & (2), we have µx = −1 & 2µy = 5.

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 63
Physical
/ 66
Example 4. (Cont’d).
Multiplying x 2 + y 2 = 1 by µ2 , we have

(µx)2 + (µy )2 = µ2 . − − − (3)

Substituting µx = −1 & µy = 5/2 into (3), we obtain



2 5 2 29 ± 29
µ =1+( ) = so that µ = .
2 4 2

29
When µ = , we have
2
−2 5 7
x = √ ,y = √ ,z = 1 − x + y = 1 + √ .
29 29 29

Thus, f (x, y , z) = 3 + 29.
Main instructor — Dr Duzhin Fedor, slides mostly developed
MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 64
Physical
/ 66
Example 4. (Cont’d).

− 29
When µ = , we have
2
2 −5 7
x = √ ,y = √ ,z = 1 − √ .
29 29 29

Thus, f (x, y , z) = 3 − 29.

Therefore, the global maximum
  is f (x, y , z) = 3 + 29 at
−2 5 7
√ , √ ,1 + √ .
29 29 29

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 65
Physical
/ 66
Quiz
https://forms.gle/wVBEz21R1pf7rDEX7

Main instructor — Dr Duzhin Fedor, slides mostly developed


MH1811
by DrMathematics
Tan Geok Choo
2 (Division of Mathematical Sciences School of 66
Physical
/ 66

You might also like