Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Constant coefficient of Laurent Polynomials

I am looking for the constant coefficient of a Laurent polynomial, the issue I am having is that sage is not simplifying the polynomial.

An example:

a = var(",".join( "a%i" %i for i in range(0, 6))) f = xy + 1.00000000000000a6x + 1.00000000000000a4y + xy^-1 + x^-1y + 1.00000000000000a3y^-1 + 1.00000000000000a1x^-1 + x^-1y^-1

Then I ask

f/(x^1*y^0) (The powers have to be in this way, just from the context of the work I am doing)

and it outputs:

1.00000000000000/xxy + 1.00000000000000a6/xx + 1.00000000000000a4/xy + 1.00000000000000/xxy^-1 + 1.00000000000000/xx^-1y + 1.00000000000000a3/xy^-1 + 1.00000000000000a1/xx^-1 + 1.00000000000000/xx^-1y^-1

Now when I ask for the constant coefficient of this LP it tells me its 0 when it is a6.

How can I fix this.

Thanks in advance

Constant coefficient of Laurent Polynomials

I am looking for the constant coefficient of a Laurent polynomial, the issue I am having is that sage is not simplifying the polynomial.

An example:

a = var(",".join( "a%i" %i for i in range(0, 6)))
f = xy x*y + 1.00000000000000a6x 1.00000000000000*a6*x + 1.00000000000000a4y 1.00000000000000*a4*y + xy^-1 x*y^-1 + x^-1y x^-1*y + 1.00000000000000a3y^-1 1.00000000000000*a3*y^-1 + 1.00000000000000a1x^-1 1.00000000000000*a1*x^-1 + x^-1y^-1

x^-1*y^-1

Then I ask

f/(x^1*y^0)   #  (The powers have to be in this way, just from the context of the work I am doing)

doing)

and it outputs:

1.00000000000000/xxy

1.00000000000000/x*x*y + 1.00000000000000a6/xx 1.00000000000000*a6/x*x + 1.00000000000000a4/xy 1.00000000000000*a4/x*y + 1.00000000000000/xxy^-1 +
1.00000000000000/xx^-1y 1.00000000000000/x*x*y^-1 + 1.00000000000000a3/xy^-1 1.00000000000000/x*x^-1*y + 1.00000000000000a1/xx^-1 1.00000000000000*a3/x*y^-1 + 1.00000000000000/xx^-1y^-1

1.00000000000000*a1/x*x^-1 + 1.00000000000000/x*x^-1*y^-1

Now when I ask for the constant coefficient of this LP it tells me its 0 when it is a6.

How can I fix this.

Thanks in advance