Specify objective as: minimize scalar convex expression maximize scalar concave expression and constraints: convex expr <= concave expr concave expr >= convex expr affine expr = affine expr curvatures of all expressions are DCP certified. We do this because then you can just subtract the expressions and you’ll have a good time. you certify DCP based on general composition rule that preserve convexity DCP is sufficient, not necessary Consider:
\begin{equation} f\left(x\right) = \sqrt{1+x^{2}} \end{equation}
f1 = cp.sqrt(1 + cp.square(x)) is not DCP (because we put convex into concave) f1 = cp.norm2([1,x]) is DCP. These are identical.