I'm trying to prove that the following polynomial
$x^7+3x^6+12x^5+6x^4+2x^3-4x^2+6x+2$
is irreducible in $\mathbb{Q}[x]$.
I began with using the reduction mod p (p a prime), using 5 as my prime, test to show that the polynomial is irreducible in $\mathbb{Z}_5[x]$, and hence irreducible in $\mathbb{Q}[x]$.
When I reduce mod 5, I get the following polynomial
$x^7+3x^6+2x^5+x^4+2x^3+x^2+x+2$
It is easily checked that this polynomial has no roots in $\mathbb{Z}_5[x]$. All that is left to show that our first polynomial is irreducible, is to show is that the second polynomial can't be reduced in $\mathbb{Z}_5[x]$. If it were to be reducible, then it would have to factor into one of the following:
$(x^5+ax^4+bx^3+cx^2+dx+e)(x^2+fx+g)$ $$or$$ $(x^4+ax^3+bx^2+cx+d)(x^3+ex^2+fx+g)$ $$or$$ $(x^3+ax^2+bx+c)(x^2+dx+e)(x^2+fx+g)$
Considering only the first case: I multiply the terms through, and group terms together, allowing for me to create a system between the coefficients on this polynomial and the polynomial $x^7+3x^6+2x^5+x^4+2x^3+x^2+x+2$.
I obtain the following system of equations:
$ \left\{ \begin{array}{c} f+a=3 \\ g+fa+b=2 \\ ag+bf+c=1 \\ bg+cf+d=2 \\ cg+df+e=1 \\ dg+ef=1 \\ eg=2 \\ \end{array} \right. $
however I don't see how to find a contradiction in the above system. Any help is greatly appreciated.
The following trick seems to work.
Assume contariwise that your polynomial $f(x)$ is a product of two non-constant polynomials, $f(x)=p(x)q(x)$. The usual business with Gauss Lemma tells us that without loss of generality we can assume that $p(x),q(x)\in\Bbb{Z}[x]$.
Because $2=f(0)=p(0)q(0)$ and $p(0)$ and $q(0)$ are both integers we can without loss of generality (swap the roles of $p$ and $q$ if need be) assume that $|q(0)|=1$ and $|p(0)|=2$.
Consider your polynomial modulo two. We have $$ f(x)\equiv x^7+x^6=(x+1)x^6\pmod2.\tag{1} $$ On the other hand we also have (I use overline to indicate reduction modulo two) $$ \overline{f}(x)= \overline{q}(x)\overline{p}(x) $$ We can use uniqueness of factorization in the domain $\Bbb{Z}_2[x]$ as follows. Because $q(0)$ is odd, we know that $\overline{q}(x)$ has a non-zero constant term. But, from $(1)$ we see that the only divisor of $\overline{f}$ with this property is $(x+1)$.
This, in turn, implies that the putative factor $q(x)$ must be linear (it is monic, so $\deg q=\deg \overline{q}$). But the non-existence of a linear factor of $f(x)$ is easy to confirm by checking that it has no integer roots. The short list of candidates allowed by the rational root test is $\{\pm1,\pm2\}$. I hope you checked those out already :-)