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?
Thanks

Does cvx solve nonlinear convex problems?
Log(1+1/x) convex function of x. How to implement in CVX fitting DCP rule?
(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)

1 Like
Xlog( 1+ Y/(X+Y) ): DCP rules, and build-in functions in cvx
Perspective of log det function, and CVX formulations of related log det problems using Quantum Relative Entropy from CVXQUAD
(Michal Adamaszek) #3

x*log(1+x/y)=rel_entr(x+y,y)+rel_entr(y,x+y)

4 Likes
Minimize log(1+1/x) where 0<x<inf
(John) #4

Thanks alot I appreciate that.

Writing geo_mean( (1+x/y) ^x )
(Mark L. Stone) #5

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

(zhangQK) #6

Hi, Mark.
I have a function that is z=0.005*abs(y)exp(14.4abs(y)/x) and x>100,-3<=y<=3.And I do not know how to express it in cvx.
Could you help me?
Thank you.

(Erling D.Andersen) #7

Do not reply to an old question with a new question.

(zhangQK) #8

I am sorry,Erling.
But I seem not to ask the question.And I do need to ask to help for this question.

(Erling D.Andersen) #9

I thought you were asking for help:

(zhangQK) #10

Yes,Erling.
z=0.005*abs(y) exp(14.4 abs(y)/x) and x>100,-3<=y<=3.
And this function is convex(I have proved).But I do not how to express it so that cvx can accept it.
Thank you.

(zhangQK) #11

I am sorry.I omitted a word ‘before’ in my last reply.I mean, I haven’t asked such a question before.