Let $K=\mathbb{Z}_2[x]/\langle x^4+x^2+x \rangle$ Find a $g\in K$ such that $g^2=x^3+x+1$ Let $K=\mathbb{Z}_2[x]/\langle x^4+x^2+x \rangle$. Find a $g\in K$ such that $g^2=x^3+x+1.$
I tried $x^3+x+1$ itself but unfortunately the degree is only $2$. I don't know how I can multiply something and get a polynomial of degree $3$.

$K$ has $2^4$ elements:
$$ax^3+bx^2+cx+d, \ (a,b,c,d) \in {\mathbb{Z}_2}^4$$
We have $$g(0)^2=g(1)^2=1$$
So the only possible candidates for $g$ are
$$1\\
x^3+x^2+1\\
x^3+x+1\\
x^2+x+1
$$
First we calculate
$$x^4\equiv x^2+x$$
$$x^6\equiv (x^4+x^2+x)x^2 +x^4+x^3\equiv x^3+x^2+x$$
We can skip the constant polynomial $1$ immediately.  We use $$(a+b)^2=a^2+b^2 \bmod(2)$$
to check the remaining 3 candidates.
$$(x^3+x^2+1)^2=x^6+x^4+1=(x^3+x^2+x)+(x^2+x)+1=x^3+1$$
$$(x^3+x+1)^2=x^6+x^2+1=(x^3+x^2+x)+x^2+1=x^3+x+1$$
$$(x^2+x+1)^2=x^4+x^2+1=(x^2+x)+x^2+1=x+1$$
