[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread ma...@mendelu.cz
What about to use polynomial division to get polynomial q=Q/p and then return P/q ? I do not remember the command for polynomial division, but should be in the manual or help. Robert On 4 zář, 05:54, Cary Cherng cche...@gmail.com wrote: I have a rational function P(x)/Q(x) with numerators and

Re: [sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Robert Bradshaw
On Sat, Sep 4, 2010 at 3:25 AM, ma...@mendelu.cz ma...@mendelu.cz wrote: What about to use polynomial division to get polynomial q=Q/p and then return P/q ? I do not remember the command for polynomial division, but should be in the manual or help. If Q and p are polynomials, polynomial

[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Cary Cherng
I should have given the original full context. These polynomials P,Q, and p are all in Z[x1,...,xn]. They are all multivariate. On Sep 3, 8:54 pm, Cary Cherng cche...@gmail.com wrote: I have a rational function P(x)/Q(x) with numerators and denominators of very large degree. From the context I

[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Cary Cherng
And thats another problem. How do I tell sage to give me the denominator of this rational function? On Sep 4, 3:25 am, ma...@mendelu.cz ma...@mendelu.cz wrote: What about to use polynomial division to get polynomial q=Q/p and then return P/q ? I do not remember the command for polynomial

Re: [sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Justin C. Walker
On Sep 4, 2010, at 13:54 , Cary Cherng wrote: And thats another problem. How do I tell sage to give me the denominator of this rational function? In general, the .denominator and .numerator methods will (should) give you the components of a rational element. HTH Justin -- Justin C.

[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Cary Cherng
.denominator() gave me 1. Sage prints out the rational function as R1 + .. + R2 where Ri is a rational function and each having a different denominator. Sage doesn't seem to be automatically writing this as one fraction with a common denominator, could that be the reason it is returning 1 for the

[sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Cary Cherng
Ok i think I've resolved my problems by avoiding var for declaring variables and instead using R.g17,g19,g27,g29,g37,g38,g47,g48,g58,g59,g68,g69 = PolynomialRing(QQ) -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to

Re: [sage-support] Re: Factoring denominator of a rational function

2010-09-04 Thread Robert Bradshaw
On Sat, Sep 4, 2010 at 7:00 PM, Cary Cherng cche...@gmail.com wrote: Ok i think I've resolved my problems by avoiding var for declaring variables and instead using R.g17,g19,g27,g29,g37,g38,g47,g48,g58,g59,g68,g69 = PolynomialRing(QQ) Yes, that should be orders of magnitude faster than doing