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.

By the rational root theorem, we guess the factors include at least one of the following:
$$x \pm 27$$
$$x \pm 9$$
$$x \pm 3$$
$$x \pm 1$$
Where did I get those?


*

*Take the absolute value of the last term (in descending order), $27$, and the absolute value of the last term, $1$.

*Take the factors of each:
$$27: \color{red}{1,3,9,27}$$
$$1: \color{green}{1}$$


*Consider $x-a$ where $a$ may be any of the ff:


$$\pm \frac{\color{red}{27}}{\color{green}{1}}$$
$$\pm \frac{\color{red}{9}}{\color{green}{1}}$$
$$\pm \frac{\color{red}{3}}{\color{green}{1}}$$
$$\pm \frac{\color{red}{1}}{\color{green}{1}}$$
