Euclidean quotient

### 11.3.2 Euclidean quotient

The quo command finds the quotient of the Euclidean division of two polynomials.

- quo 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.
- quo(P,Q ⟨,x⟩) returns the Euclidean quotient of P divided by Q.

Quo is the inert form of quo; namely, it evaluates to quo for later evaluation. It is used when Xcas is in Maple mode (see Section 2.5.2) to compute the euclidean quotient of the division of two polynomials with coefficients in ℤ/pℤ using Maple-like syntax.

#### Examples

quo(x^2+2*x+1,x)

x+2 |  |  |  |  |  |  |  |  |  |

quo(y^2+2*y+1,y,y)

y+2 |  |  |  |  |  |  |  |  |  |

In list representation, to get the quotient of x2+2x+4 by x2+x+2 you can also input:

quo([1,2,4],[1,1,2])

| ⎡ ⎣ | 1 | ⎤ ⎦

that is to say, the polynomial 1.

Input in Xcas mode:

Quo(x^2+2*x+1,x)

quo | ⎛ ⎝ | x2+2 x+1,x | ⎞ ⎠

Input in Maple mode:

Quo(x^3+3*x,2*x^2+6*x+5) mod 5

−2x+1 |  |  |  |  |  |  |  |  |  |

This division was done using modular arithmetic, unlike with the following command, where the division is done in ℤ[X] and reduction afterwards:

quo(x^3+3*x,2*x^2+6*x+5) mod 5

3x+6 |  |  |  |  |  |  |  |  |  |

If Xcas is not in Maple mode, polynomial division in ℤ/pℤ[X] is done e.g. by:

quo((x^3+3*x)%5,(2x^2+6x+5)%5)

| ⎛ ⎝ | −2 x+1 | ⎞ ⎠ | mod 5