Disciplined convex programming error: Cannot maximize a(n) convex expression

The objective is convex quadratic. Minimizing it would be convex, but maximizing it is not convex.

Perhaps you should bone up on convex optimization. Convex Optimization – Boyd and Vandenberghe .