<s>[INST] Prove that $f=x^6+ax+5$ is reducible over $\mathbb{Z_7},\forall a\in\mathbb{Z_7}$ We have $f=x^6+ax+5\in\mathbb{Z_7}$ and we have to show that it is reducible on $\mathbb{Z_7}$, $\forall a\in\mathbb{Z_7}$. Here are all my steps:

For $a=0$ we'll get $f=x^6+5\in\mathbb{Z_7}$. But $\forall x\in\mathbb{Z_7}$ with $x\neq0\Rightarrow x^6=1$. Therefore $f\neq0$ and it means that $f$ doesn't have linear factors. How  can  we continue from here?
For $a\neq0$ and $x\neq0$ we'll get $f=ax+6$, $\forall x\in\mathbb{Z_7}$. Here the only solution for which $f$ is reducible over $\mathbb{Z_7}$ is for $x=a^{-1}$. But if $x\neq a^{-1}$ then $ f$ is not reducible over $\mathbb{Z_7}$.


How can I show that $f$ is reducible over $\mathbb{Z_7},\forall a\in\mathbb{Z_7}$ ? Where am I wrong?

 [/INST] Note that $f(a^{-1})=0$ as you noted before when $a$ is not $0$. Then we know that $(x-a^{-1})$ is a factor. We can do a "complete the sextic" approach on the function as follows:
$f(x) = (x-a^{-1})(x^5) = x^6-a^{-1}x^5$
$f(x) = (x-a^{-1})(x^5+a^{-1}x^4) = x^6 + a^{-2}x^4$
Verify that $f(x) = (x-a^{-1})(x^5+a^{-1}x^4+a^{-2}x^3+a^{-3}x^2 + a^{-4}x + 2a) = x^6-a^{-5}x + 2ax - 2= x^6-ax + 2ax +5 = x^6+ax+5$
The last $2a$ came from the observation that $a^{-1}$ was a root of both $x^6-ax$ and $x^6+ax+5$, meaning that the two functions were some multiple of $(x-a^{-1})$ from each other.
Also, when $a=0$, we need to factorize $f(x) = x^6+5 = x^6-9 = (x^3+3)(x^3-3)$.
</s>