Integral $\int_{-\infty}^{\infty}\frac{\cos(s \arctan(ax))}{(1+x^2)(1+a^2x^2)^{s/2}}dx$ Prove that:
$$
\int_{-\infty}^{\infty}{\cos\left(\vphantom{\Large A}
s\ \arctan\left(\vphantom{\large A}ax\right)\right)\over
\left(1 + x^{2}\right)\left(1 + a^{2}x^{2}\right)^{s/2}}\,{\rm d}x
={\pi \over \left(1 + a\right)^{s}}$$
where $a,s \in \mathbb{R}^{+}$.
This looks difficult. What would be a good start? Can we use the Residue Theorem?
 A: This may be done with a contour integration. Consider the integral
$$\oint_C dz \frac{e^{i s \arctan{a z}}}{(1+z^2)(1+a^2 z^2)^{s/2}}$$
where $a>0$ and $C$ is a contour that is a semicircle in the upper half plane, except that it detours up just to the left of the imaginary axis to $z=i/a$, around that point, and the back down just to the right of the imaginary axis to the real axis, where it continues along the semicircle.  This detour is needed to avoid the branch point at $z=i/a$.  
In this way, note that there is a pole within $C$ at $z=i$ only when $a>1$.  When $a<1$, then there is no pole within $C$ and the integral is zero.  So consider the case when $a>1$.  This contour integral is zero except along the real axis.  To see this, note that along the outer semicircle of radius $R$, the integral is bounded by
$$\frac{R}{R^{2+s}} \left | \int_0^{\pi} d\theta e^{-s \mathrm{arctanh}(a R \sin{\theta})} \right | \sim \frac{1}{R^{1+s}}$$  
which vanishes when $s>-1$.  I will assume this for the result.  The integrals along the vertical pieces cancel.  The integral about the branch point $z=i/a$ may be parametrized as $z=i/a + t e^{i \phi}$, where $t \rightarrow 0$.  Then we get a term for small $t$ as follows:
$$i (2 a)^{s/2} t^{1-(s/2)} \frac{e^{-s \mathrm{arctanh}(1)}}{1-1/a^2} \int_0^{2 \pi} d \phi e^{i (1-s/2) \phi} = 0$$
when $s \ne 2$.  I will consider the case of $s=2$ later.
Then the integral along the real axis is equal $i 2 \pi$ times to the residue at the pole $z=i$.  This is
$$i 2 \pi  \frac{e^{-s \mathrm{arctanh}(a)}}{2 i (1-a^2)^{s/2}}$$
Use the fact that 
$$\mathrm{arctanh}(a) = \frac{1}{2} \log{\left ( \frac{1+a}{1-a} \right )}$$
and we finally get
$$\int_{-\infty}^{\infty} dx \frac{e^{i s \arctan{a x}}}{(1+x^2)(1+a^2 x^2)^{s/2}} = \frac{\pi}{(1+a)^s}$$
Because the result of the complex conjugate requires using the contour in the lower half-plane, we get an identical result for this.  We may then say that
$$\int_{-\infty}^{\infty} dx \frac{\cos{( s \arctan{a x})}}{(1+x^2)(1+a^2 x^2)^{s/2}} = \frac{\pi}{(1+a)^s}$$
when $s>-1$ and $a>1$.
When $s=2$, we may make a substitution of $u=\arctan{a x}$ and the integral becomes
$$2 a \int_0^{\pi/2} du \frac{\cos{2 u}}{a^2 + \tan^2{u}} = \frac{\pi}{(1+a)^2}$$
so the $s=2$ case is covered.
It does seem to me that $a<1$ should also be covered by this result, but I would need to rethink the contour.
A: 
I can't resist the temptation to answer this problem. The integral really makes me excited! ٩(˘◡˘)۶

Here is a non-contour/ residue approach. We have a classic result
\begin{equation}
 \int_{0}^{\infty} y^{s-1}\cos (a y)\,e^{-by}\,dy = \Gamma (s)\frac{\cos \left(\! s \arctan \left(\frac{a}{b}\right)\right)}{\left(a^2+b^2\right)^{s/2}},\quad\mbox{for}\quad \Re(s),\, a,\,b>0.\tag{1}
\end{equation}
where it can easily be proved by using
\begin{equation}
\Re\int_{0}^{\infty} y^{s-1}e^{-(b-ia)y}\,dyt = \Re\left[ \frac{\Gamma (s)}{(b-ia)^s}\right]\tag{2}
\end{equation}
Putting $a=ax$ and $b=1$ to $(1)$, then dividing by $\dfrac{1}{1+x^2}$ and taking the integral both of sides, we have
\begin{equation}
\int_{-\infty}^{\infty}\int_{0}^{\infty} \frac{y^{s-1}\cos (axy)\,e^{-y}}{1+x^2}\,dy\,dx = \Gamma (s)\int_{-\infty}^{\infty}\frac{\cos \left(\! s \arctan \left(ax\right)\right)}{(1+x^2)\left(1+a^2x^2\right)^{s/2}}\,dx\tag{3}
\end{equation}
Changing the order of integration on the LHS which can be justified by using Fubini's theorem we have
\begin{equation}
\int_{0}^{\infty}y^{s-1}\,e^{-y}\int_{-\infty}^{\infty} \frac{\cos (ay\,x)}{1+x^2}\,dx\,dy = \Gamma (s)\int_{-\infty}^{\infty}\frac{\cos \left(\! s \arctan \left(ax\right)\right)}{(1+x^2)\left(1+a^2x^2\right)^{s/2}}\,dx\tag{4}
\end{equation}
Using another classic result
\begin{equation}
\int_{-\infty}^{\infty} \frac{\cos nx}{1+x^2}\,dx=\pi e^{-n}\tag{5}
\end{equation}
then we obtain
\begin{align}
\int_{0}^{\infty}y^{s-1}\,e^{-y}\int_{-\infty}^{\infty} \frac{\cos (ay\,x)}{1+x^2}\,dx\,dy &=\pi\int_{0}^{\infty}y^{s-1}\,e^{-(1+a)y}\,dy\\
&=\frac{\pi\,\Gamma (s)}{(1+a)^s}\tag{6}
\end{align}
Thus, by putting $(6)$ to $(4)$, we obtain
\begin{equation}
\int_{-\infty}^{\infty}\frac{\cos \left(\! s \arctan \left(ax\right)\right)}{(1+x^2)\left(1+a^2x^2\right)^{s/2}}\,dx=\frac{\pi}{(1+a)^s}
\end{equation}
which is the announced result.$\qquad\square$ 
A: Assume that $a \ge 0$ and  $s > -1$.  
Using the principal branch of the logarithm, $$\begin{align}  \text{Re} \ (1-iax)^{-s} &= \text{Re} \ (1+a^{2}x^{2})^{-s/2} \ e^{-is\arctan (-ax)} \\ &= \text{Re} \ (1+a^{2}x^{2})^{-s/2} \ e^{i s \arctan (ax)
} \\  &= \frac{\cos (s \arctan ax)}{(1+a^{2}x^{2})^{s/2}} . \end{align}$$
Therefore,
$$ \int_{-\infty}^{\infty} \frac{\cos (s \arctan ax)}{(1+x^{2})(1+a^{2}x^{2})^{s/2}} \ dx = \text{Re} \int_{-\infty}^{\infty} \frac{1}{(1+x^{2})(1-iax)^{s}} \ dx .$$
Now since $a \ge 0$, $ \displaystyle f(z) = \frac{1}{(1+z^{2})(1-iaz)^{s}}$ is meromorphic in the upper half-plane.
And since  $s>-1$, $ \displaystyle \int f(z) \ dz$ will vanish along the upper half of the circle $|z|=R$ as $ R \to \infty$.
So under these conditions,
$$\begin{align} \int_{-\infty}^{\infty} \frac{\cos (s \arctan ax)}{(1+x^{2})(1+a^{2}x^{2})^{s/2}} \ dx &= \text{Re} \ 2 \pi i \ \text{Res}[f(z),i] \\ &= \text{Re} \ 2 \pi i \lim_{z \to i} \frac{1}{(z+i)(1-iaz)^{s}} \\ &= \frac{\pi}{(1+a)^{s}} . \end{align}$$
