How to implement following function in CVX?

I have a function of form Capture which I have observed as a convex optimization problem w.r.t {\tau_0,\tau_1}.

Knowing, rel_entr(x,y)=x.*log(x/y) and -rel_entr( x, x+y)= xlog( 1+y/x ).

How to convert my function, so that CVX accepts the function?
I have tried but couldn’t succeed. Help is highly appreciated.

I think you should be able to adapt my solution at Xlog( 1+ Y/(X+Y) ): DCP rules, and build-in functions in cvx to accommodate the constants in your function.

Yes. I also think that my equation can be transformed to the form that CVX accepts. I am still trying to transform to the suitable form. If anyone can figure out suitable transformation, please let me know. Thanks.

My linked answer provides the suitable form: it can be expressed using rel_entr. I think that should work, provided all the constants are nonnegative.

\tau_1 log\left( 1 + \frac{\mathbf {A_i} \tau_0 }{\mathbf{B_i} \tau_0 +C_i \tau_1 }\right) =\tau_1 log\left( 1 + \frac{ \tau_0 }{ \frac{\mathbf{B_i}}{\mathbf {A_i}} \tau_0 +\frac{C_i}{\mathbf {A_i}} \tau_1 }\right)
According to your solution at (Xlog( 1+ Y/(X+Y) ): DCP rules, and build-in functions in cvx) my function can be transformed as
(\tau_0+\tau_1) log\left( 1 + \frac{ \tau_0 }{ \frac{\mathbf{B_i}}{\mathbf {A_i}} \tau_0 +\frac{C_i}{\mathbf {A_i}} \tau_1 }\right) - \tau_0 \ log_2\left( 1 + \frac{ \tau_0 }{ \frac{\mathbf{B_i}}{\mathbf {A_i}} \tau_0 +\frac{C_i}{\mathbf {A_i}} \tau_1 }\right).

I noticed that the second term, - \tau_0 \ log\left( 1 + \frac{ \tau_0 }{ \frac{\mathbf{B_i}}{\mathbf {A_i}} \tau_0 +\frac{C_i}{\mathbf {A_i}} \tau_1 }\right), can be written as -\text{rel_entr}( \frac{C_i}{A_i} \tau_1 + \frac{B_i}{A_i} \tau_0, \frac{C_i}{A_i} \tau_1 + \frac{B_i}{A_i} \tau_0+ \tau_0) - \text{rel_entr}( \frac{C_i}{A_i} \tau_1 + \frac{B_i}{A_i} \tau_0+ \tau_0, \frac{C_i}{A_i} \tau_1 + \frac{B_i}{A_i} \tau_0) .

How can we change the first term? Help is highly appreciated. Thanks.

Mu solution works when A = B = c = 1. You just need to adapt it by looking at the derivation, to handle other values of A,B,c.

You will also make things easier for everyone if you show formulas as code, not images. Also, it’s easy to check your work by picking random values of the inputs and seeing if the numerical value of the reformulation matches the original.