# Confused on a Real Integral Using an Igloo Contour

I'm currently attempting to solve the following real integral: $$I = \int_{0}^{\infty} \frac{dx}{x^{m}(x^{2}+1)} \hspace{1 cm} m \in (-1,1)$$ With the usage of the following contour: "Igloo" Contour

My attempt to solve it went along like so: $$J = \int_{\gamma_{\epsilon, R}} \frac{dz}{z^{m}(z^{2}+1)} = 2\pi i \mathrm{Res}(i) = 2\pi i \bigg(\frac{1}{2i \cdot i^{m}}\bigg) = \frac{\pi}{i^{m}}$$ $\gamma_{\epsilon} = \text{Semi-circle of radius }\epsilon \text{ around the origin.}$

$\gamma_{R} = \text{Semi-circle of radius }R \text{ around the origin.}$

$$J = \int_{\epsilon}^{R} \frac{dz}{z^{m}(z^{2}+1)} + \int_{\gamma_{R}} \frac{dz}{z^{m}(z^{2}+1)} + \int_{-R}^{-\epsilon} \frac{dz}{z^{m}(z^{2}+1)} + \int_{\gamma_{\epsilon}} \frac{dz}{z^{m}(z^{2}+1)}$$

For large $R$: $$\int_{\gamma_{R}} \frac{dz}{z^{m}(z^{2}+1)} = \int_{0}^{\pi} \frac{iRe^{i \theta} d\theta}{R^{m}e^{i \theta m}(R^{2}e^{2i\theta}+1)} = 0$$

For small $\epsilon$: $$\int_{\gamma_{\epsilon}} \frac{dz}{z^{m}(z^{2}+1)} = \int_{\pi}^{0} \frac{i\epsilon e^{i \theta} d\theta}{\epsilon^{m}e^{i \theta m}(\epsilon^{2}e^{2i\theta}+1)} = i \int_{\pi}^{0} \frac{\epsilon^{1 - m} e^{i \theta (1 - m)}}{\epsilon^{2}e^{2i\theta}+1} d\theta = 0?$$

Then I have: $$J = \int_{\epsilon}^{R} \frac{dz}{z^{m}(z^{2}+1)} + \int_{-R}^{-\epsilon} \frac{dz}{z^{m}(z^{2}+1)} = \int_{-\infty}^{\infty} \frac{dz}{z^{m}(z^{2}+1)}$$

At this point, I have a very strong feeling that I'm not approaching this problem properly, and it is leaving me very confused. I have tried searching around for help with this kind of problem, but I have not found anything. Any help would be appreciated.

You're right that the integral over the entire contour is $$\frac{\pi}{i^m} = \pi e^{-im\pi/2}.$$
Yes, the big semicircle vanishes as $R\to \infty$ since the integrand does like $\frac{1}{z^{2+m}}$ at $\infty$ and $m>-1.$
Yes, the little semicircle vanishes as $\epsilon \to 0$ since the integrand goes like $\frac{1}{z^m}$ near the origin and $m<1.$
Then the part along the positive real axis is $$\int_{0}^\infty \frac{1}{x^m(x^2+1)}dx \equiv I$$ The part along the negative real axis is $$\int_{-\infty}^0\frac{1}{x^m(x^2+1)}dx = \int_0^\infty \frac{1}{(-x)^m(x^2+1)}dx =\int_0^\infty \frac{1}{e^{i\pi m}x^m(x^2+1)}dx =e^{-im\pi}I$$ so we have $$(1+e^{-i\pi m}) I = \pi e^{-im\pi/2}$$ so $$I = \frac{\pi}{2\cos\left(\frac{m\pi}{2}\right)}$$