[math-fun] Maxima help: polynomial manipulation
I think a few people here are familiar with Maxima. I'd also be perfectly happy with a solution in PARI or in Sage, if that turns out to be a better way of doing this. I've built up a sum like this: 1.2345/(x+1) + 2.3456/(x+2) + 3.4567/(x+3); (I won't show the output, since the alignment is funny, and if there's a way to turn off Maxima's ASCII pretty-printing please tell me) Then I want to "ratsimp" it, to get a ratio of polynomials. If I do this, Maxima gives me: (35184 x^2 + 129625 x + 106786) / (5000 x^3 + 30000 x^2 + 55000 x + 30000) The problem with this is that the imprecise numbers have all been made into integers, and the coefficients in the denominator are huge. What I really want is this: (7.0368 x^2 + 25.925 x + 21.3572) / (x^3 + 6 x^2 + 11 x + 6) I'm trying to prevent the automatic conversion from floats to rational fractions, so as to keep the coefficients in the denominator small. The "ratepsilon" and "bftorat" flags don't seem to help. -- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 - mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com
participants (2)
-
James Cloos -
Robert Munafo