Determine the following integral (very difficult) So we let $\sqrt{z}$ be the principal value square root of $z$ (i.e. with $\sqrt{1} = 1$ and branch cut along the negative real axis), also let $a \in \mathbb{R}^+$.
Determine the following integral:
$$ \int_{-\infty}^{\infty} \frac{ \sqrt{a+ix} }{ a^2 + x^2 } dx $$
Usually I try it myself before I post it here but I really can't figure this one out. This is one of the most difficult integral I have ever faced. 
Even if you can give me a hint that would be great !
 A: It isn't actually very difficult to compute the integral. The trick is just to use the lower half-plane for the application of the residue theorem rather than the upper.
The function $f(z) = \sqrt{a+iz}$ is holomorphic on the half-plane $\operatorname{Im} z < a$, and for large $\lvert z\rvert$ in that half-plane we have
$$\left\lvert \frac{f(z)}{a^2+z^2}\right\rvert \leqslant \frac{C}{\lvert z\rvert^{3/2}},$$
so the integral
$$\int_{C_R} \frac{f(z)}{a^2+z^2}\,dz$$
where $C_R$ is a semicircle in the lower half-plane with centre $0$ and radius $R$ tends to $0$ for $R\to\infty$. Thus the residue theorem gives us
\begin{align}
\int_{-\infty}^\infty \frac{f(x)}{a^2+x^2}\,dx
&= \lim_{R\to\infty} \left(\int_{-R}^R \frac{f(z)}{a^2+z^2}\,dz -\int_{C_R}\frac{f(z)}{a^2+z^2}\,dz\right)\\
&= -2\pi i \operatorname{Res} \left(\frac{f(z)}{a^2+z^2}; -ia\right)\\
&= -2\pi i \frac{f(-ia)}{-2ia}\\
&= \frac{\pi}{a} \sqrt{a+i(-ia)}\\
&= \pi\sqrt{\frac{2}{a}},
\end{align}
where the factor by which the residue is multiplied is $-2\pi i$ instead of the usual $2\pi i$ because the contour winds around the pole $-ia$ with negative orientation.
