What is $\int_0^\infty\frac{x^{z-1}}{x+1} dx$?

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)$.


$\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}


OK, I came up with a proof in my youth and have been struggling to recreate it lately and finally have perhaps a bit cleaner proof. No infinite series, products, or complex variables allowed! Let $x\in(0,1)$ and $$g(\theta)=\int_0^{\infty}\frac{t^{x-1}\sin\theta}{t^2+2t\cos\theta+1}dt$$ Then after a little algebraic manipulation we find $$\begin{align}g^{\prime}(\theta)&=\int_0^{\infty}\frac{\left[(2t+\cos\theta)(t^2+2t\cos\theta+1)-(t^2+t\cos\theta)(2t+2\cos\theta)\right]t^{x-1}}{(t^2+2t\cos\theta+1)^2}dt\\ &=\int_0^{\infty}\frac{(2t+\cos\theta)t^{x-1}}{t^2+2t\cos\theta+1}dt+\left.\frac{(t^2+t\cos\theta)t^{x-1}}{t^2+2t\cos\theta+1}\right|_0^{\infty}-\int_0^{\infty}\frac{\left[x(t+\cos\theta)+t\right]t^{x-1}}{t^2+2t\cos\theta+1}dt\\ &=(1-x)\int_0^{\infty}\frac{(t+\cos\theta)t^{x-1}}{t^2+2t\cos\theta+1}dt=(1-x)f(\theta)\end{align}$$ In its turn, $$\begin{align}f^{\prime}(\theta)&=\int_0^{\infty}\frac{\left[-\sin\theta(t^2+2t\cos\theta+1)+t\sin\theta(2t+2\cos\theta)\right]t^{x-1}}{(t^2+2t\cos\theta+1)^2}dt\\ &=\int_0^{\infty}\frac{(-\sin\theta)t^{x-1}}{t^2+2t\cos\theta+1}dt-\left.\frac{(t\sin\theta)t^{x-1}}{t^2+2t\cos\theta+1}\right|_0^{\infty}+\int_0^{\infty}\frac{(x\sin\theta)t^{x-1}}{t^2+2t\cos\theta+1}dt\\ &=-(1-x)\int_0^{\infty}\frac{t^{x-1}\sin\theta}{t^2+2t\cos\theta+1}dt=-(1-x)g(\theta)\end{align}$$ So $g^{\prime\prime}(\theta)=-(1-x)^2g(\theta)$, $g(0)=0$, and $$g^{\prime}(0)=(1-x)f(0)=(1-x)\int_0^{\infty}\frac{t^{x-1}}{t+1}dt$$ The solution to the differential equation is $g(\theta)=C_1\cos(1-x)\theta+C_2\sin(1-x)\theta$, where $g(0)=C_1=0$ and $g^{\prime}(0)=(1-x)C_2=(1-x)\int_0^{\infty}\frac{t^{x-1}}{t+1}dt$, so $$g(\theta)=\int_0^{\infty}\frac{t^{x-1}\sin\theta}{t^2+2t\cos\theta+1}dt=\sin(1-x)\theta\int_0^{\infty}\frac{t^{x-1}}{t+1}dt$$ Now we can say that $$\begin{align}g\left(\frac{\pi}2\right)&=\sin\left(\frac{\pi}2-\frac{\pi x}2\right)\int_0^{\infty}\frac{t^{x-1}}{t+1}dt=\cos\left(\frac{\pi x}2\right)\int_0^{\infty}\frac{t^{x-1}}{t+1}dt\\ &=\int_0^{\infty}\frac{t^{x-1}}{t^2+1}dt=\frac12\int_0^{\infty}\frac{u^{\frac12x-1}}{u+1}du\end{align}$$ Where we have made the substitution $t=u^{1/2}$. We can now prove that for any positive integer $n$ and any odd integer $q$ such that $0<q<2^n$, $$\int_0^{\infty}\frac{t^{\frac q{2^n}-1}}{t+1}dt=\frac{\pi}{\sin\left(\frac{q\pi}{2^n}\right)}$$ For if $n=1$, then $q=1$ and $$\int_0^{\infty}\frac{t^{\frac q{2^n}-1}}{t+1}dt=\int_0^{\infty}\frac{t^{1/2}}{t+1}dt=2\int_0^{\infty}\frac{du}{u^2+1}=\left.2\tan^{-1}u\right|_0^{\infty}=\pi=\frac{\pi}{\sin\left(\frac{q\pi}{2^n}\right)}$$ And if true for some $n>0$ and all odd $0<q<2^n$, then $$\int_0^{\infty}\frac{t^{\frac q{2^{n+1}}-1}}{t+1}dt=2\cos\left(\frac{q\pi}{2^{n+1}}\right)\int_0^{\infty}\frac{t^{\frac q{2^n}-1}}{t+1}dt=\frac{2\pi\cos\left(\frac{q\pi}{2^{n+1}}\right)}{\sin\left(\frac{q\pi}{2^n}\right)}=\frac{\pi}{\sin\left(\frac{q\pi}{2^{n+1}}\right)}$$ Then for odd $2^n<q<2^{n+1}$, $0<2^{n+1}-q<2^n$ and $$\int_0^{\infty}\frac{t^{\frac q{2^{n+1}}-1}}{t+1}dt=\int_0^{\infty}\frac{u^{\frac{2^{n+1}-q}{2^{n+1}}-1}}{u+1}du=\frac{\pi}{\sin\left(\frac{2^{n+1}-q}{2^{n+1}}\pi\right)}=\frac{\pi}{\sin\left(\frac{q\pi}{2^{n+1}}\right)}$$ Where we have made the substitution $t=1/u$. Thus the proposition follows for $n+1$ and all odd $0<q<2^{n+1}$ and by mathematical induction for all binary fractions $0<q/2^n<1$. By the continuity (is this easy to prove?) of the two expressions for $0<x<1$ we conclude that $$\int_0^{\infty}\frac{t^{x-1}}{t+1}dt=\frac{\pi}{\sin(\pi x)}$$ EDIT: Continuity isn't hard to prove just a little tedious. Suppose $0<a<x_1<x_2<b<1$. Then we know by the mean value theorem that there is some $x_1<\xi(x_1,x_2)<x_2$ such that $$\frac{t^{x_2}-t^{x_1}}{x_2-x_1}=t^{\xi(x_1,x_2)}\ln t$$ Then if $0<t\le1$ $$\begin{align}\left|\frac{t^{x_2}-t^{x_1}}{x_2-x_1}\right|&\le-t^{x_1}\ln t=-t^{x_1}\int_1^t\frac{du}u=t^{x_1}\int_t^1\frac{du}u\le t^{x_1}\int_t^1u^{-1-\frac {x_1}2}du\\ &=\left.-\frac2{x_1}t^{x_1}u^{-\frac{x_1}2}\right|_t^1=\frac2{x_1}t^{x_1}\left(t^{-\frac{x_1}2}-1\right)\le\frac2{x_1}t^{\frac{x_1}2}\end{align}$$ So $$\begin{align}\left|\int_0^1\frac{t^{x_2-1}}{t+1}dt-\int_0^1\frac{t^{x_1-1}}{t+1}dt\right|&\le(x_2-x_1)\int_0^1\frac2{x_1}\frac{t^{\frac{x_1}2-1}}1dt=\frac4{x_1^2}(x_2-x_1)\end{align}$$ And if $1\le t$ $$\begin{align}\left|\frac{t^{x_2}-t^{x_1}}{x_2-x_1}\right|\le t^{x_2}\ln t=t^{x_2}\int_1^t\frac{du}u\le t^{x_2}\int_1^tu^{\frac{-1-x_2}2}du=\left.\frac2{1-x_2}t^{x_2}u^{\frac{1-x_2}2}\right|_1^t=\frac2{1-x_2}t^{x_2}\left(t^{\frac{1-x_2}2}-1\right)\le\frac2{1-x_2}t^{\frac{1+x_2}2}\end{align}$$ So $$\left|\int_1^{\infty}\frac{t^{x_2-1}}{t+1}dt-\int_1^{\infty}\frac{t^{x_1-1}}{t+1}dt\right|\le(x_2-x_1)\int_1^{\infty}\frac2{1-x_2}\frac{t^{\frac{1+x_2}2-1}}t=\frac4{(1-x_2)^2}(x_2-x_1)$$ Adding up, $$\left|\int_0^{\infty}\frac{t^{x_2-1}}{t+1}dt-\int_0^{\infty}\frac{t^{x_1-1}}{t+1}dt\right|\le(x_2-x_1)\left(\frac4{x_1^2}+\frac4{(1-x_2)^2}\right)\le(x_2-x_1)\left(\frac4{a^2}+\frac4{(1-b)^2}\right)$$ So given any $0<x_0<1$ and any $\epsilon>0$, choose $a$ and $b$ such that $0<a<x_0<b<1$ and then let $$\delta=\min\left(x_0-a,b-x_0,\frac{\epsilon}{\frac4{a^2}+\frac4{(1-b)^2}}\right)$$ Then $$\left|\int_0^{\infty}\frac{t^{x-1}}{t+1}dt-\int_0^{\infty}\frac{t^{x_0-1}}{t+1}dt\right|<\epsilon$$ Whenever $|x-x_0|<\delta$, completing the $\epsilon$-$\delta$ proof of continuity of $f(x)=\int_0^{\infty}\frac{t^{x=1}}{t+1}dt$.