<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] Note $x^2$ is the only $x$-term,
$$1 - y-x^2-y^2-yx^2+y^3$$
$$=1-y-y^2+y^3 -(1+y)x^2$$
$$=(1-y) -y^2(1-y) -(1+y)x^2$$
$$=(1-y)(1-y^2)-(1+y)x^2 =(1+y)(1-y)^2-(1+y)x^2 $$
$$= ( 1+y)[(1-y)^2-x^2]   $$
</s>