Solving contour integral I have the integral
$$
I = \int_{-\infty}^\infty dk \frac{k}{\sqrt{k^2+m^2}} e^{ikx}
$$
I want to show that it decays exponentially with large $x$. I was able to solve the integral with a few tricks. I pulled a $\partial/\partial x$ outside
$$
= \frac{\partial}{\partial x}\int_{-\infty}^\infty dk \frac{1}{\sqrt{k^2+m^2}} \cos(kx)+i\sin(kx)
$$
recognised that the imaginary part wouldn't contribute, and spotted that this was a Bessel function. My book, however, comments that for the original integral 

the square root cut starting at $\pm im$ leads to an exponential decay
  $\sim e^{-mx}$.

Is the book mistaken? The comment seems to suggest I can make a contour integral and apply the residue theorem. If that square root weren't there, I could find the residue. Is the book mistaken? Is there a way to apply the residue theorem? Perhaps by squeezing this integral between $0<I< \text{Integral for which resiude theorem applies}$. Have I misinterpreted the comment?  
 A: To answer your question: no, your book is not mistaken.  It is describing a consequence of Cauchy's theorem.
Something bothers me about simply differentiating under the integral sign here.  We really have no reason to think that the integral is absolutely convergent.  I'd rather take a direct approach here and see where things end up.
So I'd begin by considering an integral in the complex plane for $x \gt 0$:
$$\oint_C dz \frac{z}{\sqrt{z^2+m^2}} e^{i x z} $$
where $C$ is a semicircular contour in the upper half plane of radius $R$, but with a detour down the imaginary axis and around a small circle about the branch point at $z=i m$ of radius $\epsilon$.  This contour integral is zero by Cauchy's theorem.  On the other hand, the contour integral may be written as
$$\int_{-R}^R dk \frac{k}{\sqrt{k^2+m^2}} e^{i x k} + i R \int_0^{\pi/2} d\theta \, e^{i \theta} \frac{R e^{i \theta}}{\sqrt{R^2 e^{i 2 \theta}+m^2}} e^{i x R e^{i \theta}} \\ + i \int_R^m dy \frac{i y}{\sqrt[-]{-y^2+m^2}} e^{-x y} + i \epsilon \int_{\pi/2}^{5 \pi/2} d\phi \, e^{i \phi} \frac{\epsilon e^{i \phi}}{\sqrt{\epsilon^2 e^{i 2 \phi}+m^2}} e^{i x \epsilon e^{i \phi}} \\+ i \int_m^R dy \frac{i y}{\sqrt[+]{-y^2+m^2}} e^{-x y} + i R \int_{\pi/2}^{\pi} d\theta \, e^{i \theta} \frac{R e^{i \theta}}{\sqrt{R^2 e^{i 2 \theta}+m^2}} e^{i x R e^{i \theta}}$$
Note that the $\sqrt[+]{}$ refers to the positive branch of the square root and $\sqrt[-]{}$ refers to the negative branch.
Now let's consider the integral over the large semicircle, i.e., over $\theta$ as $R \to \infty$.  Adding the two contributions, we get
$$\begin{align}\lim_{R \to \infty} i R \int_{0}^{\pi} d\theta \, e^{i \theta} \frac{R e^{i \theta}}{\sqrt{R^2 e^{i 2 \theta}+m^2}} e^{i x R e^{i \theta}}&= \lim_{R \to \infty} i R \int_{0}^{\pi} d\theta \, e^{i \theta}\, e^{i x R e^{i \theta}}\\ &= \lim_{R \to \infty} i R \frac{i 2\sin{x R}}{x R}\\ &= -2 \lim_{R \to \infty} \frac{\sin{x R}}{x}\\ &= -2 \pi \delta(x)\end{align}$$
So the contribution from the outer arc that usually vanishes does not do so here.  Rather, we ended up using a definition of a generalized function, the delta function.
The integral over $\phi$ clearly vanishes as $\epsilon \to 0$.  Thus, we have in the limits as $\epsilon \to 0$ and $R \to \infty$:
$$\int_{-\infty}^{\infty} dk \frac{k}{\sqrt{k^2+m^2}} e^{i x k} + i 2 \int_m^{\infty} dy \frac{y}{\sqrt{y^2-m^2}} e^{-x y} -2 \pi \delta(x) = 0$$
As is usual with these problems that only involve branch points and no poles, we have transformed one integral into another.  Fortunately, this new integral may be evaluated in terms of a modified Bessel function:
$$\begin{align} \int_m^{\infty} dy \frac{y}{\sqrt{y^2-m^2}} e^{-x y} &= \int_0^{\infty} dt \, \cosh{t} \, e^{-m x \cosh{t}} = K_1(m x) \end{align} $$
For $x \lt 0$, we would simply close a contour below the real axis.  Thus we may now write that
$$\int_{-\infty}^{\infty} dk \frac{k}{\sqrt{k^2+m^2}} e^{i x k} = -i 2 \operatorname{sgn}{x} \,  K_1(m |x|) + 2 \pi \delta(x)$$
Note that we avoided some painful questions about the validity of differentiating under the integral sign by considering the integral over the outer arc.
Note also that I have said nothing about residues or the residue theorem.  That's because there are no poles and hence no residues.  Again, we instead got another form of the integral that was more recognizable to us as a special function. 
A: All right, here are the details. 
We consider
\begin{equation*}
J=\int_{-\infty }^{+\infty }dk\frac{1}{\sqrt{k^{2}+m^{2}}}\exp
[ikx]=\int_{-\infty }^{+\infty }dk\frac{1}{\sqrt{k^{2}+1}}\exp [ikmx]
\end{equation*}
where we have choosen $m>0$. We note that $\frac{1}{\sqrt{k^{2}+1}}
$ is (absolutely) integrable over $(-\infty ,+\infty )$ so $J(x)$ is an $%
L^{\infty }$-function of $x$. We also note that $\pm i$ are branch points of
the analytic continuation of$\frac{1}{\sqrt{k^{2}+1}}$, so we can introduce
the branch cuts $(i,i\infty )$ and $(-i,-i\infty )$. We also see that $%
J(-x)=J(x)$ so we restrict our attention to non-negative $x$. Next we
replace the integration path by $\Gamma $, which consists of the intervals $%
(-\infty +i,-\varepsilon +i)$. $\varepsilon +i,\infty +i)$ and a small
semi-circle $\mathcal{C}$ around and below $+i$ with radius $\varepsilon $.
The integrals  over the two intervals have exponential decay $\sim \exp [-mx]
$ and it remains to consider the integral over the semi-circle.
We parametrise
\begin{equation*}
k=i+\varepsilon \exp [-i\varphi ],\;\varphi \in \lbrack 0,\pi ].
\end{equation*}
Then
\begin{eqnarray*}
&&\int_{\mathcal{C}}dk\frac{1}{\sqrt{k^{2}+1}}\exp [ikmx] \\&=&-i\varepsilon
\int_{0}^{\pi }\exp [-i\varphi ]\frac{1}{\sqrt{2\varepsilon \exp [-i\varphi
]+\varepsilon ^{2}\exp [-2i\varphi ]}}\exp [i(i+\varepsilon \exp [-i\varphi
])mx] \\
&=&-i\sqrt{\varepsilon }\int_{0}^{\pi }\exp [-i\varphi ]\frac{1}{\sqrt{2\exp
[-i\varphi ]+\varepsilon \exp [-2i\varphi ]}}\exp [i(i+\varepsilon \exp
[-i\varphi ])mx]
\end{eqnarray*}
and we see that the integral tends to $0$ as $\varepsilon \downarrow 0$.
Thus $J$ has the required exponential decay and so does $I$.
