For convex function: Disciplined convex programming error: Cannot perform the operation: {real affine} .* {convex}

The objective can be reformulated as:

-rel_entr(t,t+d) + pow_p(T,-2)

So unless you are missing a minus sign, the first term is concave and the 2nd term is convex. Therefore it is neither convex nor concave, and can’t be formulated for CVX. If you are missing a minus sign in the first term, here you go.

EDIT; This answer is wrong because I misread the problem. See my post below.