Find all the irreducible polynomials $p(x),~q(x)$ of $\mathbb{Z}_2[x]$ such that
$$(x^3+1)p(x)+xq(x)=p(x)q(x).$$
Attempt. If we work with degrees, if $degp(x)=n$ and $degq(x)=m$, then $\max\{3+n,1+m\}=nm$ so $n(m-1)\geq 3$ and $m(n-1)\geq 1$ and we get $n\geq 2$ and $m\geq 3$. But there seem to be a lot of choices, though. How can one proceed?
Thank you in advance.
In stead of $\max\{3+n,1+m\}=nm$ you should have $\max\{3+n,1+m\}=n+m$, as $\deg p(x)q(x)=n+m$, so either $n=1$ or $m=3$. This does not leave many cases. Do beware that if $m=n+2$ then the leading terms cancel, so that the degree is not $\max\{3+n,1+m\}$.
Alternatively, because $p(x)$ and $q(x)$ are irreducible, rewriting the equality as $$(x^3+1+q(x))p(x)=xq(x),$$ by unique factorization either $p(x)=q(x)$ or $p(x)=x$, from which the solutions are easily found.