Investigate if the following polynomial in $\mathbb Q[x]$ is reducible or irreducible: $x^3-5x^2+2x+1$.
Attempt:
$x^3-5x^2+2x+1\bmod 2$ we get $x^3+x^2+1$.
We see that the polynomial is of degree 3, so it is reducible if it has a root in $\mathbb Q$, using rational root theorem in $\mathbb Q$, we see there is no root in $\mathbb Q$, so it's irreducible?
As you have already calculated, the polynomial $\bmod 2$ is of the form $x^3+x^2+1$.
If this was reducible in $\mathbb{Q}$, it would also be reducible $\bmod 2$. As you have already noted if it is reducible, it must have a root in $\mathbb{Q}$. But more importantly, if it is reducible, it must also have a root $\bmod 2$. This is because the polynomial is of degree $3$.
So $\bmod 2$ we only have to try two values: $1$ and $0$. Both are no root, thus it is irreducible $\bmod 2$. Then from it follows that it's also irreducible in $\mathbb{Q}$.