Invalid constraint: {constant} <= {convex}

Nonlinear equality constraints are non-convex. Your attempt to commit “convex alchemy” by writing a nonlinear equality as two inequalities does not convexify the constraint, because as you have seen, at least one, and in your case, exactly one of the two constraints must be non-convex.

Please read very carefully

and CVX Users’ Guide — CVX Users' Guide .

if you can get through at least the first 5 chapters of https://web.stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf and solve many of the exercises, you will have a strong foundation for using CVX successfully.