How to find the roots of a polynomials by factoring