# Quotient and remainder: quorem divide

### 5.28.4 Quotient and remainder: quorem divide

The quorem command finds the quotient and remainder of the Euclidean division of two polynomials.
divide is a synonym for quorem.

- quorem takes two mandatory arguments and one optional argument:
  - P and Q, two polynomials.
  - Optionally x, the variable (by default x), if P and Q are given as expressions.
- quorem(P,Q ⟨ ,x⟩) returns a list consisting of the Euclidean quotient and the Euclidean remainder of P divided by Q.

#### Examples.

- Input:
  quorem([1,2,4],[1,1,2])
  Output:

  [▯ 1 ▯, ▯ 1,2 ▯]

- Input:
  quorem(x^3-1,x^2-1,x)
  Output:

  ⎡ ⎣ | x,x−1 | ⎤ ⎦