Optimizing (1-x) log(1+(g(x)/h(x)))

I think you can use rel_entr, as shown in the last post in Writing a constraint in DCP complient format .

I think that would be (you better check that this is correct)

cvx_begin
variable x
maximize(-rel_entr(1-x,1-x+(x*D-(1-x)*E)/(F+G))/log(2))
P1 <= x <= P2
cvx_end

If x needs to be strictly greater than P1, then use P1 + a small number, such as 1e-6.

2 Likes