Evaluating $ \int_{-\infty}^{\infty} \frac{e^{-ix}}{\sqrt{x+2i} + \sqrt{x+5i}}dx$ I want to compute following improper integral via residue theorem. 
$ \int_{-\infty}^{\infty} \frac{e^{-ix}}{\sqrt{x+2i} + \sqrt{x+5i}}dx$
Note this is a exercise 4.57 in Krantz, complex analysis textbook. (Function theory of one complex variable)
First my trial is using $(A+B)(A-B)= A^2-B^2$, change above integral into the form of 
\begin{align}
\frac{1}{-3i}\int_{-\infty}^{\infty} e^{-ix} ( \sqrt{x+2i} - \sqrt{x+5i})dx
\end{align}
which seems no pole. 

I know the form of integral 
\begin{align}
\int_{-\infty}^{\infty} \frac{e^{-im z}}{\sqrt{z+ia}} = 2 e^{-m a} e^{-\frac{\pi i}{4}} \sqrt{\frac{\pi}{m}}
\end{align}
where $a$ and $m$ is positive.  I obtain above results by taking keyhole countour around branch cut $z=-i a$. $i.e$, take three parts $z=-ia + x e^{-\frac{i\pi}{2}}$, $z=-ia + \epsilon e^{i\theta}$, $z=-ia + x e^{\frac{i3\pi}{2}}$ where $\epsilon \leq x < \infty$ and $-\frac{\pi}{2} \leq \theta \leq \frac{3\pi}{2}$ and take limt $\epsilon \rightarrow 0$. 
But to apply this to above form to make 
\begin{align}
\sqrt{x+2i} + \sqrt{x+5i} =0 \qquad \Rightarrow \qquad \sqrt{x+2i} = -\sqrt{x+5i} = \sqrt{ix-5} \qquad x = \frac{-5-2i}{1-i}
\end{align}
 A: We take a branch of $\sqrt{z}$ as follows:$$
\sqrt{z}=\sqrt{r}e^{i\frac{\theta }{2}},\quad \quad z=re^{i\theta} \,\,\left(-\frac{\pi}{2}<\theta <\frac{3\pi}{2}\right)
.$$
Then $\sqrt{z}$ is analytic and single-valued in $\mathbb{C}\setminus [0,-i\infty)$.
We consider a contour $\Gamma$ consisting of the horizontal line segment $A=[-R, R]$, the quadrant $B$ of radius $R$ traced clockwise from $R$ to $-iR$, the line segment $C$ from $-iR$ to $-5i$, the line segment $D$ from $-5i$ to $-2i$, the line segment $E$ from $-2i$ to $-5i$, the line segment $F$ from $-5i$ to $-iR$ and the quadrant $G$ of radius $R$ traced clockwise from $-iR$ to $-R$. Ofcourse, for instance,  $C$ is the limit of $C_\varepsilon =[\varepsilon -5i, \varepsilon -iR]$ as $\varepsilon \to 0.$ 
See the diagram.
Since $\sqrt{z+2i}+\sqrt{z+5i}$ is single-valued inside $\Gamma$ (by the definition above) and has no zeros, we have $$
\int_\Gamma \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz=0$$
by Cauchy's theorem.
Since $\frac{1}{|\sqrt{z+2i}+\sqrt{z+5i}|} \to 0$ $(|z|\to \infty)$ uniformly, we have $$
\lim_{R\to \infty } \int_{B+G} \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz=0
$$
by Jordan's lemma.
We evaluate integrals on $C, F$.
\begin{align}
\int_C \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz&=\frac{i}{3}\int_C e^{-iz}(\sqrt{z+2i}-\sqrt{z+5i})\,dz\\
&=\frac{1}{3}\int_R^5 e^{-t}(\sqrt{-it+2i}-\sqrt{-it+5i})\,dt\quad (z=-it)\\
&=-\frac{1}{3}\int_5^R e^{-t}(e^{-\frac{\pi i}{4}}\sqrt{t-2}-e^{-\frac{\pi i}{4}}\sqrt{t-5})\,dt\\
&=\frac{-1+i}{3\sqrt{2}}\int_5^R e^{-t}(\sqrt{t-2}-\sqrt{t-5})\,dt.
\end{align}
Simirarly we have 
\begin{align}
\int_F \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz&=\frac{1}{3}\int_5^R e^{-t}(\sqrt{-it+2i}-\sqrt{-it+5i})\,dt\\
&=\frac{1}{3}\int_5^R e^{-t}(e^{\frac{3\pi i}{4}}\sqrt{t-2}-e^{\frac{3\pi i}{4}}\sqrt{t-5})\,dt\\
&=\frac{-1+i}{3\sqrt{2}}\int_5^R e^{-t}(\sqrt{t-2}-\sqrt{t-5})\,dt.
\end{align}
Therefore we have$$
\int_{C+F} \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz=\frac{(-1+i)\sqrt{2}}{3}\int_5^R e^{-t}(\sqrt{t-2}-\sqrt{t-5})\,dt.
$$
Next we evaluate integrals on $D, E$.
\begin{align}
\int_D \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz&=\frac{1}{3}\int_5^2 e^{-t}(\sqrt{-it+2i}-\sqrt{-it+5i})\,dt\\
&=-\frac{1}{3}\int_2^5 e^{-t}(e^{-\frac{\pi i}{4}}\sqrt{t-2}-e^{\frac{\pi i}{4}}\sqrt{5-t})\,dt\\
&=\frac{-1+i}{3\sqrt{2}}\int_5^R e^{-t}(\sqrt{t-2}-i\sqrt{5-t})\,dt.
\end{align}
Similarly we have
\begin{align}
\int_E \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz&=\frac{1}{3}\int_2^5 e^{-t}(\sqrt{-it+2i}-\sqrt{-it+5i})\,dt\\
&=\frac{1}{3}\int_2^5 e^{-t}(e^{\frac{3\pi i}{4}}\sqrt{t-2}-e^{\frac{\pi i}{4}}\sqrt{5-t})\,dt\\
&=\frac{-1+i}{3\sqrt{2}}\int_2^5 e^{-t}(\sqrt{t-2}+i\sqrt{5-t})\,dt.
\end{align}
Therefore we have$$
\int_{D+E} \frac{e^{-iz}}{\sqrt{z+2i}+\sqrt{z+5i}}\,dz=\frac{(-1+i)\sqrt{2}}{3}\int_2^5 e^{-t}\sqrt{t-2}\,dt.
$$
Thus,tending $R$ to $\infty$, we get
\begin{align}
\int_{-\infty}^\infty \frac{e^{-ix}}{\sqrt{x+2i}+\sqrt{x+5i}}\,dx&=-\frac{(-1+i)\sqrt{2}}{3}\left(\int_5^\infty e^{-t}(\sqrt{t-2}-\sqrt{t-5})\,dt+\int_2^5 e^{-t}\sqrt{t-2}\,dt\right)\\
&=\frac{(1-i)\sqrt{2}}{3}\left(\int_2^\infty e^{-t}\sqrt{t-2}\,dt-\int_5^\infty e^{-t}\sqrt{t-5}\,dt\right)\\
&=\frac{(1-i)\sqrt{2}}{3}(e^{-2}-e^{-5})\int_0^\infty e^{-u}\sqrt{u}\,du\\
&=\frac{(1-i)(e^{-2}-e^{-5})}{3}\sqrt{\frac{\pi}{2}}.
\end{align}
