If \(x^2=2x(ax+b)+r\) with \(a,b\in\mathbb{Z}\), the \(x^2\) coefficient would give \(2a=1\), impossible. The algorithm needs the leading coefficient of the divisor to be invertible, as in a field.
Given polynomials \(f\) and \(g\neq 0\) over a field \(F\), there exist a unique quotient \(q\) and a unique remainder \(r\) satisfying the equality below, with \(r\) zero or of degree less than that of \(g\).
\[f=gq+r,\qquad r=0\ \text{ or }\ \deg r<\deg g\]
More practice problems: polynomial division algorithm