TITLE: Scary contour integral, but is also an integral representation for $\Gamma$-function
QUESTION [15 upvotes]: This problem is supposed to be from an old Acta Mathematica volume I circa 1880's, and is attributed to Bourguet.

By using a parabola with its focus on the origin as a contour, show that:
$$\int_{0}^{\infty}e^{-ax^{2}}(1+x^{2})^{z-1/2}\cos(2ax+(2z-1)\tan^{-1}(x))dx=\frac{\sin(\pi z)\Gamma(z)}{2a^{z}e^{a}}$$

I am not a total cabbage head with contour integration, yet certainly not along the lines of Ron G, RV, robjohn, et. al.
But, this thing looks nasty. Sometimes looks can be deceiving.
I have never used a parabola as a contour. The closest thing I can think of is a Hankel contour. That is not exactly a parabola, but is commonly used with the Gamma function integral. A Hankel looks more like a bobby pin. But, if anyone would care to exert their contour integration prowess, it would be nice to see this one worked out.

REPLY [9 votes]: This answer is along the same lines as achille hui's with subtle differences, but I've tried to provide more detail. Let's start with
$$
\begin{align}
&\cos(2ax+(2z-1)\tan^{-1}(x))\\
&=\frac12\left[e^{i2ax+i(2z-1)\tan^{-1}(x)}+e^{-i2ax-i(2z-1)\tan^{-1}(x)}\right]\\
&=\frac12\left[e^{i2ax}\left(\frac{1+ix}{\sqrt{1+x^2}}\right)^{2z-1}+e^{-i2ax}\left(\frac{1-ix}{\sqrt{1+x^2}}\right)^{2z-1}\right]\\
&=\mathrm{Re}\left[e^{i2ax}\left(\frac{1+ix}{\sqrt{1+x^2}}\right)^{2z-1}\right]\tag{1}
\end{align}
$$
which follows because
$$
\begin{align}
e^{\pm i\tan^{-1}(x)}
&=\cos(\tan^{-1}(x))\pm i\sin(\tan^{-1}(x))\\
&=\frac{1\pm ix}{\sqrt{1+x^2}}\tag{2}
\end{align}
$$
Therefore,
$$
\begin{align}
&\int_0^\infty e^{-ax^2}(1+x^2)^{z-1/2}\cos(2ax+(2z-1)\tan^{-1}(x))\,\mathrm{d}x\tag{3}\\
&=\frac12\int_{-\infty}^\infty e^{-ax^2}(1+x^2)^{z-1/2}\cos(2ax+(2z-1)\tan^{-1}(x))\,\mathrm{d}x\tag{4}\\
&=\frac12\mathrm{Re}\left[\int_{-\infty}^\infty e^{-ax^2}e^{i2ax}(1+ix)^{2z-1}\,\mathrm{d}x\right]\tag{5}\\
&=\frac12\mathrm{Re}\left[e^{-a}e^{i\pi(z-1/2)}\int_{-\infty}^\infty e^{-a(x-i)^2}(x-i)^{2z-1}\,\mathrm{d}x\right]\tag{6}\\
&=\frac14\mathrm{Re}\left[e^{-a}e^{i\pi(z-1/2)}\int_{\gamma_1} e^{-aw}w^{z-1}\,\mathrm{d}w\right]\tag{7}\\
&=\frac14\mathrm{Re}\left[e^{-a}e^{i\pi(z-1/2)}\int_{\gamma_2} e^{-aw}w^{z-1}\,\mathrm{d}w\right]\tag{8}\\
&=\frac14\mathrm{Re}\left[e^{-a}e^{i\pi(z-1/2)}(1-e^{-2\pi iz})\int_0^\infty e^{-at}t^{z-1}\,\mathrm{d}t\right]\tag{9}\\
&=\frac12\mathrm{Re}\left[e^{-a}\sin(\pi z)\,a^{-z}\Gamma(z)\right]\tag{10}\\
&=\frac{\sin(\pi z)\Gamma(z)}{2\,a^ze^a}\tag{11}
\end{align}
$$
Explanation:
$\:\ (4)$: the integrand is even so duplicate the domain and divide by $2$
$\:\ (5)$: apply $(1)$
$\:\ (6)$: complete the square in the exponential and factor out $e^{i\pi(z-1/2)}$
$\:\ (7)$: substitute $w=(x-i)^2$: $\gamma_1$ is the counterclockwise parabola $x=\frac14y^2-1$
$\:\ (8)$: change the contour: $\gamma_2$ is $[\infty,0]+i\epsilon\cup i\epsilon[1,-1]\cup[0,\infty]-i\epsilon$
$\:\ (9)$: substitute $w=t$ along the bottom of $[0,\infty]$ and $w=e^{-2\pi i}t$ along the top
$(10)$: use the definition of $\sin(z)$ and $\Gamma(z)$
$(11)$: apply $\mathrm{Re}$