#### 7.75 bug in int() routine in Maple V.4 and Maple V.5 (1.3.97)

##### 7.75.1 luca ciotti

I think I found another bug in MapleV.4 (00f, unix version)

a:= int(x/(sin(x)^3+cos(x)^3),x=0..Pi/2);



Maple is apparently able to do a symbolically using dilogaritms.

But,

evalf(a)= -.16989 -1.3791 I



which is wrong, being the integrand strictly positive.

Moreover, a direct numerical computation gives

a:=   1.4751.....



In Maple V Release 5 the ﬁrst calculation results in .3784842693 + 2.758230170 I, while an evalf( Int( ... ) ); leads to a := 1.4751....

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

##### 7.75.2 Brian Blank (15.3.97)

The antiderivative found by MAPLE has some singularities; one is in the interval of integration. The rest of the worksheet attached below seems to indicate that the antiderivative is correct in [0,Pi/4).

> A := int( x/(sin(x)^3+cos(x)^3),x ):

> readlib(discont):  evalf( discont(A, x ) );
-9
{-2.356194490 + .2638180391 10   I, 2.356194490 - .6584789486 I,

-.7853981634 + .6584789479 I, .7853981634 + .6584789479 I,

-9
2.356194490 + .6584789479 I, -.7853981634 + .2638180391 10   I,

-9
.7853981634 - .6584789486 I, .7853981634 + .2638180391 10   I,

-.7853981634 - .6584789486 I, -2.356194490 + .6584789479 I,

-9
-2.356194490 - .6584789486 I, 2.356194490 + .2638180391 10   I}

> B := diff(A,x):  C := abs(B - x/(sin(x)^3+cos(x)^3) ):
> for  i  from  1  to 100  do
> if
>    evalf(subs(x=i*Pi/400,C)) > 10.^(-7)
>    then  print( [ i*Pi/400, evalf(subs(x=i*Pi/400,C))])
> fi
> od;

49                    -6
[--- Pi, .6861817978 10  ]
200

99                    -5
[--- Pi, .1288606775 10  ]
400

10
[1/4 Pi, .1447924238 10  ]



Note the positive exponent of the last evaluation.

> subs(x=97*Pi/400,A) - subs(x=0,A): evalf(% );

-8
.3687071756 + .22 10   I

> (evalf@Int)( x/(sin(x)^3+cos(x)^3),x = 0 .. 97*Pi/400 );

.3687071760



##### 7.75.3 Christian TANGUY (26.3.97)

I think this is yet another example of trouble one can get with some integrals calculated by Maple V. As already noticed by other MUGers, the pedestrian procedure seems to be the following:

- use Int(...) instead of int(...), and THEN use evalf. Here, it gives

1.475106979
- if more than the numerical value is needed, and when Maple V suggests

an obviously wrong result, all hope is not lost. A solution DOES exists, that can be obtained (1) with paper and pencil (2) by tweaking the integral.

In the above case, one can play with the integrand and replace the x factor in the numerator by Pi/4, because of the symmetry of the denominator. Then, one can express the denominator with respect to t=x-Pi/4. Surprise (?), the expression simpliﬁes greatly as

         Pi/sqrt(2)*int(1/(1-u^2)/(1+2*u^2),u=0..sqrt(1/2))



Maple V 3.0 (and 4.00b, U. Klein) for Windows can take it from there and gives the correct result, even though in a not so simple form (in my opinion). Anyway, the result is:

> evalf(Pi^2/12+Pi*sqrt(2)/6*ln(sqrt(2)+1));

1.475106979