How to fix "Invalid quadratic form(s): not a square." error in cvx

cvx_begin
    variables x(3)
    minimize (x(1)^2 + 2*x(1)*x(2) + 2*x(2)^2 + x(3)^2 + 3*x(1) - 4*x(2));
    subject to
        sqrt(2*x(1)^2 + x(1)*x(2) + 4*x(2)^2 + 4) + (x(1)-x(2)+x(3)+1)^2/(x(1)+x(2)) <= 6;
        x >= 1; 
cvx_end

I am trying to solve this problem. It should be convex. However, after I ran my cvx code, it states “Disciplined convex programming error: Invalid quadratic form(s): not a square.”
Could anyone help me have a look? Any help appreciated!

You need to use a matrix quadratic form.

M = [1 1 0;1 2 0;0 0 1]; % M is symmetric PSD

minimize(x'*M*x + 3*x(1) - 4*x(2))
or equivalently
minimize(quadform(x,M) + 3*x(1) - 4*x(2))

For the sqrt constraint, square both sides, i.e., remove sqrt and change RHS to 36. Then use quad_over_lin. I will leave the details to you as a homework assignment to get the numerator in the needed from, and indeed to verify whether it can be done.