<s>[INST] Factorize : $x^6 − 10x^3 + 27$ I want to factorize $$x^6 − 10x^3 + 27$$ 
I tried two methods , first I let $y=x^3 $ and converted it into a quadratic but the solutions are not real . 
The second method I tried was getting it to the form $a^3+b^3+c^3-3abc$ but I could only get close ( $(x^2)^3+(x)^3+3^3-3(x^2)(x)(3)$ but that is actually $x^6-8 x^3+27$ , close but not exact )  
I'm run out of ideas , so any help is appreciated .
Note : I know that the answer is $$(x^2+2 x+3) (x^4-2 x^3+x^2-6 x+9)$$ , but I want to know how !
 [/INST] Here is a backdoor way to get the quadratic factor.
Start with your factorization
$x^6-10x^3+27=(x^3-5+\sqrt{-2})(x^3-5-\sqrt{-2}).$
This is a factorization over $\mathbb Z[\sqrt{-2}]$, so seek a quadratic factor with the form
$x^2+2ax+(a^2+2b^2)=(x+a+b\sqrt{-2})(x+a-b\sqrt{-2}).$
The constant term in the quadratic polynomial has to divide $27$ and be positive; moreover $b=0$ cannot work since there are clearly no linear factors over the integers. Therefore $a^2+2b^2\in\{3,27\}$, from which $a=\pm1$ or $\pm5$ and $b=1$. So our candidates are limited to
$x^2+2x+3$
$x^2-2x+3$
$x^2+10x+27$
$x^2-10x+27.$
The third candidate fails because at $x=1$ it does not give divisors of $1^6-(10×1^3)+27=18$. The second and fourth candidates similarly fail at $x=2$. But the first candidate appears to give divisors of the sixth-degree polynomial for every absolutely small integer $x$, and when we try that factor by long division we find that it holds to give the quoted answer.
</s>