In a test I was asked to prove that $q(x)=x^4+x^3+x^2+x+1$ has no roots over the field $\mathbb{Z}_3[x]/(x^3-x+1)$. But, over our field $x^3=x-1$, so $q(x)=x(x-1)+x-1+x^2+x+1=2x^2+x$ which clearly have roots.
Am I missing something? Or is the problem wrong?
Using the same notation, $x$, for both as the variable of the polynomial and the field leads to the mistake. The question is the following:
Note that with this notation, you have $f(x) = 2x^2+x$ (by your calculation) which is not zero.
The proof goes like this: Since $f(T)$ divides $T^5-1$, every root of the polynomial $f$ is a root of $T^5-1$, i.e., every root of $f$ has order $5$ in the group $\mathbb{F}^\times$. On the other hand, $\mathbb{F}$ is a field with $27$ elements, and, thus; $\mathbb{F}^{\times}$ is a cyclic group of $26$ elements. Since $5$ does not divide $26$, the cyclic group does not contain an element of order $5$.