# Is it possible to solve for objective function with x.*exp(x+y)+y.*exp(x+y)

I want to solve a convex optimization problem with objective function Axe^{x+y}+Bye^{x+y} subjected to x\geq 0, y\geq 0 and x+y>=C, where x and y are vectors of the same dimension and ABC are constants. Is this optimization problem possible with CVX?

Thanks

You haven’t offered enough information to say. Specifically: are you minimizing or maximizing? (Your objective function is log-concave.) Are A and B nonnegative?

I’m going to guess A,B>0 and you are minimizing, because otherwise you probably have an unbounded problem. Unfortunately, no, it cannot be solved. x e^x is not convex; and even though it is convex for positive x, CVX requires functions to be globally convex. If you take the logarithm of your function, you find it is concave, which means it could be maximized.

Sorry for the incomplete problem description and what you said is correct. Both A and B are positive constants and I want to minimize the objective function over the positive decision variables x and y. Taking the log on the objective function is not possible because it is the summation between two terms.

Then, the question I want to ask is: is it possible to define the objective function and run it with cvx? For example, I define the pairwise function
\begin{align}
f(x)=\begin{cases}
xe^x,&x\geq0\
0,&x<0
\end{cases}
\end{align}
and this function is globally convex.

No, it is not. Please read the FAQ, starting at the section entitled “Can I add my convex/concave function to the CVX function library?”