<s>[INST] Factoring $1 - y-x^2-y^2-yx^2+y^3$ I was struggling to factorize this expression, I need it cleaned to bracket form but I was struggling to understand the process to get the answer? Is there a special formula or technique for factorizing these sorts of expressions?
$$1 - y-x^2-y^2-yx^2+y^3$$
Answer: $$ \ ( 1+y)[(1-y)^2-x^2]   $$
 [/INST] Factoring multivariable polynomials usually needs a bit of creativity. However, when looking for an approach, you can always think of multivariable polynomials as polynomials over a single variable whose coefficients are another polynomials!
With a bit of creativity: $$\begin{align}
1 - y-x^2-y^2-yx^2+y^3 &= \underbrace{(1-y-y^2 +y ^3)}_{\text{only y dependent}}-\overbrace{(x^2 +yx^2)}^\text{also x dependent}\\ \\
&= (1-y-y^2 +y ^3)-x^2(1+y). \\\\ \end{align}$$
If we plug $y = -1$, we have $(1+1-1-1)+x^2(1-1) \equiv 0.$ So we can divide this expression by $(1+y)$, and obtain the desired result or factorize even further to get
$$\begin{align}(1+y)( (y^2-2y+1) - x^2) &= (1+y)((y-1)^2-x^2)\\\\
&= \boxed{(1+y)(y-1-x)(y-1+x).}\end{align}$$
A more deep argument of why I tried this method: note that this expression is cubic over $y$. So if you can factorize this polynomial $p(x,y)$ into $q(x,y)r(x,y)$, either $q$ has degree $1$ over $y$ or $q$ has degree $2 \implies r$ has degree $1$. So there's a rational function $g(x)$ such that $p(x,g(x)) = 0$. So we need a factor of the form $k(x)y - l(x)$.
Note that you could use this last argument to deduce the same thing for $x$. So getting $x^2 = k(y)/l(y)$ is also a good guess.
</s>