<s>[INST] Irreducible Polynomial over $\mathbb{Q}$ I'm trying to see if the following polynomials are irreducible over $\mathbb Q$:
$f(x) = x^4 - x^2 + 2x -1$
$g(x) = x^3 + 7x^2 -8x +1$
$h(x) = x^4 + x^3 + x^2 + x + 1.$
Now, for $h(x)$, I can write $(x+1)$ for $x$ and get :
$x^4 + 5x^3 + 10x^2 + 10x +5$, for which I can set $P=5$ and by Eisenstein, this is irreducible over $\mathbb Z$, therefore irreducible over $\mathbb Q$.
For $g(x)$, since it is cubic and primitive, there is either a root or it is irreducible.  I get to the stage $g(x)=(x-a)(x^2 + bx +c)$ but then cannot equate the coefficients.
Similar situation for $f(x)$, I get to the stage $f(x)=(x^2 + ax +b)(x^2 +cx + d)$ but get stuck when trying to figure out the coefficients.  Am I doing something wrong here?
I would really appreciate it if someone could explain this to me please, since I am wondering if I am overlooking a silly mistake.  Thanks.
 [/INST] If $f(x)=(x^2+ax+b)(x^2+cx+d)=x^4+(a+c)x^3+(ac+b+d)x^2+(ad+bc)x+bd$, then we have
$a+c=0$, $ac+b+d=-1$, $ad+bc=2$ and $bd=-1$. By Gauss's theorem of primitive polynomial, we have $a,b,c,d$ must all be integers, hence $c=-a$, and $d=1$, $b=-1$ or $d=-1$, $b=1$. We may assume $b=1$, $d=-1$ by symmetry of these two factors, then $-a^2=-1$, $-2a=2$ hence $a=-1$, $c=1$, so we have $f(x)=(x^2-x+1)(x^2+x-1)=x^4-(x-1)^2=x^4-x^2+2x-1$. Hence $f$ is reducible in $\mathbb{Q}[t]$.
</s>