## 15 Reputation

8 years, 177 days

## Bug in analytic integration...

Maple 2018

Hello everyone,

I'm not quite sure, if this is the correct place but i think i found a bug in the analytic integration tool in Maple.

Since i have the student edition and i didn't find a bug report form i will post it here:

```restart:

R:=1:
delta:=1:

f:=R^4*delta*cos(theta)*sin(x)*sin(-x+theta)/(8*Pi*(R^2*cos(x)+sqrt(2*R^2*cos(x)+2*R^2+4*delta^2)*delta+R^2+2*delta^2));

intfAna:=int(f,x= -Pi + theta .. Pi+ theta);

intfNum:=Int(f,x= -Pi + theta .. Pi+ theta);
intNum:=evalf(Int(eval(intfNum),theta=0..2*Pi));
intAna:=evalf(int(eval(intfAna),theta=0..2*Pi));
```

the last two statements yield:

intNum := -0.07343950362
intAna := -0.7853981635

Thus the numerical integrated value differes from the analytical result.

Since I also tried to integrate this with scipy in python I'm pretty sure that the numerical result is correct  and the analytical one is not.

Is my deduction here correct?

I have Maple 2018 here on my private PC. But at work i have Maple 2021 and the difference is the same.

Interestingly the analytic result seems to be -cos(theta)^2/4. If we plot the analytical and numerical integrand, we get:

```plot(intfNum,theta=0..2*Pi);
plot(intfAna,theta=0..2*Pi);
```

Thus both integrands seem to be cosines of theta but the analytical has the wrong factor.