Atan2 doesn't symplify as expected.



On 8/2/2013 10:51 AM, David Ronis wrote:
> Hi Richard,
>
> Thanks for the reply.  I indeed have taken a  course in complex analysis
> (actually several), and in fact this problem arose when trying to
> evaluate a real integral by closing the contour in the upper complex
> plane and using the Cauchy-Goursat theorem to evaluate the result.
Then you should probably realize that to do such problems you (or the 
programmer
who is specifying the algorithm to use) will  have to figure out an 
appropriate
contour.  There are some efforts to do contour integration in the 
definite integration
code, and some projects involving conformal mapping, but nothing that has
emerged in the Maxima manual.

Doing things like assume(x>0)  doesn't work except perhaps by coincidence.

You need to specify locations of branch cuts and such.  Once you get out 
of the
realm of a single complex variable, the mathematical foundations become 
abstruse
and (so far as I can tell) not amenable to computerization.

If you have ideas on how to do this, I believe they would be quite welcome.

In any case, I am not sure your particular problem is reproducible in a 
current Maxima.
RJF



>   
>
> The integrand has several poles and a pair of logarithmic branch cuts.
> All singularities are symmetric about the real axis. Some of the poles
> arise from a factor of 1/(z^4+(2*omega)^2) in the integrand, which
> results in 4 poles at:
>
> z=exp( i \pi/4) sqrt(2*omega), exp( 3 i \pi/4) sqrt(2*omega) ,
>
> exp((- i \pi /4) sqrt(2*omega), and exp(-3 i \pi/4) sqrt(2*omega)
>
> Only those poles (and the branch cut) in the upper half plane
> contribute to the integral, anything else is wrong.  However, without
> specifying the sign of the sqrt, there is no way to choose a priory (or
> is there?).  From what I can tell, it seems that for the most part
> maxima is using the positive square root.  (BTW it is these sorts of
> poles that ultimately result in the atan2 expressions and I've evaluated
> the residues of the 1st two roots shown above.)
>
> See my reply to Stavros--the problem is triggered by assuming that one
> of the parameters (not appearing in a sqrt) is positive.  This sounds
> like a bug, but we'll see.
>
> David
>