There is a problem I want to solve,I’m new with the cvx toolbox,I wanna minimize a function `x*(e^(2/x)-e^(1/x))`

. I have proven its convexity,with constraints sum(x)<=1,I basically look up in forum with perspective function,and I tried the SCA and pade approximation both but unfortunately,It said it’s infeasible,and returns NAN,I wanna know whether it can be solved with CVX ,there is code below;

m=5;

cvx_begin quiet

cvx_solver sedumi

cvx_precision best

variables x(m,1) y(m,1) z(m,1)

cvx_expert false

Et=sum(y+z);

minimize( Et )

subject to

{2,x,y} == exponential(1);

{-1,-x,z} == exponential(1);

sum(x) <= 1;

for i2=1:m

x(i2,1)>=1e-5;

end

cvx_end

By virtue of 2nd argument of exponential cone constraint, your formulation is constraining x > 0 and -x > 0, hence infeasible.

Anyhow, your formulation is wrong.

x e^{2/x} is convex for x>0 and -xe^{1/x} for x<0 so you won’t be able to add them just like that. And if you do you are most likely modeling something unbounded instead.

The function you want can also be written as xe^{1/x}(e^{1/x}-1) but I’m not sure it is possible to model in conic form. At least it looks hard.

thanks for replying,I didn’t know that constraint and I’m also confused how can I can solve this problem,I thought it can only be written in this form

thx for the reply,but once I write that in the form you mentioned, it said affine * log convex,it is not allowed.

Look at exp_cone at http://cvxr.com/cvx/doc/funcref.html#sets . You’ll see that the 2nd argument is constrained to be > 0. That is needed for convexity.

then what can I do to reformulate the problem ,can CVX solve it.

@Michal_Adamaszek is saying that the 2nd form is a reformulation of your expression, but it can’t be entered directly into CVX, and he doesn’t know whether there is a conic reformulation, i.e., a reformulation which CVX would accept. And he’s in the top echelon in the world in conic reformulation. Nevertheless, if you wait, perhaps, he or one of his conic reformulation guru colleagues at Mosek will come up with something (or maybe not).

I understand that ,I tried it once,it said Cannot perform the operation: {real affine} .* {log-convex},so I thought I can use perspective function to try to solve it,but it seems a dead end also,is there other way I can try to solve it plz