# How to implement this function using cvx?

How to implement the following function,
a\log \left( {1 + \frac{{pz}}{{ax + py}}} \right)
where a>0 p\ge 0 are variables, x,y,z are positive constant

The function is indeed a concave function of a and p, with its Hessian always having one negative eigenvalue and one zero eigenvalue.

Of course you are familiar with x\log(1+1/x) using CVX , which shows how to express

a*log(1+1/a) as -rel_entr(a,a+1)


and perhaps you are familiar with the trivial generalization thereof, as discussed in Writing a constraint in DCP complient format , expressing

a*log(1+p/a) as -rel_entr(a,a+p) .


However, I don’t see how rel_entr is up to handling the function you have provided. Perhaps if mcg could figure out how to implement a suitably generalized relative entropy function, otherwise, I don’t see how to do it. On the other hand, I am not claiming your function can not be handled by CVX.

I strongly suspect it’s not implementable. If it can’t be expressed using rel_entr, there really isn’t much hope for CVX support.

thank you very much! may be I have to revise my model