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) $$

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.$
