Checking irreducibility by considering field extension I asked this question here yesterday and it was pointed out in the comments that if $f(x)=x^4+x+4$ were reducible, i.e. $f(x)=g(x)h(x)$ for some degree $2$ polynomials in $\mathbb{F}_5[x]$, then as $g$ has degree $2$, it has a root in degree $2$ extension of $\mathbb{F}_5$. Since degree $2$ extension of $\mathbb{F}_5$ are isomorphic to $ \mathbb{F}_{25}$, this gives us that $g$ and in turn $f$ has a root in $\mathbb{F}_{25}$.
Now how do we check if $f$ has any root in $\mathbb{F}_{25}$? $\mathbb{F}_{25}$ is only defined up to isomorphism. I suppose I could take it to be $K=\frac{\mathbb{F}_{5}[x]}{(x^2+x+1)}$, and explicitly write down the elements and compute $f(z)=z^4+z+4$ for every $z \in K$ using the relation $x^2+x+1=0$.
Is this the way to go forward or is there any way to avoid doing $24$ different computations?
 A: I'm assuming you're talking about $x^4+x+4$ as in the linked question, and not $x^4+x+1$, which has the root $x=3$ in $\mathbb F_5$.
One way is to evaluate $\gcd(x^4+x+4,x^{5^2}-x)$. This can be done by first evaluating $x^{25}$ modulo $x^4+x+4$ using exponentiation by squaring, which is annoying but probably doable by hand. Then, you should have that
$$\gcd(x^4+x+4,x^{5^2}-x)=\gcd(x^4+x+4,f(x))$$
for some $f\in\mathbb F_5[x]$ of degree at most $3$, from which the standard polynomial $\gcd$ algorithm will allow you to compute the $\gcd$ quickly.
If $x^4+x+4$ is the square of a quadratic, then this $\gcd$ will be that quadratic. If it's the product of two distinct quadratics, the $\gcd$ will be $x^4+x+4$ itself. If it's irreducible, the $\gcd$ will be $1$.
Note: This and its variants are actually used in practice to factor and find roots of polynomials over finite fields.
A: It is easy: $ $ assuming $f\,$ has an irred. quadratic factor $g\,$ in $\,\Bbb F_5[x]\,$ yields a $\rm\color{#90f}{contradiction}$ as below.
In $\,\Bbb F_5[x]/g\cong \Bbb F_{25}\!:\ \color{#c00}{x^4\! = 1\!-\!x},\,$ so $\,0\overset{\small \rm \color{darkorange}{LT_{\phantom{|_.}}}\!\!}= (\color{#c00}{x^4})^6\!-\!1\! = (\color{#c00}{1\!-\!x})^6\!-\!1 = x(\color{#0a0}{x^5\!-\!x^4\!+\!4}),\,$ so $\,x\neq 0\,$ $\Rightarrow \color{#0a0}{4}= \color{#c00}{\color{#0a0}x^4}(\color{#0a0}{1\!-\!x}) = \color{#c00}{(1\!-\!x)^2}$ $\overset{\rm sqrt}\Longrightarrow\color{#0a0}{\pm2} = \color{#c00}{1\!-\!x},\,$ so $\, g\mid\color{#c00}{x\!-\!1}\!\color{#0a0}{\mp2}\,$ in $\Bbb F_5[x],\,$ $\rm\color{#90f}{contra}$ $\,\deg g = 2.$
Remark $ $ We used $\,0\neq f\in \Bbb F_{25}\Rightarrow f^{\large \color{#c00}{24}}\! = 1\,$ (for $f =x),\,$ an analogue of Fermat's little Theorem, which is true because $\,\Bbb  F_{24}$ has multiplicative group $\,\Bbb F_{24}^*$ of size $\,25-\color{#0a0}1 = \color{#c00}{24}\,$ (all $\rm\color{#0a0}{nonzero}$ elements are invertible in a field), so $\small \rm \color{darkorange}{LT} =$ Lagrange's Theorem $\Rightarrow f^{\large\color{#c00}{24}}\! = 1\,$ for all $\,f\neq 0.$
Though the above took only a couple of minutes of mental arithmetic, it is slightly ad hoc. More algorithmically, over finite fields there is a polynomial irreducibility test that is an an analog of the impractical Pocklington-Lehmer integer primality test. It is very efficient - using only polynomial gcd calculations - see this answer. That algorithm generalizes the idea hinted at in Carl's answer.
