Subject: Maxima's rat package and "quotient is not exact"
From: Raymond Toy
Date: Thu, 11 May 2006 14:05:53 -0400
I was looking at the integration bug report [ 826627 ] integrate
quotient (gcd?) problems
(http://sourceforge.net/tracker/index.php?func=detail&aid=826627&group_id=4933&atid=104933)
and noticed that the gcd problem for the integral integrate(
x*%e^(a*x)*sin(sqrt(b-a^2)*x/2), x) was "fairly" simple. After some
poking around, I see that it is calling PREM like so:
(PREM (#:A4334 3 14 2 (#:|(b-a^2)^(1/2)4333| 1 (#:%I4331 1 -13)) 1
(#:B4332 1 -6) 0 (#:|(b-a^2)^(1/2)4333| 1 (#:B4332 1 (#:%I4331 1 1))))
(#:A4334 1 (#:%I4331 1 2) 0 (#:|(b-a^2)^(1/2)4333| 1 1)))
and this returns
(#:A4334 2 (#:|(b-a^2)^(1/2)4333| 1 -12) 0
(#:|(b-a^2)^(1/2)4333| 1 (#:B4332 1 -4)))
As I understand it, PREM is computing the remainder from dividing two
polynomials. In this case, the polynomials are
14*a^3 - 13*%i*c*a^2 - 6*b*a +%i*b*c
2*%i*a + c
where I have used a for #:A4334, b for #:B4332, c for
#:|b-a^2)^(1/2)4333| and %i for #:%i4331. I'm guessing that #:%i4331
is really %i based on how some computations are done, but I'm not
sure.
So prem is returning
-12*c*a^2 - 4*b*c
Which seems not right. The remainder should be a scalar since the
divisor is 1st order.
Is this interpretation correct? I'm not really familiar with how the
rat package works.
If my interpretation is correct, then prem is the problem causing at
least this "quotient is not exact" issue.
Ray