All right!... may be it is useful to examine the more general case...

$\displaystyle I= \int_{0}^{\infty} \frac{x^{p}}{1+x^{2}}\ dx\ ,\ -1<p<0$ (1)

As said above the solution is in the computation of the integral...

$\displaystyle \int_{\gamma} f(z)\ dz = \int_{\gamma} \frac{z^{p}}{1+z^{2}}\ dz$ (2)

... along the 'red path' $\displaystyle \gamma$ of the figure...

The procedure is a lottle long and it is better to devide it into two steps. The first step is the computation of the integral (2) that is done by the Cauchy integral formula...

$\displaystyle \int_{\gamma} f(z)\ dz = 2 \pi\ i\ \sum_{i} r_{i} $ (3)

In our case f(z) inside $\displaystyle \gamma$ has two simple poles: $\displaystyle z=i$ and $\displaystyle \z=-i$ and their residues are...

$\displaystyle r_{1}= \lim_{z \rightarrow i} (z-i)\ \frac{z^{p}}{1+z^{2}}= \frac{e^{i\ \frac{\pi\ p}{2}}}{2i}$ (4)

$\displaystyle r_{2}= \lim_{z \rightarrow -i} (z+i)\ \frac{z^{p}}{1+z^{2}}= -\frac{e^{-i\ \frac{\pi\ p}{2}}}{2i}$ (5)

... so that the integral (3) is...

$\displaystyle \int_{\gamma} f(z)\ dz = 2 \pi\ i\ \sum_{i} r_{i}= 2 \pi\ i\ \sin \frac{\pi\ p}{2} $ (6)

... and the first step is done...