Let g(x)=3x+2 and $f(x)=x^3+2x+4$ in $F=\mathbb Z_5[x]$.Determine the quotient and the remainder upon dividing $f(x)$ by $g(x)$.
Division Algorithm says that, for any field $F$ and for $f(x),g(x)(\neq 0)\in F[x]$$~\exists$ unique $q(x),r(x)\in F[x]$ such that $f(x)=g(x)q(x)+r(x)$ where $\deg r(x)<\deg g(x)$ or $r(x)=0.$
On simple division of $f(x)$ by $g(x)$,I got $q(x)=\frac{x^2}{3}-\frac{2}{9}x+\frac{22}{27}$ and $r(x)=\frac{64}{27}$.But neither $q(x)\in \mathbb Z_5[x]$ nor $r(x)=\frac{64}{27}\in \mathbb Z_5[x]$
Please tell me where i'm wrong?
Hint
What is $1/3$ in $\mathbb Z_5$? It is the multiplicative inverse of $3$, which is $2$ as in $\mathbb Z_5$, $2\cdot 3= 5+1=1$.
Do the same for $1/9$. In $\mathbb Z_5$, $9=2\cdot 5-1=-1$. And as $-1 \cdot (-1)=1$ you have $1/9= -1=4$.
You can follow on like that to find all the inverses involved in your polynomial division to find the result.