Integral of 1/(sqrt(2)+sin(x))



On Friday 25 April 2003 23:28, Raymond Toy wrote:
>     Felix> 2. Maxima returns a non continuous indefinite integral:
>     Felix>        (C214) ratsimp(integrate(integrand,x));
>     Felix>        (D214) 2*ATAN((SQRT(2)*SIN(x)+COS(x)+1)/(COS(x)+1))
>
> In these kinds of integrals, don't you always have to be careful about
> what branch of atan should be used?
>
> This is probably why ldefint returns 0 since d214 is %pi/2 for both x
> = 0 and x = 2*%pi.

As far as I can see the result d214 is mathematically incorrect because: 
d214 is non contiguos at (2*n-1)*%pi.
=> d214 is underivable at (2*n-1)*%pi 
=> d214 is not the antiderivative of integrand (or only the antiderivative
   on a limited range for x).

A correct result would be something like
    (if (remainder(u-%pi,2*%pi) = 0) then 0 else d214)
    + 2*%pi*entier((u-%pi) / (2*%pi))

Felix