lecture 7
lecture 7
01202N
Lectures Notes
Lecture 7
Fall 2024
1
Nonlinear optimization
Unconstrained optimization problem
1. Function of one variable:
min 𝒇(𝒙), where 𝒙 ∈ 𝑹
2
Example 2: The function 𝑓(𝑥) = 𝑥 3 has a critical point at 𝑥 = 0 because
𝑓 ′ (𝑥) = 3𝑥 2 and 𝑓 ′ (𝑥) = 0 → 𝑥 = 0. But the point 𝑥 = 0 is not a max. point nor a
min. point.
Theorem 3.
If a function 𝑓 has a local maximum or a local minimum at a point 𝑥 = 𝑥0 , then 𝑥0 is a
critical point.
The converse is not true.
Example 3: Find the critical points of 𝑓(𝑥) = 3𝑥 4 − 4𝑥 3 − 12𝑥 2 + 5 and identify the
intervals of on which 𝑓 is increasing and on which is decreasing.
Solution:
𝑓(𝑥) = 3𝑥 4 − 4𝑥 3 − 12𝑥 2 + 5
𝑓 ′ (𝑥) = 12𝑥 3 − 12𝑥 2 − 24𝑥
= 12𝑥(𝑥 2 − 𝑥 − 2)
= 12𝑥(𝑥 − 2)(𝑥 + 1)
The critical points are 𝑥 = 0, 𝑥 = 2, 𝑎𝑛𝑑 𝑥 = −1.
3
Intervals −∞ < 𝑥 < −1 −1 < 𝑥 < 0 0<𝑥<2 2<𝑥<∞
12𝑥 - - + +
(𝑥 − 2) - - - +
(𝑥 + 1) - + + +
Sign of𝑓 ′ - + - +
Behavior of 𝑓 Decreasing increasing Decreasing increasing
50
40
30
20
10 local max
0
-3 -2 -1 -10 0 1 2 3 4
local
min -20
-30
-40 local
min
4
What does 𝒇′′ say about 𝒇?
Let 𝑦 = 𝑓(𝑥) be twice differentiable on an interval I
1) If 𝑓 ′′ > 0 on the interval 𝐼, the graph of 𝑓 over I is convex.
2) If 𝑓 ′′ < 0 on the interval 𝐼, the graph of 𝑓 over I is concave.
1
− +
3
1 1
So, 𝑓 is convex on ( , ∞) and concave on (−∞, ).
3 3
The curve y = 𝑥 3 − 𝑥 2 in Example 5 changes concavity at the point 𝑥 = 1/3 .
This point is called a point of inflection of the curve.
Definition: Points of Inflection
it is a point where the function changes from being concave to convex, or vice versa.
5
The second derivative test:
Suppose that 𝑓 ′′ is continuous on an open interval that contains 𝑥 = 𝑐
a) If 𝑓 ′ (𝑐) = 0 𝑎𝑛𝑑 𝑓 ′′ (𝑐) > 0 , then 𝑓 has a local minimum at 𝑐 .
b) If 𝑓 ′ (𝑐) = 0 𝑎𝑛𝑑 𝑓 ′′ (𝑐) < 0 , then 𝑓 has a local maximum at 𝑐
c) If 𝑓 ′ (𝑐) = 0 𝑎𝑛𝑑 𝑓 ′′ (𝑐) = 0 , then the test fails. The function 𝑓 may have a local
maximum, a local minimum, or neither.
Example 6: Discuss the convexity of 𝑓(𝑥) = 𝑥 4 − 4𝑥 3 , and classify all critical points.
Sketch a graph of the function.
Solution:
𝑓(𝑥) = 𝑥 4 − 4𝑥 3
𝑓 ′ (𝑥) = 4𝑥 3 − 12𝑥 2 = 4𝑥 2 (𝑥 − 3)
𝑓 ′′ (𝑥) = 12𝑥 2 − 24𝑥 = 12𝑥(𝑥 − 2)
• The critical points are 𝑥 = 0, 𝑥 = 3
• 𝑓 ′′ (𝑥) = 12𝑥 2 − 24𝑥 = 12𝑥(𝑥 − 2) = 0 → 𝑥 = 0 & 𝑥 = 2
We use these points to define intervals where f is convex or concave.
Intervals 𝑥<0 0<𝑥<2 2<𝑥
12𝑥 - + +
(𝑥 − 2) - - +
′′
Sign of 𝑓 + - +
Behavior of 𝑓 Convex concave convex
The function is convex on (−∞, 0) ∪ (2, ∞) and the function is concave on (0,2).
Using the second derivative test for local extrema, since
𝑓 ′ (3) = 0 and 𝑓 ′′ (3) > 0, then the point 𝑥 = 3 is a local min.
Now, 𝑓 ′ (0) = 0 and 𝑓 ′′ (0) = 0, then no conclusion can be made by the second derivative
test.
By the first derivative test, 𝑓 ′ (0) = 0 and 𝑓 ′ (−0.1) < 0, 𝑓 ′ (0.1) < 0. Then the critical
point 𝑥 = 3 is no max no min.
The general shape of the curve is shown in the accompanying Figure.
6
7
2. Function of two variables:
Now, we consider the function 𝑓 of two variables, 𝑥 and 𝑦, where 𝑥 ∈ 𝑅 and 𝑦 ∈ 𝑅.
Consider
Critical point:
Solution:
𝜕𝑓
= 0 → 2𝑥 − 2𝑦 − 2 = 0 → (1)
𝜕𝑥
𝜕𝑓
= 0 → −2𝑥 + 4𝑦 = 0 → (2)
𝜕𝑦
2𝑦 − 2 = 0 → 2𝑦 = 2 → 𝑦 = 1
1) If 𝐷(𝑐, 𝑑) > 0 and 𝑓𝑥𝑥 (𝑐, 𝑑) > 0, then 𝑓 has a local min. at (𝑐, 𝑑).
2) If 𝐷(𝑐, 𝑑) > 0 and 𝑓𝑥𝑥 (𝑐, 𝑑) < 0, then 𝑓 has a local max. at (𝑐, 𝑑).
3) If 𝐷(𝑐, 𝑑) < 0, then 𝑓 has a saddle point at (𝑐, 𝑑), (see the following Figure)
8
Example 2: classify the critical point of the last example
Example 3: Find all local minimum, local maximum, and saddle points of
𝑓(𝑥, 𝑦) = 3𝑥 2 + 6𝑥𝑦 + 2𝑦 2 + 4𝑥 + 2𝑦 + 15
Solution:
𝑓𝑥 = 0 → 6𝑥 + 6𝑦 + 4 = 0 (1)
𝑓𝑦 = 0 → 6𝑥 + 4𝑦 + 2 = 0 (2)
(1) − (2) → 2𝑦 + 2 = 0 → 2𝑦 = −2 → 𝑦 = −1
1
Substituting in (2) → 6𝑥 − 4 + 2 = 0 → 6𝑥 = 2 → 𝑥 =
3
1
The critical point is ( , −1)
3
= 24 − 36 = −12 < 0
9
10