Factoring a quartic mod p Let $h(x)=x^4+12x^3+14x^2-12x+1$, and let $p>5$ be a prime.
I want to show $h(x)$ factors into 2 quadratics $\mod p$, if $p \equiv 9,11 \mod 20$, while
$h(x)$ factors mod $p$ into 4 linear factors, if $p \equiv 1,19 \mod 20$. 
I can show $h(x)$ is irreducible if $p \equiv 3,7 \mod 10$.
 A: For starters consider the following candidate factorization:
$$
(x^2+ax-1)(x^2+bx-1)=x^4+(a+b)x^3+(ab-2)x^2-(a+b)x+1.
$$
This works if $a+b\equiv 12$ and $ab\equiv 16$. The discriminant of the quadratic
$$
(T-a)(T-b)=T^2-(a+b)T+ab=T^2-12T+16
$$
is equal to $20$. So if $20$ is a quadratic residue modulo $p$, then we have a factorization
of this kind. As $20=2^2\cdot5$ we are really interested in, whether $5$ is a quadratic residue modulo $p$ or not. By quadratic reciprocity this happens, iff $p$ is a quadratic residue modulo $5$. So we get that a factorization of this kind exists, iff $p\equiv\pm1\pmod5.$ Of course, this is equivalent to $p$ being congruent to either $1,9,11$ or $19$ modulo $20$.
I don't know, if it is easy or difficult to extend this elementary argument and detect, whether these quadratic factors will split further. Also, this argument obviously doesn't rule out the possibility of other quadratic factors, but you seemed to have the cases $p\equiv\pm2\pmod 5$ covered already.
A: pari tells us that $h$ generates the same splitting field as $g(x) = x^4 - x^3 - 4x^2 + 4x + 1$, which has discriminant $1125 = 3^2 5^3$. Its Galois group is cyclic, hence the field must
be a subfield of the 15th roots of unity by Kronecker-Weber. The cyclotomic decomposition law tells us that


*

*$p$ splits completely if and only if $p \equiv \pm 1 \bmod 15$,

*$p$ splits into two prime factors if and only if $p \equiv \pm 4 \bmod 15$,

*$p$ is inert if and only if  $p \equiv \pm 2, \pm 7 \bmod 15$.
By a classical theorem of Kummer, this reflects the splitting of the polynomial modulo $p$ except for divisors of the dirscriminant of $h$.
You can show that the splitting field of $h$ is cyclotomic without pari and Kronecker-Weber by solving the quartic with radicals, but this requires some efforts.
