Travis L. answered 01/31/23
Mid-Career Professional Nerd
For a polynomial of the standard form anxn + an− 1xn − 1 + … + a1x1 + a0 = 0 (where a0, a1,…, an are integers) to have a rational solution p/q, q must divide an and p must divide a0. That's the theory, let's look at your example:
an=4 and a0=-18
What integers divide 4? I propose 1, 2, and 4 or -1, -2, and -4
And how about 18? 1, 2, 3, 6, 9, 18. And their negative values as well.
p can potentially be 1, 2, 3, 6, 9, 18, -1, -2, -3, -6, -9 and -18
q can potentially be 1, 2, 4, -1, -2, and -4
All the possible p/q's are: 1, 2, 3, 6, 9, 18, 1/2, 3/2, 9/2, 1/4, 3/4, 9/4, 18/4 and their negatives.