Sqrt of (x^2-a^2) in cvx

Uncategorized
Jun 28, 2019
T

Hi,

Sir, I want to write D-sqrt(x^2-A^2) in cvx. Could you please help me writing it in cvx.

Thanks

E

How does that appear in the model? In the objective? In a constraint? And what is constants and what is variables?

T
Replying to #2

Thanks for reply.
It appears in objective function x is optimization variable. In the domain of my interest its 2nd derivative is positive. My problem is just to make it compatible with cvx and ‘a’ is constant.

E
Replying to #3

Something like:

\begin{array}[lc] \mbox{min} & D -t \\ st. &(x+a)(x-a) \geq t^2 \\ & x-a \geq 0 \\ \end{array}

should do it.
The two constraints can expressed using a rotated quadratic cone.

Note we are actually saying

|t| \leq (x+a)^{0.5} (x-a)^{0.5}

so t has to be less than the geometric average of (x+a) and (x-a).

T
Replying to #4

Thanks for your prompt reply. I am just curious if this function appear in constraint then how would we right it.

E
Replying to #5

Look at the rotated_lorentz entry at http://cvxr.com/cvx/doc/funcref.html#sets .