#### 7.56 Bug in Elliptic Integral, Maple 6 to Maple 8 (24.9.01)

##### 7.56.1 James R. FitzSimons

Maple is giving the wrong answer using elliptic integrals.

> evalf(Int(sqrt((x^2+1)/(x+2)), x=-1..5));

7.277500982

> evalf(int(sqrt((x^2+1)/(x+2)), x=-1..5));

14.18222461 + 4.701625434 I



This is the numeric result using DERIVE. 7.2775009819508996444

##### 7.56.2 Koch-Beuttenmueller (26.9.01)

In MapleVr5.1 the results were still identical, but since Maple6 they are diﬀerent:

> i1:=evalf(Int(sqrt((x^2+1)/(x+2)), x=-1..5));

i1 := 7.277500982

> i2:=int(sqrt((x^2+1)/(x+2)), x=-1..5);

i2 := 2/3 sqrt(182) - 4/1365 I sqrt(182) sqrt(2 - 10 I)

sqrt(70 + 35 I) sqrt(2) sqrt(1 + 5 I)

EllipticE(1/2 sqrt(2 - 10 I), %1) + 1/273 I sqrt(182)

sqrt(2 - 10 I) sqrt(70 + 35 I) sqrt(2) sqrt(1 + 5 I)

EllipticF(1/2 sqrt(2 - 10 I), %1) - 2/1365 sqrt(182)

sqrt(2 - 10 I) sqrt(70 + 35 I) sqrt(2) sqrt(1 + 5 I)

EllipticE(1/2 sqrt(2 - 10 I), %1) - 2/3 sqrt(2) + 8/15 I

sqrt(2 + 2 I) sqrt(10 + 5 I) sqrt(1 - I)

EllipticE(1/2 sqrt(2 + 2 I), %1) - 2/3 I sqrt(2 + 2 I)

sqrt(10 + 5 I) sqrt(1 - I) EllipticF(1/2 sqrt(2 + 2 I), %1)

+ 4/15 sqrt(2 + 2 I) sqrt(10 + 5 I) sqrt(1 - I)

EllipticE(1/2 sqrt(2 + 2 I), %1)

%1 := 1/5 sqrt(10 - 20 I)

> evalf(%);

-8
7.277500973 + .3 10   I

> interface(version);

Maple Worksheet Interface, Release 5.1, SUN SPARC SOLARIS, Jan 7\
1999

> i2:=int(sqrt((x^2+1)/(x+2)), x=-1..5);
i2 := -2/6825 I sqrt(-45 - 35 I) sqrt(-45 + 35 I) sqrt(70 + 35 I)

sqrt(182) EllipticF(1/5 sqrt(70 + 35 I), %1) + 2/3 sqrt(182)

+ 4/6825 sqrt(-45 - 35 I) sqrt(-45 + 35 I) sqrt(70 + 35 I)

sqrt(182) EllipticE(1/5 sqrt(70 + 35 I), %1) - 2/3 sqrt(2) -

4/75 sqrt(15 - 5 I) sqrt(15 + 5 I) sqrt(10 + 5 I) sqrt(2)

EllipticE(1/5 sqrt(10 + 5 I), %1) + 2/75 I sqrt(15 - 5 I)

sqrt(15 + 5 I) sqrt(10 + 5 I) sqrt(2)

EllipticF(1/5 sqrt(10 + 5 I), %1)

%1 := 2/5 sqrt(5) - 1/5 I sqrt(5)

> evalf(%);

14.18222461 + 4.701625434 I

> interface(version);

Maple Worksheet Interface, Maple 6.01, SUN SPARC SOLARIS, June 9  2000 Build ID 79514



Until now I told my students it is good to use diﬀerent CAS to test if an integral is right. Now I can even tell them use diﬀerent Maple versions to see if the results can be correct ?

##### 7.56.3 Gerald A. Edgar (26.9.01)

It may be related to choice of square-roots...

> evalf(int(sqrt((x^2+1)/(x+2)),x=-1..5));

14.18222460 + 4.701625434 I

> evalf(int(sqrt(x^2+1)/sqrt(x+2),x=-1..5));

7.277500972