Integral $\int_0^{\infty} \frac{x^{a-1}}{1+x} dx $ converges? For what values ​​of $a \in \mathbb{R}$ the following integral converges?
$$\int_0^{\infty} \frac{x^{a-1}}{1+x}\ dx $$
I tried to compute the integral but I stuck solving and then I tried to compare in various regions but I stuck, some help for this please.
 A: Roughly speaking, if $a\le 0$, then there is trouble at $0$. If $a\ge 1$, there is trouble "at" infinity. And in the interval $(0,1)$ there is no trouble anywhere.
Case 1: Let $a\le 0$. Then for $0\lt x\le 1$ we have $\frac{x^{a-1}}{1+x} \ge \frac{1}{2x}$.
But $\int_0^1 \frac{1}{2x}\,dx$ diverges, and therefore by Comparison so does our integral. 
Case 2: Let $a\ge 1$. Then for $x\ge 1$ we have $\frac{x^{a-1}}{1+x} \ge \frac{1}{1+x}\ge \frac{1}{2x}$. But $\int_1^\infty \frac{1}{2x}\,dx$ diverges, and therefore by Comparison so does our integral. 

Case 3: Let $0\lt a\lt 1$. We show that both $\int_0^1 \frac{x^{a-1}}{1+x}\,dx$ and $\int_0^\infty \frac{x^{a-1}}{1+x}\,dx$ converge, and therefore so does our integral.
(i) Integral from $0$ to $1$: In the interval $0\lt x\le 1$, we have $0\lt \frac{x^{a-1}}{1+x}\lt \frac{1}{x^{1-a}}$. Since $1-a\lt 1$, the integral $\int_0^1 \frac{1}{x^{1-a}}\,dx$ converges, and therefore so does our integral. 
(ii) Integral from $1$ to $\infty$: In the interval $[1,\infty)$, we have $\frac{x^{a-1}}{1+x}\lt \frac{1}{x^{2-a}}$. But $2-a\gt 1$, so $\int_1^\infty \frac{1}{x^{2-a}}\,dx$ exists, and therefore by Comparison so does our integral. 
A: Let's generalize the problem. We will evaluate
$$
\int_0^\infty\dfrac{x^{\large a-1}}{1+x^b}\ dx.
$$
Let $$y=\dfrac{1}{1+x^b}\quad\Rightarrow\quad x=\left(\dfrac{1-y}{y}\right)^{\large\frac1b}\quad\Rightarrow\quad dx=-\left(\dfrac{1-y}{y}\right)^{\large\frac1b-1}\ \dfrac{dy}{by^2}\ ,$$ then
\begin{align}
\int_0^\infty\dfrac{x^{\large a-1}}{1+x^b}\ dx&=\int_0^1 y\left(\dfrac{1-y}{y}\right)^{\large\frac{a-1}b}\left(\dfrac{1-y}{y}\right)^{\large\frac1b-1}\ \dfrac{dy}{by^2}\\&=\frac1b\int_0^1y^{\large1-\frac{a}{b}-1}(1-y)^{\large\frac{a}{b}-1}\ dy,
\end{align}
where the last integral in RHS is Beta function.
$$
\text{B}(x,y)=\int_0^1t^{\ \large x-1}\ (1-t)^{\ \large y-1}\ dt=\frac{\Gamma(x)\cdot\Gamma(y)}{\Gamma(x+y)}.
$$
Hence
\begin{align}
\int_0^\infty\dfrac{x^{\large a-1}}{1+x^b}\ dx&=\frac1b\int_0^1y^{\large1-\frac{a}{b}-1}(1-y)^{\large\frac{a}{b}-1}\ dy\\&=\frac1b\cdot\Gamma\left(1-\frac{a}{b}\right)\cdot\Gamma\left(\frac{a}{b}\right)\\&=\large{\color{blue}{\frac{\pi}{b\sin\left(\frac{a\pi}{b}\right)}}}.
\end{align}
The last part uses Euler's reflection formula for Gamma function provided $0<a<b$. 
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 - 1} \over 1 + x}\,\dd x}
&=\int_{0}^{\infty}x^{a - 1}\int_{0}^{\infty}\expo{-\pars{1 + x}t}\,\dd t\,\dd x
=\int_{0}^{\infty}\expo{-t}\int_{0}^{\infty}x^{a - 1}\expo{-xt}\,\dd x\,\dd t
\\[3mm]&=\int_{0}^{\infty}t^{-a}\expo{-t}
\int_{0}^{\infty}x^{a - 1}\expo{-x}\,\dd x\,\dd t
=\Gamma\pars{-a + 1}\Gamma\pars{\bracks{a - 1} + 1}
\\[3mm]&=\color{#66f}{\large{\pi \over \sin\pars{\pi a}}}
\end{align}

with Euler Reflection Formula ${\bf\mbox{6.1.17}}$.

Both integrals converge whenever $\ds{\Re\pars{-a} > -1}$
and $\ds{\Re\pars{a - 1}>-1}$ which means
$$
0 < \Re\pars{a} < 1
$$
