Factor $z^4 +1$ into linear factors $z$ is a complex number, how do I factor $z^4 +1$ into linear factors?
Do I write z in terms of $x+yi$ so that $z^4+1=(x+yi)^4+1?$
 A: If $z^4+1=0$ then $z^4=-1$ so $z^2=\pm i$.  If $z^2=i=\cos90^\circ+i\sin90^\circ$ then $z=\pm(\cos45^\circ+i\sin45^\circ) = \pm\left(\frac1{\sqrt2} + i\frac 1 {\sqrt2}\right)$, and similarly for $-i=\cos(-90^\circ)+i\sin(-90^\circ)$.
So
$$
z^4+1 = \left(z-\frac{1+i}{\sqrt2}\right)\left(z-\frac{-1-i}{\sqrt2}\right)\left(z-\frac{1-i}{\sqrt2}\right)\left(z-\frac{-1+i}{\sqrt2}\right).
$$
Let us note parenthetically that if we group conjugates together, thus
$$
z^4+1 = \underbrace{\left(z-\frac{1+i}{\sqrt2}\right)\left(z-\frac{1-i}{\sqrt2}\right)}_\text{conjugates}\quad  \underbrace{\left(z-\frac{-1+i}{\sqrt2}\right)\left(z-\frac{-1-i}{\sqrt2}\right)}_\text{conjugates}
$$
then when conjugates get multiplied, the imaginary parts cancel, so in this case we get:
$$
z^4+1 = \big(z^2 - z\sqrt2 + 1\big)\big(z^2+z\sqrt2+1\big).
$$
A: It is easier in this case to write $z=re^{i\theta}$ so that $r^4e^{4i\theta}=-1$. It follows by taking the modulus that $r=1$. This is very often the best way to deal with roots and powers of complex numbers.
Easier still is to use the difference of two squares with $-1=i^2$ so that $x^4-i^2=0$ and $(x^2+i)(x^2-i)=0$. You can do the same trick with the factors if you identify the square roots of $\pm i$, or use the quadratic formula to identify the roots.
You may also know that there will be a factorisation into quadratic real factors, and you can try by hand $$x^4+1=(x^2+ax+b)(x^2+cx+d)$$
Equating the coefficients of $x^3$ gives immediately that $c=-a$. We have $bd=1$ from the constant term, $a(d-b)=0$ and $(b+d-ac)=0$ from the quadratic. If $a=0$ we rapidly reach a contradiction, and it follows that $b=d=1, a=\pm \sqrt 2$ whence $$x^4+1=(x^2+x\sqrt 2+1)(x^2-x\sqrt 2+1)$$ and this can be finished using the quadratic formula too.
A: $$z^4+1=(z^2+i)(z^2-i)=(z^2+e^{i\pi})(z^2-e^{i\pi})=(z-ie^{i\frac{\pi}{2}})(z+ie^{i\frac{\pi}{2}})(z-e^{i\frac{\pi}{2}})(z+e^{i\frac{\pi}{2}})$$
Now, that was easy since the exponent of z was a power of 2. Generally for $z^n+1$ where n is a positive integer, what you need to do is:
$$z^n+1=0 \implies z^n=-1=e^{i\pi}$$
$$z=(e^{i\pi})^{1/n}=e^{i(\pi+2\pi m)/n}$$
Where $m$ is an integer between $0$ and $n-1$. Now you can write:
$$z^n+1=\prod_{m=0}^{n-1}(z-e^{i(\pi+2\pi m)/n})$$
