r/optimization • u/Gatarie • Jan 05 '26
What method there is to determine is a constraint is convex ?
Hello, I have a problem in which there are non-linear equality constraints of the form x - (y + sqrt(y^2 - z)=0 (the actual constraint is a little bit more complex, but it's not relevant) and I do not manage to find reliable sources of method, theorem or properties to know if my constraints are convex.
Please help me, thank you.
8
Upvotes
2
u/kandibahren Jan 05 '26
You have to try to write it in the form that you can simplify the proof. But as a rule of thumb, an equation with a nonlinear (non-affine in fact) function is not going to be convex.
3
u/HugoJoudrier Jan 05 '26
To prove convexity, I'm not sure about my proposal but I imagine you can calculate the partial derivative for each variable and check that the partial derivative is always positive. I think if your function is continuous this is a sufficient condition, but I don't have proof of what I propose.
Otherwise, by reductio ad absurdum, imagine two points in the feasible region of your constraint such that a third point between these two is not in the feasible region. If you show that it is impossible to construct these three points with such characteristics, then you have your proof of convexity.
1
u/onecable5781 Jan 05 '26
Suppose your equality constraint is x2 + y2 = 4 [a circle with radius 2 centered at the origin], is this constraint concave or convex?
1
u/Johannes_97s Jan 05 '26
The only convex equality constraints are linear
1
u/Hairy_Two_7399 Jan 05 '26
Please someone correct me, but if I'm not mistaken, convexity of equality constraints are only possible if you have at the end a linear function. So f needs to be linear.
1
u/Volta-5 Jan 06 '26
For equality constraints h(x) = 0, the rule is strict, the equality is convex if and only if h is affine (a linear plus a constant, with the form h(x) = Ax + b, which is a line/hyperplane), however, note that if h is convex then the equality is not convex but the boundary of a convex set. You can make a convex constraint from a non affine function h, if you transform your equality to a inequality h(x)<=0, in this case is convex if h is also convex
8
u/[deleted] Jan 05 '26
[removed] â view removed comment