What's happening is that maxima has computed the antiderivative correctly and is now trying to carefully substitute in the limits of integration to make sure everything is on the right sheet. This is basically done in take-principal and intsubs.
I don't understand why maxima does the limit essentially twice like limit(anti,x,1+eps,plus) - limit(anti,x,1-eps,minus). This seems to be where maxima is getting stuck. If it were to finish, maxima would then go and take the limit as eps goes to zero from above.
Perhaps if the pole is at one of the limits of integration as it is here, maxima should do something else? I think the current code assumes the pole is within the integration interval.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If IN-INTERVAL in defint.lisp is slightly modified to use ASK-GREAT instead of ASK-GREATEQ, where ASK-GREAT checks if x > y instead of x >= y, then maxima quickly says the integral is divergent. I think this is correct since 1/(x^5-1) has a partial fraction expansion of 1/5/(x-1) + <stuff>.
Do not know if this change is the correct change or not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Commented out call to $logcontract from take-principal in
defint.lisp rev 1.55. $logcontract was causing size of antiderivative to blow up.
No ill effects in test suite.
(%i12) integrate(1/(x^5-1),x,1,inf) ;
Integral is divergent
-- an error. To debug this try debugmode(true);
(%i13) integrate(1/(x^5-1),x,0,inf) ;
Principal Value
(%o13) (2*sqrt(2*sqrt(5)+10)*atan((sqrt(5)-3)*sqrt(2*sqrt(5)+10)/(4*sqrt(5)))
+2*sqrt(10-2*sqrt(5))*atan(sqrt(10-2*sqrt(5))*(sqrt(5)+3)/(4*sqrt(5)))
-sqrt(2)*sqrt(sqrt(5)+5)*%pi-sqrt(2)*sqrt(5-sqrt(5))*%pi)
/20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=588346
Sorry,. I forgot to mention that this is under 5.5
GCL/Windows 2000.
Logged In: YES
user_id=28849
Originator: NO
FWIW, this still happens in 5.12 cvs.
What's happening is that maxima has computed the antiderivative correctly and is now trying to carefully substitute in the limits of integration to make sure everything is on the right sheet. This is basically done in take-principal and intsubs.
I don't understand why maxima does the limit essentially twice like limit(anti,x,1+eps,plus) - limit(anti,x,1-eps,minus). This seems to be where maxima is getting stuck. If it were to finish, maxima would then go and take the limit as eps goes to zero from above.
Perhaps if the pole is at one of the limits of integration as it is here, maxima should do something else? I think the current code assumes the pole is within the integration interval.
Logged In: YES
user_id=28849
Originator: NO
If IN-INTERVAL in defint.lisp is slightly modified to use ASK-GREAT instead of ASK-GREATEQ, where ASK-GREAT checks if x > y instead of x >= y, then maxima quickly says the integral is divergent. I think this is correct since 1/(x^5-1) has a partial fraction expansion of 1/5/(x-1) + <stuff>.
Do not know if this change is the correct change or not.
Logged In: YES
user_id=1797506
Originator: NO
Commented out call to $logcontract from take-principal in
defint.lisp rev 1.55. $logcontract was causing size of antiderivative to blow up.
No ill effects in test suite.
(%i12) integrate(1/(x^5-1),x,1,inf) ;
Integral is divergent
-- an error. To debug this try debugmode(true);
(%i13) integrate(1/(x^5-1),x,0,inf) ;
Principal Value
(%o13) (2*sqrt(2*sqrt(5)+10)*atan((sqrt(5)-3)*sqrt(2*sqrt(5)+10)/(4*sqrt(5)))
+2*sqrt(10-2*sqrt(5))*atan(sqrt(10-2*sqrt(5))*(sqrt(5)+3)/(4*sqrt(5)))
-sqrt(2)*sqrt(sqrt(5)+5)*%pi-sqrt(2)*sqrt(5-sqrt(5))*%pi)
/20