How to model a <= 1/b

i know we can write a \geq \frac{1}{b} as [a +b, a - b, 2] in SecondOrderCone() or a + b \geq ||(a-b, 2)||_2

But how can i rewrite a \leq \frac{1}{b} with Second Order cones, power cones, exponential cones, basically anything that mosek offers?

You can’t because this is a non-convex constraint. Mosek is a convex optimization solver.

oh i see, thanks!

is there any nice of modeling t\geq (\log x)^2 when x\geq 1?

If you want to use Mosek, you need convex constraints: https://en.wikipedia.org/wiki/Convex_function.

This is not convex.

https://www.desmos.com/calculator/ecbwmjbxbk

2 Likes

If x only appears through \log(x), e.g., there are no other constraints of the form x + y \leq 1, then you can write z = \log(x) \geq 0 and replace all occurrences of \log(x) by z \geq 0.

Here, t \geq (\log x)^2 becomes t \geq z^{2}, which is convex in the t, z space.

Solve the resulting problem w.r.t z, and recover x = \exp(z) \geq 1.

2 Likes