<s>[INST] Factorization of $z^4 +1 = (z^2 - \sqrt 2z+1)(z^2 + \sqrt 2 z+1)$ for complex $z$ How can I get this equation from LHS to RHS by using the four roots of $z^4 +1 = 0$ are $z=\pm\sqrt{\pm i}$
 $$z^4 +1 = (z^2 - \sqrt2 z+1)(z^2 + \sqrt2 z+1)$$
 [/INST] If the roots are known then $x^4+1=(x+\sqrt i)(x-\sqrt i)(x+\sqrt{-i})(x-\sqrt{-i})$. Now difference of two squares will mean that $(x+\sqrt i)(x-\sqrt i)=x^2-i$ therefore multiplying with the other possible choices is a better idea. $(x+\sqrt i)(x+\sqrt{-i})$ gives $x^2+\sqrt{2}x+1$ therefore pairing the roots that way gives your form.
</s>