Ask for help about cvx

As noted in mu answer 如何编写xlog(1+y/x) - #2 by Mark_L_Stone the 2nd argument of rel_entr must be concave. It is not allowed to be convex (except if it is affine, which is a special case of both concave and convex).

I’m not sure exactly what you’re trying to do, but it looks like y1 is a constant divided by a1. Therefore rate_r is basically modeling constant1*a1*log(1+constant2/a1^2), which is neither convex nor concave.

If this is not what you are trying to do, your first step is to prove your optimization problem is convex, if in fact it is.

But if you really are trying to do something like x*log((1+y/x) where x and y are both variables (not some other expressions), you can use -rel_entr(x,x+y).