CVX expression about log(sum(inv_pos(x+a))+b)


I got a problem about the expression about" log(sum(inv_pos(x+a))+b)".

variable x(n,1)
subject to


An error occur:
Illegal operation: log( {convex} ).

Can anyone help me to give an idea for feasible expression by using CVX.
Thanks alot.

(Mark L. Stone) #2

If b is negative, log(sum(inv_pos(x+a))+b) may not be convex. If b is positive, I think it is convex, so perhaps @Michal_Adamaszek has a reformulation.


Thanks for your guidance. b is positive.
I find a solution.
variable x(n,1)
variable y(n,1)
subject to
b.*e^{-y} + sum(e^{-y-log(x+a)})<=1;

(Mark L. Stone) #4

At minimum, your program has typo(s).

(Michal Adamaszek) #5

How come this isn’t the same as minimizing sum(inv_pos(x+a))

(Mark L. Stone) #6

I get the “Duh” award. Why of course @Michal_Adamaszek is correct…


Your idea is very enlightening. Then the computational complexity can be simplified.