% display number of symbolic monomial terms
length(getvariables(x))
x = x*x;
end
after running this, make a guesstimate on the number of symbolic terms in involved in the last expression if you increase n to 6, or 100...
BTW, x is symmetric in case you didn't know
users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Tutorials.Basics
Apart from being impossible to describe as you try to do symbolically, it is a horrible nonconvex nonlinear constraint. A better (still nonconvex) model would be to write x as U'*D*U where U'*U=I and D i diagonal, as x^(2n) then at least simplifies to U'*D.^(2*N)*U. Still nasty though