How to do this integral?(it is a Contest questions...) (I am sorry it's the first time I ask question...)
I don't know how to use mathematical analysis to computer, maybe it need complex analysis to do but I have not learned it.
I just add my solution.
First I think it is a function of "p". So I differentiate it ,than maybe it will be simplified.But it makes no sense...
$\int_{0}^{\infty} \frac{x^{p}}{1+x^{2}} dx$ $p\in(-1,1)$
I don't know the answer .
Thanks a lot.
 A: $$I(p)=\int_{0}^{\infty} \frac{x^{p}}{1+x^{2}} dx=\frac{1}{2}\int_{-\infty}^{\infty}\frac{\exp\ p t}{\cosh t}\,dt=\frac{1}{2}\int_{-\infty}^{\infty}\frac{\cosh\ p t}{\cosh t}\,dt$$
So, set $f(z)=\frac{\cosh pz}{\cosh z}$, take some large $R$ (we will ultimately take $R\to\infty$) and consider the complex rectangular contour $\gamma_R$ with corners at $\pm R,\pm R+i\pi$, oriented counterclockwise.
Consider $\int_{\gamma_R}f(z)\,dz$, and decompose it as $I_1+I_2+I_3+I_4$ as:


*

*$I_1$, the integral along the bottom of the rectangle, is $\int_{-R}^Rf(t)\,dt$

*$I_3$, the integral along the top of the rectangle, from right to left, is 
$$-\int_{-R}^Rf(t+i\pi)\,dt=\int_{-R}^R\frac{-\cosh(pt+i\pi p)}{\cosh(t+i\pi)}\,dt$$


$$=\int_{-R}^R\frac{\cosh pt\cosh i\pi p-\sinh pt \sinh i\pi p}{\cosh t}\,dt=\cosh i\pi pI_1=\cos \pi p I_1$$


*

*$I_2$, the integral up the right side of the rectangle, is 
$$\int_0^\pi f(R+it)i\,dt=O(\exp(-(1-|p|)R))\to 0$$

*$I_4$, the integral down the left hand side of the rectangle, is
$$\int_0^\pi -f(-R+it)i\,dt=O(\exp(-(1-|p|)R))\to 0$$
Finally, the integral around the contour is just $2\pi i\text{Res}(f,i\pi/2)=2\pi i \frac{\cosh(i\pi p/2)}{\sinh i\pi/2}=2\pi\cos\frac{\pi p}{2}$.
Noting that as $R\to\infty,I_1\to2I(p):$
$$(1+\cos\pi p)(2I(p))=2\pi\cos\frac{\pi p}{2}\implies I(p)=\frac{\pi}{2\cos\frac{\pi p}{2}}$$
