hello everyone!I met a problem about how to express sqrt(2x+1)/(x+1) by CVX? I demonstrate mathematically that when x>0, sqrt(2x+1)/(x+1) is convex, but CVX rejects it. How on should I express it?thank you for your answer,please help me
1 Like
According to my calculations,
0 <= x <= sqrt(1/3). the expression is concave.
x >= sqrt(1/3), the expression is convex.
Hence is is not convex as you claim (nor is it concave).
Even if you further constrained the problem to x >= sqrt(1/3), it is doubtful this could be expressed in CVX due to not being convex over the entirety of its “natural” domain.
On the other hand, whether this can be used in CVX depends on whether the context allows some reformulation. For instance, the constraint sqrt(2*x+1)/(x+1) >= 1
could be rewritten as sqrt(2*x+1) >= x+1
, and entered directly as such in CVX.
1 Like
Understood Mark. Thanks, this helps me a lot.