How to write an optimization problem in cvx