How to write the code for this objective function in cxv?

image description

s is the vector, Q_i is the positive definite matrix,i=1,2,3

what’s above confused me for a long time

i wrote:


maximize(quad_form(s,Q_1)-power(quad_form(s,Q_2),2)/(1+quad_form(s,Q_3))): error!

maximize(quad_form(s,Q_1)-(quad_form(s,Q_2))^2/(1+quad_form(s,Q_3))): error!


You are not maximizing a concave function.

Take the case of s, Q_1,Q_2, Q_3 being one-dimensional. Then you are trying to maximize (Q_1-Q_2^2/Q_3)*s^2, which is a convex function of s.

This problem is not convex. CVX is for convex problems.