7.92 bug in integration in Maple V.4 and Mathematica 3.0 (22.8.97)

7.92.1 luca ciotti

I think I found a (serious?) bug in definite integration both in Maple Release 4 (unix version) and Mathematica 3.0 (linux version).

The two softwares produce different answers, both wrong.

The integral is I=\int_0^{pi/2} dx/sqrt{sin(x)+cos(x)

Maple 3, Maple 4 and Mathematica 3 all give the same numerical result doing numerical integration, i.e.

I=1.3974....
 

If you change the input from I := int( ... ) to evalf( Int( ... ) ) Maple V Release 5 yields to 1.770261042. (U. Klein)

Symbolic integration in Maple 4 produces a result in term of elliptic integrals, that evaluated with evalf() is exactly

-1.3974 ....

With Maple V Release 5 you get: 1.77026.... (U. Klein)

Symbolic integration in Mathematica 3 produces a result in term of HypergeometricPFQ, that evaluated with N[] is

-3.01236

Changing variable of integration as y=tan(x/2) produces a symbolic result in Maple and Mathematica equal to 1.3974....

7.92.2 Sjoerd W. Rienstra (27.8.97)

It could be a bug, but very likely it is an inherent risk of symbolic calculation. A branch of the multivalued function, other than expected or meant, may be used by the system. Or the primitive of a multivalued function (like a square root, log, arcsin, arctan, etc.) is evaluated at both sides of the branch cut, so that the result includes the additional jump over the branch cut.

Never forget that a computer program is ONLY reliable when it hasn’t passed the compiler yet. When the compiler doesn’t complain anymore and the program produces numbers, it sometimes occurs (I heard some rumours of rare occasions, long ago ....) that the results are allright.