factor of a polynomial using factor theorem