Are those rings fields? Let $f(x) = x^4+x^2+1 \in Z_{2}$ and $A = Z_{2}/f(x)$


*

*Is $A$ a field?


Let $f(x) = x^4-x^2+1 \in Z_{7}$ and $B = Z_{7}/f(x)$


*

*Is $B$ a field?


I know that a ring $A = Z_{n}/f(x)$ is a field $\Leftrightarrow$ $f(x)$ has no roots in $Z_{n}$ . But this happens only for 2nd-degree and 3rd-degree polynoms
What if you have a 4th-degree polynom?
 A: The generalization to your statement is that 

$F_p[x]/(f(x))$ is a field iff $f(x)$ is irreducible over $F_p$. 

If a fourth degree polynomial is reducible and doesn't have any linear factors, then the last possibility is that it has two quadratic factors. (For degree three and less, the only possibilities are linear and quadratic factors, and if there is a quadratic factor, then there is also a linear factor.)
You can attempt a factorization by simply multiplying out the left side of $(x^2+ax+b)(x^2+cx+d)=x^4+x^2+1$ and solving the resulting system of equations. 
So for example in the first case:
$$x^4+(a+c)x^3+(ac+b+d)x^2+(ad+bc)x+bd=x^4+x^2+1$$
Then you need to solve the system $a+c=0;ac+b+d=1;ad+bc=0;bd=1$
If there is no solution, then it is irreducible. Otherwise, the polynomial is reducible and the ring is not a field.
The same process can be done for $F_7[x]/(f(x))$ in the second case.
You can see why the pattern in general: if a divisor of degree $k$ exists, then a divisor of degree $deg(f)-k$ exists. You don't have to check for factors of all possible degrees, just the first $\frac n2$ if $n$ is even, and the first $\frac {n-1} 2$ if $n$ is odd ($n=deg(f)$).

Of course it goes without saying that you should pull any shortcuts if you happen to see they are possible. One that Lubin raised in the comments is an especially good one: for a polynomial $f(x)$ over a field characteristic $p$, $(f(x))^p=f(x^p)$.
When applied here that saves considerable time in the first problem, since $x^4+x^2+1=f(x^2)$ where $f(x)=x^2+x+1$. This immediately gives the factorization $(x^2+x+1)^2$.
A: Good luck allowed this argument in answer to the second question.
In characteristic $7$, we get $(a+b)^6=a^6-a^5b+a^4b^2-a^3b^3+a^2b^4-ab^5+b^6$. In $\mathbb F_7[x]$, $(x^2+1)^6=x^{12}-x^{10}+x^8-x^6+x^4-x^2+1$, which is clearly congruent to $1$ modulo your polynomial $x^4-x^2+1$. Thus, in $B$, $x^2+1$ is a sixth root of unity. But all the six nonzero elements of $\mathbb F_7$ are sixth roots of unity, and we have just found a seventh. So $B$ is not a field.
