# How to write a equation that x*(2^(y/x)-1) in CVX

hello, i want to know how to write a equation that x*(2^(y/x)-1) in CVX, and x,y>=0. This equation has exists in constraint and objective function simultaneously.
This equation should be jointly convex in x,y, it has been proved in some papers, very appreciate for your help.

`x*(2^(y/x)-1) = x*exp(y*log(2)/x) - x`

`x*exp(y*log(2)/x` can be replaced by a variable `z` and the constraint
`{y*log(2),x,z} == exponential(1)`

So the variable `z` is declared, `x*(2^(y/x)-1)` is replaced by `z-x`, and the constraint `{y*log(2),x,z} == exponential(1)` is added.

However, i rewrote program and i found a another problem
Here is my code:

``````cvx_begin
variable x
variable y
minimize( x*exp(y*log(2)*inv_pos(x)) - x )
cvx_end
``````

This is not my original problem, but it is an important part of it, and here is error information:
Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {convex}

You did not follow my instructions.

``````cvx_begin
variables x y z
minimize(z-x)
{y*log(2),x,z} == exponential(1)
cvx_end``````