Can CVX solve first order derivatives for extreme values?

I don’t see where r_{D,I} appears ion the expression. I also don’t know what is input data vs. optimization variables.

Nevertheless, it is your responsibility to prove that it is it convex (if you are minimizing).