trial and error doesn't make sense when you are talking on infinitely many numbers to try on.. i mean, it is a waste of time.. try decreasing the number of numbers you are going to try,,
the rational root test tells you that if you have a polynomial of degree whose leading coefficient is and whose constant term is , then the possible roots of the polynomial is given by where is a factor of and is a factor of
in your example, and
so can be equal to
and can be equal to
from here, you may start your trial and error by choosing any combination of
after getting one, you may do previous poster's suggestion by taking out and factoring the quadratic factor..