Possible fix for Bug [ 941457 ] integrate(1/x^5,x,1,2^(1/78))
Subject: Possible fix for Bug [ 941457 ] integrate(1/x^5,x,1,2^(1/78))
From: Raymond Toy
Date: Thu, 23 Feb 2006 18:20:58 -0500
For this particular integration bug, maxima converts the finite
integral to an infinite integral using the transformation x =
(b*y+a)/(y+1). This is all done correctly, but the wrong result is
returned because maxima is unable to factor (2^(1/78)*x+1)^5 after it
has been expanded out.
This happens in zmtorat in defint.lisp. We should probably fix
$factor so that it can, but this isn't about that. We should also
probably add a check to zmtorat that $factor actually did something
besides return its argument unchanged. This isn't about that either.
This is about a workaround for this bug. The workaround would be to
modify the function CV in defint.lisp. This function is responsible
for applying the transformation and performing the integration. The
problem is that intcv3 expands out everything. However, if, instead
of substituting the limits right away, we use symbolic values to
perform the transformation, and then substitute the actual limits
later, we get a form that $factor can handle. Thus, the following
resplacement for CV works:
(defun cv (exp)
(if (not (or (real-infinityp ll) (real-infinityp ul)))
(let ((trans (intcv3 (m// (m+t 'll (m*t 'ul var))
(m+t 1. var))
nil 'yx)))
(setf trans (subst ll 'll trans))
(setf trans (subst ul 'ul trans))
(method-by-limits trans var 0. '$inf))
()))
Yes, I know this is not the best solution, but I don't feel like
hacking on $factor right now. The testsuite passes with this change.
What do people think about this workaround?
Ray