For example:

cvx_begin

variables x y

minimize x*y

subject to

x>=0.5;

y>=0.5;

x<=1;

y<=1;

cvx_end

and it says “Invalid quadratic form(s): not a square.” Is cvx only applicable for squared objective functions like x^2?

For example:

cvx_begin

variables x y

minimize x*y

subject to

x>=0.5;

y>=0.5;

x<=1;

y<=1;

cvx_end

and it says “Invalid quadratic form(s): not a square.” Is cvx only applicable for squared objective functions like x^2?

No, it is not applicable for arbitrary, nonconvex quadratic problems, like yours.

It is applicable for quadratic problems which have a convexity proof which fits the DCP rules, for example by using `x^2`

, `quad_form`

, `norm`

, `sum_squares`

, `quad_over_lin`

and maybe more.

1 Like