How to obtain this factorization of $x^4+4$? $x^4 + 4 = (x^2 + 2x +2)(x^2 - 2x +2)$
I am curious how would one obtain this factorization?
Clearly, once the factorization is known it is routine to verify it, however the hard part is how to find the factorization in the first place?
Thanks!

I observed that $(A+B)(A-B)=A^2-B^2$ can be applicable here with $A=x^2+2$, $B=2x$.
Is there any other trick?

You can try as follows (based on the $(a+b)^2=a^2+2ab+b^2)$):
\begin{align*}
x^4+4&=(x^2)^2+2^2\\
&=\big(x^2+2\big)^2-4x^2\\
&=\big(x^2+2\big)^2-(2x)^2\\
&=(x^2+2+2x)(x^2+2-2x)\\
&=(x^2+2x+2)(x^2-2x+2).
\end{align*}
