I have a polynomial $m(x)= x^2 + x + 2$ that's irreducible over $F=\mathbb{Z}/3\mathbb{Z}$. I need to calculate the multiplicative inverse of the polynomial $2x+1$ in $F/(m(x))$.
I'd normally use division with two polynomials like this, but it doesn't work here. So how can I get the inverse?
You can just let the unknown inverse be $ax+b$ and then multiply $(ax+b)(2x+1)=2ax^2+(a+2b)x+b.$ Equate this to $1$ in $Z_3[x]/(m)$ which means using $x^2=-x-2$ that the term $2ax^2$ becomes $2a(-x-2)=-2ax-4,$ which is then added to $(a+2b)x+b.$ Try from there.
I'm pretty sure this method should work, though in a comment, the user Unit already gave the result.