Contour integral computation I'm calculating the integral $$\int_0^\infty\frac{x^{p}}{1+x}\;\mathbb{d}x.$$
I'm doing it similarly to the answer in https://math.stackexchange.com/a/1754522/868416, (note that this question is slightly different, but the solution strategy is the same nonetheless), but I'm stuck on the part integrating over the horizontal segments.
If $\delta$ is the width of the 'corridor' and we let $\delta \rightarrow 0+$, then the integral over the horizontal segement in the upper half plane should tend to $$\int_{\epsilon}^R\frac{x^{p}}{1+x}\;\mathbb{d}x.$$ The integral in the bottom half plane will tend to $$-e^{2\pi i p}\int_{\epsilon}^R\frac{x^{p}}{1+x}\;\mathbb{d}x.$$
How does one prove this? I first tried writing $z$ as $x \pm i \delta$ respectively and then obtaining $$\frac{z^p}{1+z} = \frac{\exp(p \log |t\pm i \delta| + p i \arg(t\pm i \delta)}{1+\exp(\log |t\pm i \delta| + i \arg(t\pm i \delta)},$$ but I always get stuck.
I also want to comment that this way of proving these integrals seems a bit weird to me, be we were advised to do it this way, since apparently it is easiest...
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
Lets consider
$$
\left.\oint_{\cal C}{z^{p} \over z - 1}
{\dd z \over 2\pi\ic}\right\vert_{\Re\pars{p}\ \in\ \pars{-1,0}}
$$
where $\ds{\cal C}$ is a key-hole which "takes care" of the $\ds{z^{p}}$ principal branch
$\pars{~\rm along\ \left(-\infty,0\right]\ with
\arg\pars{z} \in \pars{-\pi,\pi}~}$. Then,
\begin{equation}
\oint_{\cal C}{z^{p} \over z - 1}
{\dd z \over 2\pi\ic} =
\on{Res}\bracks{{z^{p} \over z - 1}, z = 1} = 1^{p} = 1\label{1}\tag{1}
\end{equation}
Moreover,
\begin{align}
\oint_{\cal C}{z^{p} \over z - 1}
{\dd z \over 2\pi\ic} & = \int_{-\infty}^{0}
{\pars{-x}^{p}\expo{\pi p\ic} \over x - 1}{\dd x \over 2\pi\ic}
\\[2mm] & +
\int_{0}^{-\infty}
{\pars{-x}^{p}\expo{-\pi p\ic} \over x - 1}{\dd x \over 2\pi\ic}
\\[5mm] & =
-\expo{\pi p\ic}\int_{0}^{\infty}
{x^{p} \over 1 + x}{\dd x \over 2\pi\ic}
\\[2mm] & +
\expo{-\pi p\ic}\int_{0}^{\infty}
{x^{p} \over 1 + x}{\dd x \over 2\pi\ic}
\\[5mm] & = -{\sin\pars{\pi p} \over \pi}
\int_{0}^{\infty}
{x^{p} \over 1 + x}\dd x
\label{2}\tag{2}
\end{align}

(\ref{1}) and (\ref{2}) $\ds{\implies}$
$\ds{%
\bbx{\color{#44f}{\int_{0}^{\infty}
{x^{p} \over 1 + x}\dd x =
-\pi\csc\pars{\pi p}}}
}$
A: $f(z)=\frac{z^{\alpha}}{z(1+z)},\alpha\in (0,1)$.
$\int_{\text{outer circle}}|f(z)|ds$ is bounded by $\frac{C}{R^{1-\alpha}}$.  $\int_{\text{inner circle}}|f(z)|ds$ is bounded by $C'\epsilon^{\alpha}$.
If $\alpha$ is complex, then we only care about its real part. The above argument holds.
Edit: Apparently I haven't finished my answer LOL.
Let $\gamma_{1}=\{x+i\delta|x\in [\epsilon,R]$
$|\frac{(x+i\delta)^{\alpha}}{(x+i\delta)(1+x+i\delta)}|\leq \frac{R^{\alpha}}{\epsilon(1+\epsilon)}$ on $\gamma_{1}$, by Lebesgue dominated convergence theorem,
$\lim_{\delta\to 0^{+}}\int_{\gamma_{1}}f(z)dz
=\lim_{\delta\to 0^{+}}\int_{\epsilon}^{R}\frac{(x+i\delta)^{\alpha}}{(x+i\delta)(1+x+i\delta)}dx
=\int_{\epsilon}^{R}\lim_{\delta\to 0^{+}}\frac{(x+i\delta)^{\alpha}}{(x+i\delta)(1+x+i\delta)}dx=\int_{\epsilon}^{R}\frac{x^{\alpha}}{x(1+x)}dx$. Similarly, you can find the integral on the lower boundary of the corridor.
