I have the following functions in an optimization problem.
$x\times 2^{(y/x)-1}$
$ x \log (a+b\times 2^{(y/cx)-1} )$
Here, x,y>0, and also a,b,c>0, and b>a. For these conditions, I checked that both these functions are convex (their Hessian is positive semidefinite). If I want to solve the optimization problem using CVX, I need to write these functions using a disciplined convex programming rule. Can anyone please help me how to do that? Even the first function has affine divided by affine form, and therefore, I am getting an error when running the code with only the first function. Many thanks for your help.
If $f$ is convex, then the perspective $$g(x,t) = t \, f(x / t)$$ is convex.
Your first function is the perspective of $$f(y) = 2^{y - 1}$$ which is convex. The second function is the perspective of $$ f(y) = \log( a + b \, 2^{y/c -1})$$ which is also convex.
Maybe you can invoke the perspective function in CVX.