Every polynomial with real coefficients can be written as a product of linear or quadratic terms, each having real coefficients.
Proof: We know that a polynomial of degree \(n\) has \(n\) roots. If any of these roots is complex, so is its complex conjugate. Rewrite the polynomial as:
\begin{equation*}
f(x)=a\left(x-c_{1}\right)\left(x-c_{2}\right) \cdots\left(x-c_{n}\right)
\end{equation*}
And combine terms where the complex roots are conjugates of each other.
Now if a polynomial has integer coefficients, we can search for rational roots. If one exists and is of the form \(c/d\), then \(c\) is a factor of \(a_{0}\) and \(d\) is a factor of \(a_{n}\).
Using this, you can easily enumerate all possible rational roots.