Maxima can't integrate 1/(cos(x)+sin(x))



> --- "Felix E. Klee" <felix.klee.maxima@gmx.net> wrote:

> Hm, the results I got aren't correct. For example
>     ldefint(1/(cos(x)+sin(x)+10),x,0,2*%pi);
> returns 0 while 
>     romberg(1/(cos(x)+sin(x)+10),x,0,2*%pi);
> returns 0.63. Maybe it isn't correct to use LDEFINT to integrate over 
> singularities. Am I doing something wrong or is this a bug?

Dear Felix, 
Dear Colleagues,

At least now I have no idea why the difference in the above results
by Felix, in other words why ldefint failed. I do not believe Felix is
doing something wrong and, naturally, there is no singularity in the
integrand, since 10 > 1+1. Perhaps, somewhere Maxima used 
ATAN instead of ATAN2 and this may be an error. There seems
to be a difference in %pi somewhere in the indefinite integral, i.e.

(C2) int : integrate(1/(cos(x)+sin(x)+10),x), ratsimp;
(D2) 2*ATAN((9*SIN(x)+COS(x)+1)
        /(7*SQRT(2)*COS(x)+7*SQRT(2)))/(7*SQRT(2))

At least, we know the correct analytical result: 2*%pi/(7*sqrt(2)). 

(C1) 2*%pi/(7*sqrt(2)), numer;
(D1)           0.63469756259405
(C2) romberg(1/(cos(x)+sin(x)+10),x,0,2*%pi);
(D2)           0.63469757780408

I would be thankful for some help by a more experienced colleague.
(For the moment, I could call this behaviour of Maxima in the
results by Felix a bug.)

Many sincere thanks in advance!

Best regards from Patras,

Nikos