How to express the function according to the legal form in CVX?

Uncategorized
May 23, 2022
H

Hello, I am now struggling to express the formula below to the legal operation form in CVX.
1/log2(1+a*exp(-norm(\mathbf{q}-\mathbf{u})) / norm(\mathbf{q}-\mathbf{u})^2) where \mathbf{q} and \mathbf{u} are 3D Cartsian coordinate and \mathbf{q}=\{x,y,H\} is optimization variable. Others are given (a, \mathbf{u}, H).
Note that I prove that the function is convex only when 0<(1+a*exp(-norm(\mathbf{q}-\mathbf{u})) / norm(\mathbf{q}-\mathbf{u})^2)<(some positive value). I need the help.

In addition, can it be solved via CVX directly by adding constraint 0<(1+a*exp(-norm(\mathbf{q}-\mathbf{u})) / norm(\mathbf{q}-\mathbf{u})^2)<(some positive value)?

E

It cannot be solved by adding the last constraint explicitly.

H
Replying to #2

Then, this problem cannot utilize CVX for solving?

J
Replying to #3

Probably yes, or no. Can you show your proof of convexity?

H
Replying to #4

The details are difficult to show here, just check positivity of principal minors.
could you explain why it can or not?

M

Even if it is convex, that does not mean it can necessarily be formulated in CVX.

H
Replying to #6

That’s why I request. Is there any chance to formulate this problem for CVX in an appropriate way? please let me know. thank you.

M

It doesn’t appear likely that any forum readers are going to come up with a CVX formulation for your problem. nevertheless,. a free virtual beer to anyone who does.

J

Assume x > 0, then \frac{\partial ^2\frac{1}{\log \left(\frac{\exp (-x)}{x^2}+1\right)}}{\partial x^2}=\frac{2 (x+2)^2-\left(e^x \left(x^2+4 x+6\right) x^2+2\right) \log \left(\frac{e^{-x}}{x^2}+1\right)}{\left(e^x x^3+x\right)^2 \log ^3\left(\frac{e^{-x}}{x^2}+1\right)}, but \underset{x\to 0.1}{\text{lim}}\left(2 (x+2)^2-\left(e^x \left(x^2+4 x+6\right) x^2+2\right) \log \left(\frac{e^{-x}}{x^2}+1\right)\right)=-0.532254<0, \underset{x\to 1}{\text{lim}}\left(2 (x+2)^2-\left(e^x \left(x^2+4 x+6\right) x^2+2\right) \log \left(\frac{e^{-x}}{x^2}+1\right)\right)=8.00661>0. So the function provided is neither convex nor concave.