Unit #23 : Unconstrained Optimization Goals:

Unit #23 :
Unconstrained Optimization
Goals:
• Learn how to find critical points algebraically.
• Classify critical points using the second derivative test.
• Solve a number of optimization problems.
Reading: Sections 15.1, 15.2.
Unit 23 - Page 2 of 25
Detecting Local Extrema Algebraically
Local Extrema and Critical Points
If the function f (x, y) is differentiable at (a, b) (so that it has a gradient vector)
and f has a local maximum or minimum at (a, b), then grad f (a, b) =< 0, 0 >.
A point where grad f (a, b) =< 0, 0 > is called a critical point.
[See H-H, beginning of Section 15.1.]
Unit 23 - Page 3 of 25
Example: Consider the function f (x, y) = x4 + y 4 − 4xy. Find the location
of the critical points of f (x, y).
Unit 23 - Page 4 of 25
The contour diagram shown below is for the previous function. Label each
critical point as a local min, max or neither.
Unit 23 - Page 5 of 25
We notice that one of the critical points is neither a local max nor min. What does
this type of critical point look like in a surface?
Unit 23 - Page 6 of 25
Saddle Points
Critical points that are not a local maximum or minimum are most commonly
saddle points.
Unit 23 - Page 7 of 25
Saddle Point
A point (a, b) of a function f (x, y) is a saddle point if
• It is a critical point of f and
• It is a crossing of two contour lines
• The surface is shaped like a saddle around the critical point: concave up in one
direction, concave down in another.
Illustration of a saddle point:
1
y
–1
–0.5
0.5
0
0.5
x
–0.5
–1
1
Unit 23 - Page 8 of 25
Example: On the following contour diagram, mark the
• local maxima
• local minima
• saddle points
• global maximum (on the domain shown)
• global minimum (on the domain shown)
Unit 23 - Page 9 of 25
3
9
11
13
1
12
16
15
8
12
1
14 3
10
11
12
2
9
10
14
11
10
7
9
6
9
10
11
5
8
0
9
87
9
10
9
6
11
10
8
5
6
4
3
2
−2
8
3
8
7
6
−1
5 4
9
10
8
7
6
7
−3
−3
−2
−1
0
1
2
3
Unit 23 - Page 10 of 25
3
9
11
13
1
12
16
15
8
12
1
14 3
10
11
12
2
9
10
14
11
10
7
9
6
9
10
11
5
8
0
9
87
9
10
9
6
11
10
8
5
6
4
3
2
−2
8
3
8
7
6
−1
5 4
9
10
8
7
6
7
−3
−3
−2
−1
0
1
2
3
Unit 23 - Page 11 of 25
Determining the Type of Critical Point Analytically
In single variable functions, we tested whether a critical point was a local min or
local max using the first or second derivative tests.
The first derivative test cannot be easily extended to multiple dimensions.
Explain why there is a difficulty in multiple dimensions.
Instead, we will use an extension of the Second Derivative Test, which relates
to the concavity around a critical point.
Unit 23 - Page 12 of 25
Second Derivative Test
Suppose (a, b) is a critical point of f .
Let
D = fxx(a, b) · fyy (a, b) − (fxy (a, b))2
(a) If D > 0 and fxx(a, b) > 0, then (a, b) is a minimum.
(b) If D > 0 and fxx(a, b) < 0, then (a, b) is a maximum.
(c) If D < 0, then (a, b) is a saddle point.
(d) If D = 0, then the test fails.
Cases:
2.5
0
2
–0.5
1.5
–1
1
–1.5
0.5
–2
–1
1
–1
1
–0.5
0.5
00
y
x 0.5
1
–0.5
0.5
x 0.5
–1
1
y
–1
Unit 23 - Page 13 of 25
Example: Identify the critical points of the function
f (x, y) = 3x2y + y 3 − 3x2 − 3y 2
then use the second derivative test to identify which are local maxima and
minima.
Unit 23 - Page 14 of 25
Are the local maxima and minima also the global maxima and minima?
Explain your answer.
Unit 23 - Page 15 of 25
Applications
Example:
A closed rectangular box has volume 100 cm3. What are the
lengths of the edges giving the minimum surface area? Show that your answer is at least a local minimum. (You do not need to show it is a global
minimum.)
Unit 23 - Page 16 of 25
Example:
A company operates two plants which manufacture the same
item and whose total cost functions are
C1 = 8.5 + 0.03q12 and C2 = 5.2 + 0.04q22
where q1 and q2 are the quantities produced by each plant.
The total quantity demanded, q = q1 + q2, is related to the price, p, by
p = 60 − 0.04q
What is the total cost to the company of producing q1 and q2 units?
Unit 23 - Page 17 of 25
What is the gross revenue to the company of producing q1 and q2 units?
Unit 23 - Page 18 of 25
Give a formula for the net profit, as a function of q1 and q2.
Unit 23 - Page 19 of 25
Use critical points to identify the values of q1 and q2 that maximize the profit.
Show that your answer is a local maximum.
Unit 23 - Page 20 of 25
Example: Find the point on the plane 5z + 2x + y = 2 which is closest to
the origin. Use the second derivative test to confirm that your value is a local
minimum for the distance.
Unit 23 - Page 21 of 25
In single-variable calculus, if a continuous function had only one critical point and
it was a local minimum, then that minimum was also a global minimum.
Try to sketch a one-variable function with a local minimum and no other
critical points, but which does not have a global minimum.
Unit 23 - Page 22 of 25
In multi-variate calculus, the range of surfaces we can define is very broad, and
it becomes more difficult to support simple assertions about global maxima and
minima.
Example: Consider the function
f (x, y) = x2(1 − y)3 + y 2
Find the critical points of f .
1
From the Section 15.2 problems.
1
Unit 23 - Page 23 of 25
f (x, y) = x2(1 − y)3 + y 2
Show that the only critical point is a local minimum.
Unit 23 - Page 24 of 25
f (x, y) = x2(1 − y)3 + y 2
Is the local minimum we found a global minimum? Why or why not?
Unit 23 - Page 25 of 25
Support your answer referring to the surface and contour diagrams of
f (x, y) = x2(1 − y)3 + y 2
shown below.
3
100.5−1
0
1
10
−100.51
2
2
4
8
6
−−180
−64
−
−2 .5
−0
−10
−−8
−46
−
−0.52
4
2
0
1
2
1 1
1
1
5
1
0.5
0.5
1
2
4
6
8
10
1
0.5
2
0
0
8
4
10
5
6
0.
1
−5
4
6
2
8
−1
4
−6
−4
8
10
10
−10
−6
1
2
−4
−2
0
−2
6
−2
0
2
2
4
8
4
6
6
−3
−3
−2
−1
0
1
2
3