Integral representation of the modified Bessel function of the second kind for $\nu=0$ The modified Bessel function of the second kind $K_\nu(\xi)$ for $\nu=0$ is the Fourier transform of $\frac{1}{2\sqrt{x^2+1}}$:
\begin{align}
2K_0(\xi) = \int_{-\infty}^\infty \frac{e^{i\xi x}}{\sqrt{x^2+1}} \mathrm{d}x \,. \tag{1}
\end{align}
How can this be derived from the general integral representation
\begin{align}
K_\nu(\xi) = \int_0^\infty e^{-\xi \cosh(x)} \cosh(\nu x) \mathrm{d}x \tag{2}
\end{align}
and how do we derive this general identity in the first place? On Wikipedia it says that (1) can be proven by evaluating (2) in the complex plane.
I have not dealt with special functions and all their different forms of representation to a great extent before, so any help is much appreciated.
 A: I will prove that $(1)$ and $(2)$ are equivalent definitions for $K_0$:
$$ K_0(\xi)=\frac{1}{2}\int_{-\infty}^{+\infty}\frac{e^{i\xi x}}{\sqrt{x^2+1}}\,dx=\int_{0}^{+\infty}\frac{\cos(\xi x)}{\sqrt{x^2+1}}\,dx \tag{1} $$
$$ K_0(\xi) = \int_{0}^{+\infty} \exp\left(-\xi \cosh x\right)\,dx. \tag{2} $$
It is enough to show that $(1)$ and $(2)$ have the same Laplace transform. 
The Laplace transform of the function defined by $(1)$ is given by
$$ \int_{0}^{+\infty}\frac{s}{(s^2+x^2)\sqrt{x^2+1}}\,dx \stackrel{x\mapsto\sinh(x)}{=} \int_{0}^{+\infty}\frac{s}{s^2+\sinh^2(x)}\,dx \tag{L1}$$
while the Laplace transform of the function defined by $(2)$ is
$$ \int_{0}^{+\infty}\frac{1}{s+\cosh(x)}\,dx.\tag{L2} $$
Through the substitution $x=\log u$ and integration by parts it is very simple to check that both $(L1)$ and $(L2)$ boil down to
$$ \int_{1}^{+\infty}\frac{2\,du}{1+2su+u^2}=\int_{0}^{1}\frac{2\,du}{1+2su+u^2} $$
and this finishes the proof. In other terms, both $(1)$ and $(2)$ show that $K_0(\xi)$ is the inverse Laplace transform of the analytic continuation of $$\frac{2}{\sqrt{1-s^2}}\,\arctan\sqrt{\frac{1-s}{1+s}}, $$
which equals $\frac{1}{\sqrt{s^2-1}}\,\operatorname{arctanh}\sqrt{1-\frac{1}{s^2}}$ for $s>1$.
A: Using the principal branch of the logarithm, let's integrate the function $$\frac{e^{i \xi z}}{2 \sqrt{1+z^{2}}}, \quad \xi >0,$$ around a semicircular contour in the upper half of the complex plane that is deformed around the branch cut on $[i, i \infty$).
(It looks exactly like the contour used here.)
According to Jordan's lemma, the integrals along the two big arcs vanish as their radii go to infinity.
So we get $$ \int_{-\infty}^{\infty} \frac{e^{i \xi x}}{2 \sqrt{1+x^{2}}} \, \mathrm dx + \int_\infty^1 \frac{e^{i \xi (it)}}{2 \sqrt{|1+(it)^2|e^{i \pi}}} \, i\, \mathrm dt + \int_1^\infty \frac{e^{i \xi (it)}}{2 \sqrt{|1+(it)^2|e^{-i \pi}}} \, i\mathrm \,  dt=0.$$
And rearranging, we get $$ \begin{align} \int_{-\infty}^{\infty} \frac{e^{i \xi x}}{2 \sqrt{1+x^{2}}} \, \mathrm dx &= \frac{i \left(e^{-i \pi /2}-e^{i \pi/2} \right)}{2}\int_{1}^{\infty} \frac{e^{-\xi t}}{\sqrt{t^2-1}} \, \mathrm dt \\ &= \int_{1}^{\infty} \frac{e^{-\xi t}}{\sqrt{t^2-1}} \, \mathrm dt \\ & = \int_{0}^{\infty} e^{- \xi \cosh u} \, \mathrm du. \end{align}$$

I ignored the small circle of radius $\epsilon$ about the branch point at $z=i$ since the absolute value of the integral on that circle is bounded above by $$2 \pi e^{-x(1- \epsilon)} \epsilon (2 \epsilon- \epsilon^{2})^{-1/2} = 2 \pi e^{-x(1- \epsilon)} \left(\frac{2}{\epsilon}-1 \right)^{-1/2}, $$ which vanishes as $\epsilon \to 0$.
All I did was use the ML inequality and the reverse triangle inequality.
