What is $\int_0^\infty\frac{x^{z-1}}{x+1} dx$? I was looking around the internet for a simple(r) proof of the Gamma Reflection Formula. I found this: Detailed explanation of the Γ reflection formula understandable by an AP Calculus student, and did not understand the last integration: 
$$\displaystyle\int\limits_0^\infty\frac{v^{z-1}}{v+1} dv$$
Can anyone help me? Explanations understandable by an AP Calculus student would be great!
 A: Splitting the integral as $\int_0^\infty \frac{v^{z-1}}{1+v}\,dv=\int_0^1\frac{v^{z-1}}{1+v}\,dv+\int_1^\infty \frac{v^{z-1}}{1+v}\,dv$, and enforcing the substation $v\to 1/v$ in the integral that extends from $1$ to $\infty$, expanding $\frac1{1+v}$ as $\sum_{n=0}^\infty (-1)^nv^n$, and interchanging the order of the series and the integral, we can write
$$\begin{align}
\int_0^\infty \frac{v^{z-1}}{1+v}\,dv&=\int_0^1\frac{v^{z-1}}{1+v}\,dv+\int_1^\infty \frac{v^{z-1}}{1+v}\,dv\\\\
&=\int_0^1\frac{v^{z-1}+v^{-z}}{1+v}\,dv\\\\
&=\sum_{n=0}^\infty (-1)^n \int_0^1 (v^{n+z-1}+v^{n-z})\,dv\\\\
&=\sum_{n=0}^\infty (-1)^n\left(\frac{1}{n+z}+\frac{1}{n+1-z}\right) \tag 1\\\\
&=\frac{\pi}{\sin(\pi z)}
\end{align}$$
where I showed in the appendix of THIS ANSWER using real analysis methods only that $(1)$ is the partial fraction expansion of $\pi \csc(\pi z)$.
A: $\newcommand{\bbx}[1]{\,\bbox[8px,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{\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}$

With $\ds{\pars{~\Re\pars{z - 1} > - 1\ \mbox{and}\ \Re\pars{z - 1} < 0~} \implies
\bbx{\ds{0 < \Re\pars{z} < 1}}}$:

\begin{align}
\int_{0}^{\infty}{v^{z - 1} \over v + 1}\,\dd v &
\,\,\,\stackrel{t\ =\ 1/\pars{v + 1}}{=}\,\,\,
\int_{1}^{0}t\,\pars{{1 \over t} - 1}^{z - 1}\pars{-\,{1 \over t^{2}}}\dd t =
\int_{0}^{1}t^{-z}\,\pars{1 - t}^{z - 1}\,\dd t
\\[5mm] & = {\Gamma\pars{-z + 1}\Gamma\pars{z} \over \Gamma\pars{1}} =
\bbx{\ds{\pi \over \sin\pars{\pi z}}}
\end{align}
A: For convenience I will rewrite the integral as:
$$
\int_0^\infty f(z)dz,\quad\text{with}\quad f(z)=\frac{z^p}{1+z}.
$$
Observe that the integral converges if and only if $-1<\Re p<0$ and with this restriction it can be readily evaluated using integration in the complex plane. 
Let choose the branch cut of the function $z^{p}$ along the positive real semi-axis and consider the following integration contour $\Gamma$:
$$\begin{align}
&1)\;z=x,& x:0\to R\\
&2)\;z=Re^{i\phi},&\phi:0\to 2\pi\\
&3)\;z=x,& x:R\to0
\end{align}$$
The integral of the function
$
f(z)
$
over the circle vanishes as $R\to\infty$ due to Jordan's lemma. While on the top of the branch cut the function evaluates to $$\frac{x^{p}}{1+x}$$ on the bottom of the cut it is $$\frac{(xe^{i2\pi})^{p}}{1+xe^{i2\pi}}=e^{i2\pi p}\frac{x^{p}}{1+x}.$$ 
Thus by the residue theorem we have
$$\operatorname{Res}_{z=-1}f(z)=e^{i\pi p}=\frac1{2\pi i}
\int_{\Gamma}f(z)dz=\frac{1-e^{i2\pi p}}{2\pi i}\int_{0}^\infty\frac{x^{p}}{1+x}dx
$$
or
$$\int_{0}^\infty\frac{x^{p}}{1+x}dx=\frac{2\pi i\; e^{i\pi p} }{1-e^{i2\pi p}}
=-\frac\pi{\sin\pi p}.
$$
