Ask Your Question

# how to write Division command?

Hello could you please tell me how can I compute the remainder on division of the given polynomial f by the order set F using grlex order in sage? thank you

f= x*y^2+x^3*y^2-y+1
F=(x*y^2-x , x-y^3)

edit retag close merge delete

## Comments

why doesn't any one answer ,Is there something wrong with the question I can fix?

( 2013-04-04 04:14:24 +0200 )edit

## 1 Answer

Sort by ยป oldest newest most voted

Here's a shot at it. You can call some maxima commands.

var('x,y')
maxima('load(grobner)')
maxima('poly_monomial_order:grlex')
F=[x*y^2-x , x-y^3]
ans=maxima('poly_pseudo_divide(x^2*y^2+x^3*y^2-y+1,[x*y^2-x,x-y^3],[x,y])')
print ans
(quo,rem,n,m)=ans
p=quo[0]*F[0]+quo[1]*F[1]+rem
print p
print p.expand()

more

## Comments

It was so much helpful, thank you !

( 2013-04-04 13:04:58 +0200 )edit

I have a question.. could you please tell me what is "n" and "m" in answer part?

( 2013-04-15 13:41:05 +0200 )edit

The results from maxima are described at http://maxima.sourceforge.net/docs/manual/en/maxima_57.html.

( 2013-04-15 20:08:52 +0200 )edit

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2013-04-03 05:22:10 +0200

Seen: 503 times

Last updated: Apr 05 '13