How to implement this function using cvx?

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.