# Error in formulating a constraint

I am trying to formulate the following problem in CVX

``````k =10
cvx_begin
variables w(k);
variables sai(k);
minimize sum(w);
subject to
for i = 1:k,
log(1 + sai(i)) >= inv_pos(w(i));
w(i)>=0;
end
sum(w.*sai.*c1)<c2
cvx_end;
display (sai)
display (w)
``````

CVX gives me an error saying

Disciplined convex programming error:
Invalid quadratic form(s): not a square.
Error in dem (line 11).
sum(w.*sai.*c1)<c2

``````I am unable to proceed further.

Is your problem convex? It does not seem so.

Yes sir I get it, it is non convex. Actually I am trying to impliment a paper with similar problem formulation and I am new to optimization. Are there any API’s that can solve non convex problems? Can you please suggest one that will be good for my formulation? Can I convert the problem into…

…dual domain by wrting the lagrange dual of the problem and the account for the duality gap(there are some papers in my field of intrest that says that the duality gap reduces to zero if certain condition is satisfied) but I dont think so, that is the case with this particular problem…

… actually I just need a sub optimal solution, is the solution that I will get by optimizing the dual, is that feasable(local minima of the primal??). Can I get a sub optimal solution that way.??

This forum is focused on convex problems, and specifically on CVX usage issues. I recommend CompSci StackExchange or OR Exchange for more general questions.

Sir, can I relax the constraint, sum(w.*sai.*c1)<c2
as sum(w.*sai.*c1) = c2 so that I don’t need the LHS to be convex. Does the whole problem become convex now? CVX wont take this constraint because w and sai are 2 variables and we can not multiply 2 variables…but can I solve the problem by the

…lagranges dual method?