Compute $\int _0 ^\infty \frac{x^\alpha}{1+x^2}\, \mathrm d x$ for $-1<\alpha<1$ I have to solve this problem:

Compute the value of the integral $$\int _0 ^\infty \frac{x^\alpha}{1+x^2}\, \mathrm d x,\quad -1<\alpha<1$$

Which is in my Complex Analysis textbook, so I assume I have to solve it using Complex Analysis even if the integral is real.
I tried integrating by parts:
$$\int _0 ^\infty \frac{x^\alpha}{1+x^2}\, \mathrm d x=\left.\vphantom {\frac{1}{2}}x^\alpha \arctan x \right\vert_0 ^\infty - \int _0 ^\infty \alpha x^{\alpha-1}\arctan x\, \mathrm d x$$
But this does not make sense, as the limit depends on the sign of $\alpha$. And surely there is another way that I am missing. Also, I don't know how to use the fact that $\alpha \in (-1,1)$.

By substituting $x=\tan\theta$ and exploiting Euler's beta function and the reflection formula for the $\Gamma$ function we have
$$ I(\alpha)=\int_{0}^{+\infty}\frac{x^\alpha}{1+x^2}\,dx = \color{red}{\frac{\pi}{2 \cos\left(\frac{\pi\alpha}{2}\right)}}$$
for any $\alpha\in(-1,1)$.
