ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 25 May 2021 19:25:02 +0200how do I compute a polynomial pseudo-remainder in sage?https://ask.sagemath.org/question/57266/how-do-i-compute-a-polynomial-pseudo-remainder-in-sage/ Most symbolic algebra systems provide a function, typically called "prem" or something like that, to compute the pseudo-remainder of two polynomials. Sage does provide other elementary functions for manipulating polynomials, e.g. "factor", but does not seem to provide this one. Perhaps something could be done by using the sage.rings.polynomial package, but that would be overkill for my immediate problem. Is there ANY way to do this simply?Tue, 25 May 2021 18:21:41 +0200https://ask.sagemath.org/question/57266/how-do-i-compute-a-polynomial-pseudo-remainder-in-sage/Answer by tmonteil for <p>Most symbolic algebra systems provide a function, typically called "prem" or something like that, to compute the pseudo-remainder of two polynomials. Sage does provide other elementary functions for manipulating polynomials, e.g. "factor", but does not seem to provide this one. Perhaps something could be done by using the sage.rings.polynomial package, but that would be overkill for my immediate problem. Is there ANY way to do this simply?</p>
https://ask.sagemath.org/question/57266/how-do-i-compute-a-polynomial-pseudo-remainder-in-sage/?answer=57267#post-id-57267Does 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?
Tue, 25 May 2021 19:25:02 +0200https://ask.sagemath.org/question/57266/how-do-i-compute-a-polynomial-pseudo-remainder-in-sage/?answer=57267#post-id-57267