1 | initial version |

Dear John, your help is greatly appreciated :) One further question : What i want to do is exactly what you have descibed at the end, but with an expression of the form $\frac{f(a)}{g(a)}$ where $f,g$ are polynomials in $a$ (and with coefficients in $Z[m])$ instead of just a polynomial $f(a)$. So when I define say f=((a^2-m^2)^2)(a^3-m) what Sage notebook gives is

1/256*a^13/(a^2 - 4*m)^2 - 1/8*a^11*m/(a^2 - 4*m)^2 + 7/4*a^9*m^2/(a^2 -
4*m)^2 - 14*a^7*m^3/(a^2 - 4*m)^2 + 70*a^5*m^4/(a^2 - 4*m)^2 -
1/2*a^7*m/(a^2 - 4*m)^2 - 224*a^3*m^5/(a^2 - 4*m)^2 + 8*a^5*m^2/(a^2 -
4*m)^2 + 448*a*m^6/(a^2 - 4*m)^2 - 48*a^3*m^3/(a^2 - 4*m)^2 -
512*m^7/((a^2 - 4*m)^2*a) + 128*a*m^4/(a^2 - 4*m)^2 + 256*m^8/((a^2 -
4*m)^2*a^3) - 128*m^5/((a^2 - 4*m)^2*a) + 16*a*m^2/(a^2 - 4*m)^2

That seems rather incomprehensible as it computes the final expression in disctinct fractions. Is there any way to format this in a nice expression of the form ''polynomial over (other)polynomial'' where both polynomials will be factored ?

2 | No.2 Revision |

Dear John, your help is greatly appreciated :) One further question : What i want to do is exactly what you have descibed at the end, but with an expression of the form $\frac{f(a)}{g(a)}$ where $f,g$ are polynomials in $a$ (and with coefficients in $Z[m])$ instead of just a polynomial $f(a)$. So when I define say
~~f=((a^2-m^2)^2)(a^3-m) ~~$$f=\frac{(a^2-m^2)^2}{a^3-m}$$ what Sage notebook gives is

1/256*a^13/(a^2 - 4*m)^2 - 1/8*a^11*m/(a^2 - 4*m)^2 + 7/4*a^9*m^2/(a^2 -
4*m)^2 - 14*a^7*m^3/(a^2 - 4*m)^2 + 70*a^5*m^4/(a^2 - 4*m)^2 -
1/2*a^7*m/(a^2 - 4*m)^2 - 224*a^3*m^5/(a^2 - 4*m)^2 + 8*a^5*m^2/(a^2 -
4*m)^2 + 448*a*m^6/(a^2 - 4*m)^2 - 48*a^3*m^3/(a^2 - 4*m)^2 -
512*m^7/((a^2 - 4*m)^2*a) + 128*a*m^4/(a^2 - 4*m)^2 + 256*m^8/((a^2 -
4*m)^2*a^3) - 128*m^5/((a^2 - 4*m)^2*a) + 16*a*m^2/(a^2 - 4*m)^2

That seems rather incomprehensible as it computes the final expression in disctinct fractions. Is there any way to format this in a nice latexed expression of the form ''polynomial over (other)polynomial'' where both polynomials will be factored ?

thanx !

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.