Start from the given:
x^9-x^6-x^3+1x9−x6−x3+1
by grouping method
first two terms, factor x^6x6 and last two terms, factor the -1−1
that is
x^6(x^3-1)-1(x^3-1)x6(x3−1)−1(x3−1)
factor out the common binomial factor (x^3-1)(x3−1) so that
(x^3-1)(x^6-1)(x3−1)(x6−1)
at this point, use " sum or difference of two cubes" forms
and difference of two squares
a^3-b^3=(a-b)(a^2+ab+b^2)a3−b3=(a−b)(a2+ab+b2)
a^3+b^3=(a+b)(a^2-ab+b^2)a3+b3=(a+b)(a2−ab+b2)
a^2-b^2=(a-b)(a+b)a2−b2=(a−b)(a+b)
so that
(x-1)(x^2+x+1)(x^3-1)(x^3+1)(x−1)(x2+x+1)(x3−1)(x3+1)
(x-1)(x^2+x+1)(x-1)(x^2+x+1)(x+1)(x^2-x+1)(x−1)(x2+x+1)(x−1)(x2+x+1)(x+1)(x2−x+1)
(x-1)^2(x^2+x+1)^2(x+1)(x^2-x+1)(x−1)2(x2+x+1)2(x+1)(x2−x+1)
have a nice day ! from the Philippines...