Having two or more variable in one objective functian

Hello
I have general and prevalent question ,
It is possible to have two or more different variables in one objective function and by can solve it CVX programming ? I search a lot about it but I couldn’t find any useful example.
please give me simple example.
Thank you so much.
(please don’t tell me study document, because I study It completely! Thank you.)

Yes. This may not be “useful”, but it is an example.

cvx_begin
variables x y
minimize(x+2*y^2)
-5 <= x
y >= 2
cvx_end
1 Like