Is there a faster way to factor $X^{12}-1$ over $\mathbb{F}_5[X]$? Problem: Factor $X^{12}-1$ into irreducibles in $\mathbb{F}_5[X]$.  This problem appeared on a past qual and took me awhile to do.  While I solved it, I'll need to be able to do problems like this a lot faster to have a chance of passing.  At the very least, I was wondering whether there was a quick way to tell that $X^4-X^2+1$ is not irreducible in $\mathbb{F}_5[X]$.  
My solution: I first factored this polynomial over $\mathbb{Z}[X]$, as $$(X-1)(X+1)(X^2+X+1)(X^2+1)(X^2-X+1)(X^4-X^2+1)$$ via the formula $X^n-1 = \prod\limits_{d \mid n} \Phi_d(X)$, where $\Phi_d$ is the $d$th cyclotomic polynomial.  The first $5$ irreducibles can easily be checked to remain irreducible when going modulo $5$ (by checking if they have a root), so the hard part of the problem is checking whether the $12$th cyclotomic polynomial, $X^4-X^2+1$, remains irreducible in $\mathbb{F}_5[X]$.  
It's easy to see that $\Phi_{12}$ has no roots in $\mathbb{F}_5$, so it would have to be a product of two quadratics.  I supposed it did factor, as $$X^4-X^2+1 = (X^2 + aX+b)(X^2+cX+d)$$ I expanded the right hand side as $X^4 + (a+c)X^3 + (b+ac+d)X^2 + (bc+ad)X + bd$, so I had the relations
(i): $a+c = 0$ 
(ii) $b+ac+d =-1$
(iii) $bc+ad=0$
(iv) $bd = 1$.  
I began by considering the case where $a \neq 0$ (I had already checked that $\Phi_{12}$ couldn't factor as a product $(X^2 +e)(X^2+f)$), so that also $c \neq 0$.  I multiplied (iii) by $d$ to get $c+ad^2 = 0$, and subtracted (i) from this to get $ad^2-a = 0$, or $d^2 = 1$.  
So $d = \pm 1$.  First I supposed $d = 1$, so that also $b=1$.  Then $a, c$ were nonzero elements satisfying $a+c = 0$ and $ac + 2 = -1$, or $ac = 2$. For $ac = 2$ we can only have $\{a,c\} = \{3,4\}$ or $\{a,c\} = \{1,2\}$, and in neither of those cases could we have $a+c = 0$.
Next I supposed $d = -1$, so that also $b = -1$.  Then $a, c$ were nonzero elements satisfying $ac=1$ and $a+c = 0$.  This relation is satisfied by $a = 2, b = 3$.  So I looked at the product $$(X^2+2x-1)(X^2+3X-1)$$ which expands as $X^4+5X^3+4X^2-5X+1$, which is $X^4-X^2+1$ in $\mathbb{F}_5[X]$.  

Rewrite $\,\,X^4 -X^2+1$ as 
$$
(X^2-1)^2+X^2=(X^2-1)^2-4X^2=(X^2-2X-1)(X^2+2X-1).$$
