Constraint expression in cvx

x1^2+x2^2=x3^2(non convex) can be transformed for convexification to be x1^2+x2^2<=x3^2.

When the above constraint is performed in cvx, it indicates ‘invalid constraints: convex<=convex’
How to express that constraint in cvx?

Thank you.

You constraint is not convex unless you add x3>=0.

Why do not you write something like

x3 >= norm([x1,x2])

x1, x2, x3 are control varibles and these three control variable are related to x1^2+x2^2=x3^2. When I set that constrait as you said, the result is strange.
Is there another method to express?

Thank you

When x1^2+x2^2=x3^2 is transformed to x1^2+x2^2 <= x3^2 (plus x3 >= 0), the original constraint is relaxed. If x1^2+x2^2<=x3^2 is not satisfied with equality at the optimum of the transformed (relaxed) problem, then the optimum of the relaxed problem is not necessarily optimal for the original problem, and the relaxed problem may have a better objective value than could be achieved in the original problem.

If you need equality to hold, and the relaxed problem does not achieve that, you may need to solve the problem as a non-convex problem, using some tool other than CVX.

Thank you for your answer.

I have one more question.

With variables u1, u2, I expressed the constraint as follows:
tan(alpha_min)<= u2/u1<=tan(alpha_max)

error message: Cannot perform the operation: {real affine} ./ {real affine}
How to express it in cvx?
Thank you.

Presuming u1 and u2 are both (constrained to be) nonnegative, you can multiply things out.

u1*tan(alpha_min) <= u2
u2 <= u1*tan(alpha_max)

Thank you so much for your kind answer.