I found a very strange bug in the symbolic integration routine in MapleV4, working with a very simple algebraic function:

f:= A/( (1+x^2)^(3/2) * (1 + sqrt(1 + x^2))) int(f, x=0..infinity) = 0 <===========

a result obviously wrong.

Three important facts must be noticed :

1)The previous result is obtained when the exponent 3/2 is replaced by 5/2, 7/2, 9/2 etc, but NOT for EVEN exponents

2)Most strange, CORRECT result is obtained when the symbolic constant A (or any other symbolic constant) is REPLACED in the deﬁnition of f with a NUMBER, i.e., this strange behavior is present ONLY when the numerator of f is SYMBOLIC.

3)I found the IDENTICAL behavior in MapleV.3

Both the versions of Maple I’m using are under Unix.

It is corrected with Maple 6. (U. Klein)

I found your posting interesting. In this response I ﬁrst present my ﬁndings concerning the computations you report, then present a diﬀerent approach to the problem that appears to be more promising. You should be able to copy either Maple session directly into a Maple worksheet (R4).

I do not obtain the result that you report. I, too, am working with Release 4 on UNIX (Solaris). While my results are diﬀerent, they are not what you might expect. Here’s what I found:

> restart; > interface( version ); Maple Worksheet Interface, Release 4, SUN SPARC SOLARIS, Apr 19, 1997 > interface( patchlevel ); 2 > f:= A/( (1+x^2)^(3/2) * (1 + sqrt(1 + x^2))); A f := ----------------------------- 2 3/2 2 1/2 (1 + x ) (1 + (1 + x ) ) > int( f, x=0..infinity ); infinity - signum(A) infinity > int( subs(A=1,f), x=0..infinity ); - 1/2 Pi + 2 > evalf( Int( subs(A=1,f), x=0..infinity ) ); .4292036732

For additional information on Maple’s evaluation of this integral you might insert the command:

> infolevel[int]:=5;

before the int command. The extra output will provide some insight into Maple’s processing. In this case it appears that the problem is divided into two elliptic integrals that converge only under certain conditions. While the conditions are displayed in the userinfo, they do not appear to be carried forward with the result.

The "even" exponents are not as much of a problem because of the elimination of one of the square roots from the denominator. These roots are likely to be the ultimate source of the diﬃculties for this problem.

In fact, the repeated occurrence of `sqrt(1+x^2)`

suggests a substitution that might yield a
more tractable formulation of the problem. The `changevar`

command from Maple’s student
package can be used (WITH CAUTION - it’s not a problem here, but I seem to remember
that changevar can become confused, e.g., limits of integration for non-monotone
substitutions) to complete the change of variables.

> restart; > with( student ): > f := A/((1+x^2)^p*(1+(1+x^2)^(1/2))); A f := --------------------------- 2 p 2 1/2 (1 + x ) (1 + (1 + x ) ) > F := Int( f, x=0..infinity ); infinity / | A F := | --------------------------- dx | 2 p 2 1/2 / (1 + x ) (1 + (1 + x ) ) 0 > G := changevar( (1+x^2)=u^2, F ); infinity / | A u G := | -------------------------- du | 2 p 2 1/2 / (u ) (u + 1) (-1 + u ) 1 > value( subs(p=3/2,G) ); 2 A - 1/2 Pi A > value( subs(p=4/2,G) ); -2 A + 3/4 Pi A > value( subs(p=5/2,G) ); 8/3 A - 3/4 Pi A > value( subs(p=6/2,G) ); 15 - 8/3 A + -- Pi A 16 > value( subs(p=7/2,G) ); 15 16/5 A - -- Pi A 16

I hope you have found this useful and informative.

I add to Luca’s observations:

With

> assume(A>0);

the correct result is obtained !

Ferdinand Gleisberg.

Would it work better if you deﬁned `f`

as `f:=x->`

etc?

Thank you very much for all your interesting comments!

I would like to add the observation that assuming `A<0`

the previous integral is returned
inﬁnity!

Obviously, my problem is not the speciﬁc evaluation of the previous integral (it can be solved very easily by hand), but a more general problem. In fact, suppose you have a VERY LONGE symbolic problem that you cannot control step by step, a problem like the previous can be quite dangerous.

Moreover, I think that a "normal" user cannot know ALL what Maple is doing solving a problem (suppose maple use the previous integral in doing a much more complex integration as an intermediate step...) Certainly, many evident errors (like the previous one) can certainly be handled with some "interactive" work, but unfortunately not always such work is doable.....