Hi, I am factoring somewhat complex polynomials. For example this one:

$\displaystyle

a^3+b^3+c^3-3abc =

$

$\displaystyle

= a^3+b^3+c^3-3abc-3a^2b+3^2b-3ab^2+3ab^2

= (a+b+b)(a^2+b^2+c^2-ab-ac-bc )

$

I only know to solve this kind of problems by guessing ( try to expand polynomial ). Is there a way to solve it by applying some algorithm?

Also link to some material that explains this topic would be great.