Re-write 2^x
as exp(log(2)*x)
Then use the exponential cone construct:
y*exp(y/x) <= z,
with y > 0
can be written in CVX as
{ x, y, z } == exponential(1)
or alternatively,
x + rel_entr(y,z) <= 0
Declare z
as a CVX variable, replace y*exp(y/x)
by z
, and add one of the above constraints.
Either way, CVXQUAD can be used without modification to your program, and is recommended for your problem CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions .