I am a physics grad student (high energy), I've come across a problem while doing a certain loop integral that I don't understand. I've removed as much of the physics as I can so that this is just a math problem, hopefully someone can spot my error:
I need to solve this integral using standard contour integration and the residue theorem:
$\int_\infty^\infty dx\int_\infty^\infty dy \frac{1}{(A+x y+i \epsilon ) (A+x (y-b)+i \epsilon )}$
where $A, b, \epsilon$ are real constants and $i$ is the imaginary unit.
Suppose I do the x integral by completing a contour in one of the half-planes. I can do this because the denominator has degree 2, so the contribution from the arc goes to zero. The roots are:
$x = -\frac{A+i \epsilon }{y}, \frac{A+i \epsilon }{b-y}$
For $y<0$ and $y>b$, both roots are in the same half-plane, so I can close the contour in the other half-plane and get zero by the residue theorem. When $0<y<b$, the roots are in different half-planes, I choose to pick up the residue from the either root listed above, and get
$\int_0^b dy \frac{2 i \pi }{b (A+i \epsilon )} = \frac{2 i \pi }{(A+i \epsilon )}$
This looks pretty good so far, but now the problem: I should be able to do the y integral by contours instead. In this case the roots are
$y = \frac{-A-i \epsilon }{x}, \frac{-A+b x-i \epsilon }{x}$
And now for any non-zero x, the roots are in the same half-plane, so I should get zero for the contour integral, and then zero as my final answer.
Now, I'm pretty sure that the second line of reasoning is wrong, and that it has something to do with the fact that the roots are both singular at x=0, while in the first case only one root is singular at a time. The final result doesn't depend on b in the first case (and in particular would be the same no matter how small b is), which suggests to me that in the second case there is some contribution from x=0 that I'm missing.
I would like to understand exactly what has gone wrong in the second case, because I've written scripts to perform integrals of this kind automatically, and I need to modify them to recognize this issue.
Thanks for your help.
The double integral is not absolutely convergent. This is because, for real $A, x$, and for real $\epsilon \ne 0$, $$ \int_{-\infty}^{\infty}\frac{1}{|A+xy+i\epsilon||A+x(y-b)+i\epsilon|}\,dy= \frac{1}{|x|}\int_{-\infty}^{\infty}\frac{1}{|A+y+i\epsilon||A+y-bx+i\epsilon|}\,dy, $$ which is bounded below by a non-zero constant times $1/|x|$ for $x \approx 0$. Your intuition about the singularity at $x=0$ is correct--this is what prevents you from interchanging the order of integration. There must be a reason for preferring one order over the other, or you're doing something which has questionable meaning. And, really, only one order makes good sense. For that order, what you can say is $$ \lim_{R\uparrow\infty}\int_{-R}^{R}\int_{-\infty}^{\infty}\frac{1}{(A+xy+i\epsilon)(A+x(y-b)+i\epsilon)}\,dy\,dx = \\ \lim_{R\uparrow\infty}\int_{-\infty}^{\infty}\int_{-R}^{R}\frac{1}{(A+xy+i\epsilon)(A+x(y-b)+i\epsilon)}\,dx\,dy= \\ %% \lim_{R\uparrow\infty}\int_{-\infty}^{\infty}\frac{1}{x}\int_{-Rx}^{Rx}\frac{1}{(A+y'+i\epsilon)(A+y'-bx+i\epsilon)}\,dy'\,dx. $$ This helps reveal why the limit in $R$ cannot be interchanged with the outer integral.