Here is the integral I am interested in evaluating using contour integration:
Prove that: $$\int_0^\infty \frac{{\rm d}x}{(1+x^2)(1+x^r)}=\frac{\pi}{4}$$
That is that the above integral is independant of $r$ which is assumed to be a positive real number.
I have a couple of approaches using real analysis. For instance,
$$\begin{align*} \int_{0}^{\infty}\frac{{\rm d}x}{\left ( 1+x^2 \right )\left ( 1+x^r \right )} &=\int_{0}^{1}\frac{{\rm d}x}{\left ( 1+x^2 \right )\left ( 1+x^r \right )}+ \int_{1}^{\infty}\frac{{\rm d}x}{\left ( 1+x^2 \right )\left ( 1+x^r \right )} \\ &\overset{u=1/x}{=\! =\! =\!}\int_{0}^{1}\frac{{\rm d}x}{\left ( 1+x^2 \right )\left ( 1+x^r \right )} +\int_{0}^{1}\frac{x^r}{\left ( x^2+1 \right )\left ( 1+x^r \right )}\, {\rm d}x \\ &= \require{cancel} \int_{0}^{1}\frac{\cancel{x^r+1}}{\left ( x^2+1 \right )\cancel{\left ( x^r+1 \right )}}\, {\rm d}x \\ &= \int_{0}^{1}\frac{{\rm d}x}{x^2+1}\\ &= \arctan 1 = \frac{\pi}{4} \end{align*}$$
or by applying the sub $x=\tan u$ we have that:
$$\begin{align*} \int_{0}^{\infty}\frac{{\rm d}x}{\left ( 1+x^2 \right )\left ( 1+x^r \right )} &\overset{x=\tan u}{=\! =\! =\! =\!}\int_{0}^{\pi/2}\frac{\sec^2 u}{\left ( 1+\tan^2 u \right )\left ( 1+\tan^r u \right )}\, {\rm d}u \\ &=\int_{0}^{\pi/2}\frac{{\rm d}u}{1+\tan^r u} \\ &= \int_{0}^{\pi/2}\frac{{\rm d}u}{1+\cot^r u} \end{align*}$$
Since $\cot u = 1/\tan u$ the last integral is evaluated easily again at $\pi/4$.
A third approach would be to kill it directly with the sub $u=1/x$ which leads to, if we name the initial integral $I$,
$$I= \frac{\pi}{2}-I$$
and the result follows.
Now, what I am interested in here is to evaluate this using contour integration. I have a feeling that the contour will be a wedge shaped contour with some angle, let me call that $\omega$, but that $r$ cause some problems. Therefore I don't know how to integrate it using complex analysis. Any help appreciated.