# Formulate the problem as LMI for CVX

I am trying to use SDP in CVX to solve the above problem. I have reformulated using LMI. I am given that a1 >= a2 >=1.

a1=144*4;
a2=4;
cvx_begin sdp
variables x1 x2 y z
minimize( x1+x2 )
subject to
[x1 sqrt(a1);
sqrt(a1) x2]>=0
[x1 sqrt(a2)*z;
sqrt(a2)*z x2]>=0
[y z;
z 1]==0
x1>=y
y>=x2
cvx_end

But it is infeasible. Can you please help me to find a way to solve this problem? if I do [y z; z 1]>=0, then I think I change the constraint.

`[y z;z 1]==0` constrains all elements of the matrix to zero, which is not what you want, and is infeasible because 1 \ne 0.

You can formulate the first constraint in CVX using rotated second order cones, using `rotated_lorentz `, or less efficiently, an LMI as you have done.

As for the second constraint, that could also be handled by a rotated second order cone constraint, this time in terms of change of variable to `y^2` rather than `y`, but that would result in a non-convexity when applied to one of the constraints in the last row.

I’ll defer to someone else to further advise on this, but I think the whole problem may be non-convex, unless relaxed, which will then be a different problem, and I think is basically where you confronted difficulty.

1 Like