Finding Optimal Value of State and Lagrangian Multiplier
Authors: Housam Binous and Ahmed Bellagi
Finding Optimal Value of State and Lagrangian Multiplier
Authors: Housam Binous and Ahmed Bellagi
Authors: Housam Binous and Ahmed Bellagi
This problem is derived by M. N. Bandyopadhyay, Control Engineering: Theory and Practice, Prentice Hall India, New Delhi, 2004, page 390.
We look for the extremum of f(,,) = ++ when it lies on the intersection of the surfaces defined by:=+4 and ++=1
x
1
x
2
x
3
2
x
1
2
x
2
2
x
3
x
3
x
1
x
2
x
1
x
2
x
3
fnc1=x1^2+x2^2+x3^2
2
x1
2
x2
2
x3
eqn1=x1x2+4-x3
4+x1x2-x3
eqn2=x1+x2+x3-1
-1+x1+x2+x3
The Lagrangian is L(,,,,)
x
1
x
2
x
3
λ
1
λ
2
L[x1_,x2_,x3_,λ1_,λ2_]:=fnc1+λ1eqn1+λ2eqn2
The two extrema are given below. We get the same results as those given by Minimize. In addition, we obtain the value of the Lagrangian multipliers: =2and=0.
λ
1
λ
2
sol=Solve[{D[L[x1,x2,x3,λ1,λ2],{x1,1}]0,D[L[x1,x2,x3,λ1,λ2],{x2,1}]0,D[L[x1,x2,x3,λ1,λ2],{x3,1}]0,D[L[x1,x2,x3,λ1,λ2],{λ1,1}]0,D[L[x1,x2,x3,λ1,λ2],{λ2,1}]0},{x1,x2,x3,λ1,λ2},Reals]
x1-
3
,x23
,x31,λ12,λ20,x13
,x2-3
,x31,λ12,λ20sol1=sol[[1]]
x1-
3
,x23
,x31,λ12,λ20sol2=sol[[2]]
x1
3
,x2-3
,x31,λ12,λ20Minimize[{fnc1,eqn10,eqn20,x1≥0},{x1,x2,x3}]
7,x1
3
,x2-3
,x31Minimize[{fnc1,eqn10,eqn20,x1≤0},{x1,x2,x3}]
7,x1-
3
,x23
,x31fnc1/.sol1
7
fnc1/.sol2
7