Integrate $\tan^a(u)$ from 0 to $\pi/2$ I have this problem: 
$$\int_{0}^{\infty} \frac{x^a}{x^2+1}dx$$ with $0<a<1$.
I get the integral 
$$\int_{0}^{\frac{\pi}{2}}\tan^a(u)du,$$
But I can't solve any of the two problems, how can I solve it? thank you for your help.
 A: Substitute $x^2=t$ to obtain:
$$\frac{1}{2}\int_0^{\infty} \frac{t^{-\left(\frac{1-a}{2}\right)}}{1+t}\,dt$$
Consider the result:
$$\int_0^{\infty} \frac{t^{-b}}{1+t}\,dt=\Gamma(1-b)\Gamma(b)=\frac{\pi}{\sin(\pi b)}$$
where $0<b<1$. The proof of the result can be found here: 
Evaluate $\int_0^\infty\!\!\int_0^\infty\!\!\int_0^\infty\!\frac{(xyz)^{-1/7}(yz)^{-1/7}z^{-1/7}}{(x+1)(y+1)(z+1)}dx\,dy\,dz$ 
Since $0<\dfrac{1-a}{2}<1$ for the given range of $a$, the answer is:
$$\dfrac{1}{2}\dfrac{\pi}{\sin\left(\frac{\pi}{2}(1-a)\right)}=\boxed{\dfrac{\pi}{2\cos\left(\frac{\pi a}{2}\right)}}$$
A: All integrals of the form $~\displaystyle\int_0^\infty\frac{x^{a-1}}{x^n+b^n}dx~$ can be shown to equal $~b^{a-n}\cdot\dfrac\pi n\cdot\csc\bigg(a\cdot\dfrac\pi n\bigg)~$ for 
$n>a>0$ and $b>0$. This can be proven by letting $x=b~t$, and $~u=\dfrac1{t^n+1}$ , then recognizing 
the expression of the beta function in the new integral, and employing Euler's reflection formula for 
the $\Gamma$ function, where $\csc y=\dfrac1{\sin y}$ .
A: This is a different approach using complex analysis:
We choose the representation of the logarithm such that the branch cut runs along the positive real axis. We then have ($z^a =\exp ( a \log z)$)
$$\int_0^\infty \!dx\,\frac{ x^a}{x^2+1}= \frac{1}{1-\exp(2\pi i a)}\int_C\!dz\,\frac{z^a}{1+z^2} $$
where $C$ is a contour which starts at $+\infty$ and runs down to 0 along the lower branch, encircles the branch point at 0 and then runs up to $+\infty$ along the upper branch of the logarithm. As $0<a<1$ the contour around the branch point does not contribute (the integrand is smaller than $|z|$) and the contribution of along the lower branch is $-\exp(2\pi i a)$ times the integral which we want to calculate.
Next, we realize that we can close the contour $C$ with a circle at $|z|=\infty$. This additional contour does not contribute as $0<a<1$ as the integrand falls off faster than $1/|z|$ at infinity. Thus we have by the residue theorem
$$\int_0^\infty \!dx\,\frac{ x^a}{x^2+1}=\frac{2\pi i}{1-\exp(2\pi i a)} \sum_{z^*=\pm i} \mathop{\rm Res}_{z=z^*} \frac{z^a}{1+z^2}. $$
We easily find
$$\mathop{\rm Res}_{z=i} \frac{z^a}{1+z^2} = \frac{e^{a \log i}}{2i} = \frac{e^{i \pi a/2}}{2i}, \quad
\mathop{\rm Res}_{z=i} \frac{z^a}{1+z^2} =- \frac{e^{a \log (-i)}}{2i} = -\frac{e^{3i \pi a/2}}{2i}.$$
And thus the final result reads
$$\int_0^\infty \!dx\,\frac{ x^a}{x^2+1} =
\frac{\pi}{1-\exp(2\pi i a)}(e^{i \pi a/2} - e^{3i \pi a/2} ) 
= \frac{\pi}{2 \cos(\pi a/2)} .$$
A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
\begin{align}&\color{#66f}{\Large\int_{0}^{\infty}{x^{a} \over x^{2} + 1}\,\dd x}
=\int_{0}^{\infty}x^{a}\int_{0}^{\infty}\expo{-\pars{x^{2} + 1}t}\,\dd t\,\dd x
\\[3mm]&=\int_{0}^{\infty}\expo{-t}\
\pars{\overbrace{\int_{0}^{\infty}x^{a}\expo{-t\,x^{2}}\,\dd x}
^{\ds{\mbox{Set}\ tx^{2} \equiv \xi\ \imp\ x = t^{-1/2}\xi^{1/2}}}}\ \,\dd t
\\[3mm]&=\int_{0}^{\infty}\expo{-t}\int_{0}^{\infty}t^{-a/2}\xi^{a/2}\expo{-\xi}
\bracks{t^{-1/2}\pars{\half\,\xi^{-1/2}}}\,\dd \xi\,\dd t
\\[3mm]&=\half\,\bracks{\int_{0}^{\infty}t^{-\pars{a + 1}/2}\expo{-t}\,\dd t}
\bracks{\int_{0}^{\infty}\xi^{\pars{a - 1}/2}\expo{-\xi}\,\dd\xi}
=\half\,\Gamma\pars{-\,{a \over 2} + \half}\Gamma\pars{{a \over 2} + \half}
\\[3mm]&=\half\,{\pi \over \sin\pars{\pi\bracks{a/2 + 1/2}}}
=\color{#66f}{\Large{\pi \over 2\cos\pars{\pi a/2}}}\,,
\qquad\qquad\color{#f88}{\Large{\verts{\Re\pars{a}} < 1}}
\end{align}
