Exponential function in CVX

Dear all,

I don not know how to express the following constraint in CVX

sum_{j=1}^{n} exp(\beta*(\xi_jx_j-t)) \leq n\lambda

where x and t are variables, \xi, \lambda and \beta are given parameters.

thank you!

This is non-convex, so can not be modeled in CVX.

Consider a simplified version of your left-hand side: exp(x*y) where x and y are both variables. That is non-convex. Your version doesn’t make things any better.

Thanks for your reply, beta, a scalar, and xi_j, which is the coefficient of x_j are both given parameters. we redefine xi_j =p_j to avoid confusion. In my question, x is a n-dimensional variable with the entry x_j, j=1,…n. t is another variable to be determined.

Thus, the constraint can be reformulated as
\sum_{j=1}^{n} exp( \beta * ( p_j * x_j - t ) )<=n*\lambda

with known \lambda.

Sorry for misleading you due to confused writing.

O.k., now that the problem statement has been deconfused, I agree that the constraint is convex.

For n =1 , you can take the log of both sides and enter it straightforwardly into CVX.

For n >= 1, use log_sum_exp
log_sum_exp(beta * p' * x - t) <= log(n * lambda)

Please verify that I have correctly interpreted your problem and that this does what you want.

Thank you very much.