Atan2 doesn't symplify as expected.



   From: David Ronis <ronis at ronispc.chem.mcgill.ca>

   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.   

   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.)

David, why do you not introduce the parameter a, where a^2=2*omega,
and go from there? I'm not following this discussion too closely, but
it seems to me that you and RJF are talking at cross-purposes.

Leo