Solve optimization problems of exp function

Yes, it can be done, but it’s a bit complicated. Suppose you have a single term y*exp(x/y) that you wish to handle. Then what you do is replace that term with a new variable z, and now you need to add a constraint equivalent to

y*exp(x/y) <= z

There are two ways to do this. One is to use the exponential cone:

{ x, y, z } == exponential( 1 )

The other is to use rel_entr:

x + rel_entr(y,z) <= 0

You’ll have to do some algebra to confirm that this inequality is equivalent to the first. If you have multiple terms of the form y*exp(x/y), you have to replace each one in the same way: create the new variable, add a new constraint.

Of course, please do remember that log, exp, rel_entr, the exponential cone, etc. all depend on CVX’s experimental successive approximation method. Using CVX with these functions is less reliable.

1 Like