X*log(1-x/x) DCP error : How to handle it

Hello,

Given the objective: maximize x*log(1-x/x), CVX will reject it. One way to fix this issue is to consider the following:

x*[ log(1-x) - log(x)] = xlog(1-x) - xlog(x) — Adding and subtracting { log(1-x) }

-xlog(x) + xlog(1-x) + log(1-x) - log(1-x) = -xlog(x) + [xlog(1-x) - log(1-x) ] + log(1-x)

-x*log(x) + [x-1]log(1-x) + log(1-x) = -xlog(x) - [1-x]*log(1-x) + log(1-x) = entr(x) + entr(1-x) + log(1-x)

Thus, if we use the equivalent function, CVX will accept it as it satisfies its DCP ruleset.

maximize entr(x) + entr(1-x) + log(1-x) ---- WILL WORK

Basul003

2 Likes