bump wrote:
> 
> On Jan 3, 10:59 am, Michael Beeson <[email protected]> wrote:
>> I am just learning Sage.   I tried to define a polynomial and then
>> find the polynomial remainder upon division by the
>> cyclotomic_polynomial(18), which is 1-x^3+x^6.    This is easily
>> accomplished in Mathematica using the PolynomialRemainder function.
>> But I could not find the analog of that function in the Sage
>> documentation.
> 
>> What is the right way to do this in Sage?
> 
> I think this is what you are trying to do:
> 
> sage: P.<x> = PolynomialRing(QQ)
> sage: f = x^10+2*x^8+3*x+1
> sage: f in P
> True
> sage: g = cyclotomic_polynomial(18); g
> x^6 - x^3 + 1
> sage: f.quo_rem(g)
> (x^4 + 2*x^2 + x, 2*x^5 - 2*x^2 + 2*x + 1)
> 
> The first term is the quotient and the second is the remainder. See
> sage: f.quo_rem?
> 
> for the description of the method.

See also 
http://groups.google.com/group/sage-support/browse_thread/thread/c786de5c6d13b600/dd1594ca70590735
 
for a similar thread.

Thanks,

Jason

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to