HW8
HW8
HW8
MAT3007
Homework 8
Xiying Lu 122090371
Question 1
2
∇𝑓(𝑥)𝑇 𝒅 = ∇𝑓(𝒙)𝑇 (−∇𝑓(𝒙)𝑗 𝒆𝑗 ) = −∇𝑓(𝒙)𝑗 ∙ ∇𝑓(𝒙)𝑗 = −(∇𝑓(𝒙)𝑗 ) < 0
∇𝑓(𝒙)
∇𝑓(𝑥)𝑇 𝒅 = ∇𝑓(𝒙)𝑇 (− ) = − ‖∇𝑓(𝒙)‖ < 0
‖∇𝑓(𝒙)‖
∇𝑓(𝒙)
(c) Proof: Since 𝒅 = − max{∇2 𝑓(𝒙)𝑗
𝑖𝑖 , 𝜀}
𝑛 𝑛
𝑇
(∇𝑓(𝒙)𝑗 )2
∇𝑓(𝑥) 𝒅 = ∑ ∇𝑓(𝒙)𝑖 𝑑𝑖 = − ∑
max{∇2 𝑓(𝒙)𝑖𝑖 , 𝜀}
𝑖=1 𝑖=1
Xiying Lu 122090371 MAT3007 Homework 8
(∇𝑓(𝒙)𝑗 )2
∇𝑓(𝒙) ≠ 0, each term >0 .
max{∇2 𝑓(𝒙)𝑖𝑖 , 𝜀}
(∇𝑓(𝒙) )2
Thus, ∇𝑓(𝑥)𝑇 𝒅 = − ∑𝑛𝑖=1 max{∇2𝑓(𝒙)
𝑗
<0
𝑖𝑖 , 𝜀}
Question 2
1 𝜆
(a) 𝑓(𝒙) = ‖𝑨𝒙 − 𝒃‖2 + ‖𝒙‖2
2 2
②Hessian: ∇2 𝑓(𝒙) = 𝑨𝑻 𝑨 + 𝜆𝑰
∀𝑖, 𝜇𝑖 + 𝜆 > 0, then 𝜆 > −𝑚𝑖𝑛 (𝜇𝑖 ) ,where 𝑚𝑖𝑛 (𝜇𝑖 ) is the smallest eigenvalue
of 𝑨𝑻 𝑨
③Non-convexity: 𝐻𝑓 (𝒙) is not positive semi-definite (at least one eigenvalue <
0)
then 𝜆 < −𝑚𝑖𝑛 (𝜇𝑖 ) ,where 𝑚𝑖𝑛 (𝜇𝑖 ) is the smallest eigenvalue of 𝑨𝑻 𝑨
Xiying Lu 122090371 MAT3007 Homework 8
2 1 1
𝑨=[ ];𝒃 = [ ]; 𝜆 = 3
1 2 1
1
1 1
𝒙𝟎 = [2] , 𝛾 = , 𝜎 =
1 2 2
2
∇𝑓(𝒙) = 𝑨𝑻 (𝑨𝒙 − 𝒃) + 𝜆𝒙
3 3
2 1 1 −3
𝒅𝟎 = −∇𝑓(𝒙𝟎 ) = −[𝑨𝑻 (𝑨𝒙𝟎 − 𝒃) + 𝜆𝒙𝟎 ] = − [ ] ([2] − [ ]) − [2] = [ ]
1 2 3 1 3 −3
2 2
1 2 𝜆 2 1 3
𝑓(𝒙𝟎 ) = ‖𝑨𝒙𝟎 − 𝒃‖ + ‖𝒙𝟎 ‖ = + = 1
2 2 4 4
Backtracking Line Search (Armijo Condition):
𝑓(𝒙𝟎 + 𝛼0 𝒅𝟎 ) ≤ 1 − 9𝛼0
Since 𝜑(𝛼) = 𝑓(𝒙𝟎 + 𝛼𝒅𝟎 ) − 𝑓(𝒙𝟎 ), 𝜑′(𝛼) = ∇𝑓(𝒙𝟎 + 𝛼𝒅𝟎 )𝑇 𝒅𝟎 ,
𝜑′(0) = ∇𝑓(𝒙𝟎 )𝑇 𝒅𝟎 ,
(2)From the previous parts of the problem, we know the gradient of the
Xiying Lu 122090371 MAT3007 Homework 8
3
objective function ∇𝑓(𝒙𝟎 ) = [ ]
3
1
We are using a constant step size 𝛼 = 12,so the next iterate is:
1 1 1
−
𝒙𝟏 = 𝒙𝟎 + 𝛼𝒅𝟎 = [21] + [ 41] = [41] ,
−4
2 4
3 3
2 1 1 0
−∇𝑓(𝒙𝟏 ) = −[𝑨𝑻 (𝑨𝒙𝟏 − 𝒃) + 𝜆𝒙𝟏 ] = − [ ] ([4] − [ ]) − [4] = [ ]
1 2 3 1 3 0
4 4
𝟏 )𝑇 𝟏
∇𝑓(𝒙 𝒅 = 𝟎
𝒅𝟏 is not a descent direction because the gradient at 𝒙𝟏 is zero, indicating we are
at a stationary point.
Question 3
The gradient of the function 𝑓(𝒙) is the vector of partial derivatives with respect
to 𝑥1 and 𝑥2 :
Xiying Lu 122090371 MAT3007 Homework 8
𝜕𝑓
= −𝑒 1−𝑥1−𝑥2 + 𝑒 𝑥1+𝑥2−1 + 2𝑥1 + 𝑥2 + 1
𝜕𝑥1
𝜕𝑓
= −𝑒 1−𝑥1−𝑥2 + 𝑒 𝑥1+𝑥2−1 + 𝑥1 + 2𝑥2 − 3
𝜕𝑥2
MATLAB Code:
①α=1
Xiying Lu 122090371 MAT3007 Homework 8
Plot:
②α=0.1
Plot:
Xiying Lu 122090371 MAT3007 Homework 8
Plot:
Xiying Lu 122090371 MAT3007 Homework 8
Question 4
MATLAB Code:
Xiying Lu 122090371 MAT3007 Homework 8
Results:
Plot: