# Why does this integral come out imaginary?

Im working through Zee and I'm having a little trouble with some integrals. I'm trying to reproduce the analogue of the inverse square law for a 2+1 D universe and I figured I could start with the statement for the energy $$E=-\int \frac{d^2 k}{(2 \pi)^2}\frac{e^{i \vec{k}\cdot (\vec{x}-\vec{y})}}{k^2 + m^2}=-\int_{0}^{\infty}\frac{k\,dk}{(2\pi)^2(k^2+m^2)}\int_{0}^{2\pi}e^{ik|x-y|\cos\phi}d\phi$$ which turns into $$=-\int_{0}^{\infty}\frac{k\,J_{0}(k|x-y|)\, dk}{2\pi (k^2+m^2)}$$ Then contour integrated after seeing $k$ and $J_0$ were both odd to get $$-\frac{(2\pi i)(im)J_{0}(im|x-y|)}{4\pi (2im)}=-\frac{i\, J_{0}(im|x-y|)}{4}$$ but this is imaginary, where did I go wrong?

-
It's better to have one question per post, so I edited out the second one for you. Feel free to post it separately. (Your original post is accessible in the edit history, of course) – David Z Apr 17 '12 at 3:01
@LubosMotl: Why delete your correct answer? – Ron Maimon Apr 17 '12 at 7:58
The answer is given by Lubos. You can see the integral is real from the last integral form--- the integrand is purely real. The evaluation by contours can't change this--- it is because J is odd that you must get a phase of i on the imaginary axis, where you are evaluating it. – Ron Maimon Apr 17 '12 at 8:00
As Ron Maimon said, the integral is obviously real. I dug up my notes and found that this is actually tabulated. See 6.532, integral 4 in Table of Integrals Series and Products 7ed, Gradshteyn and Rizhik. You just get the modified Bessel function of the second kind. – Vijay Murthy Apr 17 '12 at 9:20
Since when is $J_0(x)$ odd ?! – Doru Constantin Dec 11 '13 at 21:47