Ask Your Question

Revision history [back]

Does the following satisfy your needs ?

sage: R.<x> = QQ[]
sage: R
Univariate Polynomial Ring in x over Rational Field
sage: P,Q = (1+x+x^2+x^3, 1+2*x^2)
sage: P.quo_rem(Q)
(1/2*x + 1/2, 1/2*x + 1/2)

To get the doc of the quo_rem method:

sage: P.quo_rem?