A combination of commands partial_fraction(x) and coefficient(x,n)
I have asked this question over here but I got no answer.
I am trying to do some iterative calculations where each time SAGE constructs a fraction and lists the coefficients in the partial fraction decomposition of that fraction. I realized that doing everything symbolically, SAGE wants to keep everything as integer as possible. So what it does is to simplify fractions like
2/(2x-3) and then when I ask for
0, while I expect it to return
I have tried to solve things numerically, but there are two problems:
- The errors get really big after each iteration
- It takes much much longer to calculate it
Any suggestions to get SAGE to solve this is greatly appreciated.