<s>[INST] How to factorize the polynomial $a^6+8a^3+27$? 
I would like to factorize $a^6+8a^3+27$.

I got different answers but one of the answers is 
$$(a^2-a+3)(a^4+a^3-2a^2+3a+9)$$
Can someone tell me how to get this answer? Thanks.
 [/INST] $$a^6+8a^3+27= (a^2)^3+3^3+(-a)^3-3\cdot a^2\cdot3(-a)$$
Now $$x^3+y^3+z^3-3xyz=(x+y+z)(x^2+y^2+z^2-xy-yz-zx)$$
See :  If $a,b,c \in R$ are distinct, then $-a^3-b^3-c^3+3abc \neq 0$.
</s>