Ex.1 Find the minimum of f(x,y)=x²+xy+y²in(x,y)∈R².
Solution:
The stationary conditions are ∂f/∂x=2x+y=0 and ∂f/∂y=x+2y=0
From the second condition we get either x = -2y or y = −x/2
Substituting x = -2y into the first condition gives us
2(-2y) + y = 0
-4y + y = 0
-3y = 0
y = 0
Substituting y = −x/2 into the first condition gives us
2x + −x/2 = 0
3x/2 = 0
x = 0
So x = 0 and y = 0. These also hold true for the second condition.
Hessian Matrix \[H = \begin{pmatrix} f_{xx} & f_{xy} \\f_{yx} & f_{yy} \end{pmatrix} = \begin{pmatrix} 2 & 1 \\1& 2 \end{pmatrix}\]
fxx = 2x + y = 2
fxy = 2x + y = 1
fyx = x + 2y = 1
fyy = x + 2y = 2
H is positive definite which means that the point (0,0) is a minimum.
Ex.2 For f(x)=x4inR, it has a global minimum at x = 0. Find its new minimum if a constraint x²≥1 is added.
Solution:
f(x)=x4 and g(x)=x²
⨿=f(x)+μ[g(x)]² = x4 +μ[x²]² = x4+μ[x4]
⨿′(x)=4x³+4μx³=0 = ⨿′(x)=4x³(1+μ)=0
X can be either 1 or -1. The new minimum is x = 1.
Ex.3 Use a Lagrange multiplier to solve the optimization problem minf(x,y)=x² +2xy+y²,subject to y=x²−2
Solution:
L=f(x,y)+λh(x,y) h(x,y)=x²−2−y
L=x²+2xy+y²+λ(x²−2−y)
∂L/∂x=2x+2y+2λx=0 , ∂L/∂y=2x+2y−λ=0 , ∂L/∂λ=x²−2−y=0
For the second condition, 2x+2y−λ=0 gives us λ=2(x+y)
Plugging λ=2(x+y) into the first condition gives us
2x+2y+2(2(x+y))x=0
2x+2y+4x²+4xy=0
2(x+y+2x²+2xy)=0 which gives us y=(−2x²−x)/ (2x+1)
Substitute y=(−2x²−x)/(2x+1) into the third condition gives us
x²-2-(−2x²−x)/(2x+1)=0 when simplified gives x = 1 or x = - 2.
Plugging x = 1 into the third condition gives us y = -1 and plugging in x = -2 gives us y = 2. We get two points (1, -1) and (-2, 2).
The optimality for minf(x,y)=x²+2xy+y² is (1, -1) with fmin=0 and (-2,2) with fmin=0