Well, let's call it educated trial and error! To determine whether or not a polynomial has a factor with integer coefficients we can use the "rational root theore": If satisfies the polynomial equation then the numerator, p, evenly divides the "constant term", , and the denominator, m, evenly divides the "leading coefficient", . That allows you to reduce to a finite number of trials. However, Most polynomials do NOT factor with integer or rational number coefficients. There is no good "trial and error" method to find non-rational factors or non-rational roots except to use "completing the square" for quadratics and the general formulas for quadratic, cubic, and quartic polynomials. There are no formulas for higher degree equations in terms or radicals because some higher degree equations have roots that cannot be written in terms of radicals.