Euclidean quotient and euclidean remainder

### 11.8.7 Euclidean quotient and euclidean remainder

The quorem command finds the quotient and remainder of the Euclidean division of two polynomials (see also Section 7.1.10 and Section 11.2.4).

- quorem takes two mandatory arguments and one optional argument:
  - P and Q, two polynomials with coefficients in ℤ/pℤ.
  - Optionally x, the variable (by default x), if P and Q are given as expressions.
- quorem(P,Q ⟨,x⟩) returns the list of the quotient and remainder of dividing P by Q.

#### Example

quorem((x^3+x^2+1)%13,(2*x^2+4)%13)

| ⎡ ⎣ | ⎛ ⎝ | ⎛ ⎝ | −6 | ⎞ ⎠ | %13 | ⎞ ⎠ | x+ | ⎛ ⎝ | −6 | ⎞ ⎠ | %13, | ⎛ ⎝ | ⎛ ⎝ | −2 | ⎞ ⎠ | %13 | ⎞ ⎠ | x+ | ⎛ ⎝ | −1 | ⎞ ⎠ | %13 | ⎤ ⎦

Indeed, x3+x2+1=(2x2+4)·x+1/2+5x−4/4 and −3· 4=−6· 2≡ 1(mod 13 ).