How to factorize $x^4+2x^2+4$ to a product of polynomials with real coefficients? How do you factor 
$$x^4+2x^2+4 $$ 
so it can be written as
$$ (x^2+2x+2)(x^2-2x+2) $$
 A: I'm thinking you have a slight mistake in there.  In any case, you can rewrite this as
$$(x^4+4x^2+4)-2x^2=(x^2+2)^2-(x\sqrt2)^2$$
from which point it can be treated as the difference of $2$ squares to obtain 
$$(x^2+x\sqrt2+2)(x^2-x\sqrt2+2)$$
A: The key idea is to complete $\,x^4\!+4\,$ to a square $\,(x^2\!+2)^2-4x^2,\,$ yielding a difference of squares
$$ x^4\!+4\, =\, (x^2\!+2)^2 - (\color{#c00}{2x})^2 =\, (x^2\!+2-\color{#c00}{2x})(x^2\!+2 + \color{#c00}{2 x})$$
The same idea works for $\,x^4+4 + 2x^2\,$ if you meant that instead of $\,x^4+4.$
A: Certainly the solution using completing the square (already provided in two answers) is in this case the easiest one.
I will just point out that in general if you have a real polynomial which is simple enough so that we are able to find all complex roots, this might also help you find factorization over $\mathbb R$. This works because for every root $z=a+bi$ also the complex conjugate $\overline z=a-bi$ is a root. And these pairs give you quadratic factors
$$(x-z)(x-\overline z)=(x-a-bi)(x-a+bi)=x^2-2a+b^2+b^2.$$
See also: Complex conjugate root theorem

In this case you can use substitution $t=x^2$ to get a quadratic equation 
$$t^2+2t+4=0$$
which has the solutions $t_{1,2}=\frac{-2\pm\sqrt{12}i}2=-1\pm\sqrt3i = 2\left(-\frac12\pm\frac{\sqrt3}2i\right)$.
Now you can solve the equations
$$x^2=-1\pm\sqrt3i$$
which have the solutions
\begin{align*}
x_1&=\sqrt2\left(\frac12+\frac{\sqrt3}2i\right)\\
x_2&=\sqrt2\left(-\frac12\pm\frac{\sqrt3}2i\right)\\
x_3&=\overline{x_1}\\
x_4&=\overline{x_2}
\end{align*}
This will give you the following quadratic factors:
\begin{align*}
(x-x_1)(x-\overline{x_1}) = x^2-\sqrt2x+2\\
(x-x_2)(x-\overline{x_2}) = x^2+\sqrt2x+2
\end{align*}
