Writing x*log(1+x/y)

(John) #1

Hi guys,
I met a problem while using cvx. My objective function is f(x,y) = x*log(1+x/y),x>0,y>0. The function is convex, but I don’t know how to express which in cvx. Can you help me?

Does cvx solve nonlinear convex problems?
(Mark L. Stone) #2

I believe x*log(1+x/y) is convex for x > 0, y > 0.

I don’t see how to get it into CVX. Perhaps someone else knows how, although I don’t know whether it can be done.

As has been posted on this forum, the “similar” looking x*log(1+y/x) can be expressed as -rel_entr(x,x+y), and is concave for x > 0, y > 0. But I don’t see how to use rel_entr for x*log(1+x/y)

(Michal Adamaszek) #3


(John) #4

Thanks alot I appreciate that.

(Mark L. Stone) #5

@Michal_Adamaszek Nice solution. Nice cancellation of terms. Thanks.