Can anyone help me on this constraint? Many thanks!

C2 is convex for x <= 2 and concave for x >= 2. <Edit: see my post below. This is backwards because I copied down C2 incorrectly>

I presume there is a typo in C2: 1 < x < 1, so I don’t know what you really want C1 to be. Even if the upper bound on x in C1 is supposed to be <= 2, because C2 is not convex over its entire natural domain, I don’t think there is hope of expressing it in CVX even if constrained to be in its convex region.

Please read the FAQ Why isn’t CVX accepting my model? READ THIS FIRST! . It is incumbent on you to formulate a convex problem if you wish to use CVX. We can’t tell you how or whether to change or relax a constraint to be convex - you’re the one with the problem, so you need to figure out what you want to or are willing to solve.