I'm dividing $2x^3 + x^2 - 3x + 1$ in $F_5$ with x-3, with long division. I'm not sure if I should be taking modulus at every step?
For example, first I multiply (x-3) with $2x^2$, yield $2x^3-6x^2$. Subtracting this with $2x^3 + x^2 - 3x + 1$, I get $7x^2 - 3x +1$. Should I mod the 7 with 5, or mod the remainder?
EDIT:
Taking the modulus at each step yielded $2x^2+2x+3$, with a remainder of 10 (which is basically 0). Is this correct?
Yes, that is correct. Taking modulus at every step vs in the end, both work as well in this case, as 5 is a prime. Otherwise, division is not well behaved in general in modular arithmetic.