Calculating $\int_0^\infty \frac{1}{x^\alpha}\frac{1}{1+x}\,{\rm d}x$ My lecturer simply stated the solution to the integral ($\alpha<1, x=O(1)$)
$$I = \int_0^\infty \frac{1}{x^\alpha}\frac{1}{1+x}\,{\rm d}x=\pi\,{\rm cosec}(\pi\alpha)$$
Now the reasoning she gave us that allows us to take this integral even though the integrand doesn't exist at $x=0$ is "we can integrate here since we are only taking leading order". She also said to get this solution she took the first term of the taylor series for $1/(1+x)$. Here is my attempt:
$$I = \int_0^\infty \frac{1}{x^\alpha}\frac{1}{1+x}\,{\rm d}x\approx \int_0^\infty \frac{1}{x^\alpha}(1)\, {\rm d}x=\left[\frac{x^{1-\alpha}}{1-\alpha}\right]_0^\infty$$
but this is unbounded so I don't really know how to get the solution. It would be great if someone could help tell me whats wrong or correct her suggestions. Thanks
 A: The reason this all works is because you are only considering the (integrable) singularity in the neighborhood of $x=0$.  Thus, $\alpha \lt 1$ for the integral to converge there.  Infinity is another story.  There the integrand behaves as $x^{-(1+\alpha)}$ ; this leads to the requirement that $\alpha \gt 0$ for convergence.  Thus, $\alpha \in (0,1)$.
To evaluate: evaluate the following integral in the complex plane:
$$\oint_C \frac{dz}{z^{\alpha} (1+z)} $$
where $C$ is a standard keyhole contour of outer radius $R$ and inner radius $\epsilon$ about the positive real axis.  Thus the contour integral is equal to
$$\int_{\epsilon}^R \frac{dx}{x^{\alpha}(1+x)} + i R^{1-\alpha} \int_0^{2 \pi} d\theta \frac{e^{i (1-\alpha) \theta}}{1+R e^{i \theta}} \\ + e^{-i 2 \pi \alpha} \int_R^{\epsilon}  \frac{dx}{x^{\alpha}(1+x)}+ i \epsilon^{1-\alpha} \int_{2 \pi}^0 d\phi \frac{e^{i (1-\alpha) \phi}}{1+\epsilon e^{i \phi}}$$
As $R \to \infty$, the magnitude of the second integral vanishes.  As $\epsilon \to 0$, the magnitude of the fourth integral vanishes.
By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the residue of the pole at $z=-1$.  Note that here we must use $-1=e^{i \pi}$ due to the choice of contour.  Thus we have
$$\left (1-e^{-i 2 \pi \alpha} \right ) \int_0^{\infty} \frac{dx}{x^{\alpha} (1+x)} = i 2 \pi \, e^{-i \pi \alpha} $$
or

$$\int_0^{\infty} \frac{dx}{x^{\alpha} (1+x)} = \frac{\pi}{\sin{\pi \alpha}}$$

as asserted.
A: \begin{align}
\int\limits_{0}^{\infty} \frac{x^{-\alpha}}{1+x} \mathrm{d}x &=
\mathrm{B}(1-\alpha,\alpha) \\
&= \frac{\Gamma(1-\alpha)\Gamma(\alpha)}{\Gamma(1)} \\
&= \frac{\pi}{\sin(\pi \alpha)}
\end{align}
Notes:


*

*From Volume 1 of Higher Transcendental Functions (Bateman Manuscript), Section 1.5, 
Equation 3:
$$\mathrm{B}(x,y) = \int\limits_{0}^{\infty} v^{x-1} (1+v)^{-x-y} \mathrm{d}v$$
for $\Re x \gt 0$ and $\Re y \gt 0$. Thus for our problem, we have $0 \lt \alpha \lt 1$
if $\alpha$ is real.

*Euler reflection formula: 
$$\Gamma(z)\Gamma(1-z) = \frac{\pi}{\sin(\pi z)}$$
A: Split up the integral
$$
I(\alpha) = \int_0^\infty \frac{x^{-\alpha}}{1+x} \,dx =
\int_0^1 \frac{x^{-\alpha}}{1+x} \,dx + 
\int_1^\infty \frac{x^{-\alpha}}{1+x} \,dx.
$$
Define $f(\alpha) = \int_0^1 \frac{x^{-\alpha}}{1+x} \,dx$, for $\alpha < 1$. Then $\int_1^\infty \frac{x^{-\alpha}}{1+x} \,dx = f(1-\alpha)$ as can be seen by substituting $u = x^{-1}$, so $I(\alpha) = f(\alpha) + f(1-\alpha)$ when $0 < \alpha < 1$.
Now if $\alpha < 1$ then
$$
f(\alpha)
= \int_0^1 \frac{x^{-\alpha}}{1+x} \,dx
= \int_0^1 x^{-\alpha} \Bigl(1 - \frac{x}{1+x}\Bigr) \,dx 
= -\frac{1}{\alpha-1} - f(\alpha-1).
$$
By iterating this we see that
$$f(\alpha) = \sum_{k=1}^{n} \frac{(-1)^k}{\alpha-k} + (-1)^n f(\alpha-n).$$
Taking the limit $n \to \infty$, one has $f(\alpha-n) \to 0$ (by the dominated convergence theorem and $x^{n-\alpha} \to 0$ on $x \in (0,1)$), so
$$f(\alpha) = \sum_{k=1}^{\infty} \frac{(-1)^{k}}{\alpha-k}.$$
In fact this series converges for all $\alpha \in \mathbb{C} \smallsetminus \mathbb{N}$, because the terms go to $0$ as $k \to \infty$, and grouping terms together in pairs gives a sum of terms of order $k^{-2}$. So we may redefine $f$ to be this series, which is a meromorphic function on $\mathbb{C}$.
Next,
$$f(1-\alpha) = \sum_{k=1}^{\infty} \frac{(-1)^{k}}{(1-\alpha)-k} = \sum_{k=-\infty}^0 \frac{(-1)^{k}}{\alpha-k}$$
so that
$$\boxed{I(\alpha) = f(\alpha) + f(1-\alpha) = \sum_{k = -\infty}^\infty \frac{(-1)^k}{\alpha-k}.}$$
This is a meromorphic function of $\alpha$ on $\mathbb{C}$ with the same poles and residues as $\pi/\sin(\pi\alpha)$. I claim that in fact $I(\alpha) = \pi/\sin(\pi\alpha)$.
Clearly each function is periodic with period $2$, and it can be shown that each is bounded as $\operatorname{Im}(\alpha) \to \pm\infty$, so their difference is a bounded entire function. Thus by Liouville's theorem,
$$I(\alpha) - \frac{\pi}{\sin(\pi\alpha)} = C$$
for some constant $C$. Putting $\alpha = 1/2$ and noting
$$f(1/2) = -2 \sum_{k=1}^\infty \frac{(-1)^k}{2k-1} = 2 \arctan(1) = \frac{\pi}{2}$$
shows that $C = 0$.
A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{{#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}$

The following integral converges whenever
  $\ds{0 < \Re\pars{\alpha} < 1}$.

\begin{align}
\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!
\int_{0}^{\infty}{1 \over x^{\alpha}}\,{1 \over 1 + x}\,\dd x & =
\int_{0}^{1}{x^{-\alpha} \over 1 + x}\,\dd x +
\int_{1}^{\infty}{x^{-\alpha} \over 1 + x}\,\dd x =
\int_{0}^{1}{x^{-\alpha} + x^{\alpha - 1} \over 1 + x}\,\dd x
\\[5mm] & =
\int_{0}^{1}{x^{-\alpha} + x^{\alpha - 1} - x^{-\alpha + 1} - x^{\alpha}
\over 1 - x^{2}}\,\dd x
\\[5mm] & =
{1 \over 2}\int_{0}^{1}{x^{-\alpha/2 - 1/2} + x^{\alpha/2 - 1} -
x^{-\alpha/2} - x^{\alpha/2 - 1/2}
\over 1 - x}\,\dd x
\\[5mm] & =
{1 \over 2}\bracks{%
-\Psi\pars{-\,{\alpha \over 2} + {1 \over 2}} -
\Psi\pars{\alpha \over 2} +
\Psi\pars{-\,{\alpha \over 2} + 1} +
\Psi\pars{{\alpha \over 2} + {1 \over 2}}}\label{1}\tag{1}
\\[5mm] & =
{1 \over 2}\braces{{%
\bracks{\vphantom{\Huge A}\Psi\pars{{\alpha \over 2} + {1 \over 2}} -
\Psi\pars{-\,{\alpha \over 2} + {1 \over 2}}}} +
\bracks{\vphantom{\Huge A}\Psi\pars{-\,{\alpha \over 2} + 1} -
\Psi\pars{\alpha \over 2}}}
\\[5mm] & =
{1 \over 2}\braces{\vphantom{\huge A}%
\pi\cot\pars{\pi\bracks{-\,{\alpha \over 2} + {1 \over 2}}} +
\pi\cot\pars{\pi\,{\alpha \over 2}}}\label{2}\tag{2}
\\[5mm] & =
{\pi \over 2}\braces{\vphantom{\huge A}\tan\pars{\pi\,{\alpha \over 2}} +
\cot\pars{\pi\,{\alpha \over 2}}} = \bbx{\pi\csc\pars{\pi\alpha}}
\end{align}

$$\bbox[20px,#ffe,border:1px groove navy]{%
\left\{\begin{array}{rcl}
\ds{\Psi}: && Digamma\ Function.
\\[4mm]
\ds{\Psi\pars{z + 1} + \gamma} & \ds{=} &
\ds{\int_{0}^{1}{1 - t^{z} \over 1 - t}\,\dd t\,,\quad\Re\pars{z} > - 1\,,\quad
\pars{~\mbox{see}\ \eqref{1}~}}
\\
\ds{\gamma}: && Euler\!-\!Mascheroni\ Constant
\\[4mm]
\ds{\Psi\pars{1 - z} - \Psi\pars{z}} & \ds{=} & \ds{\pi\cot\pars{\pi z}\,,
\quad \pars{~Euler\ Reflection\ Formula~}.\ \mbox{See}\ \eqref{2}.}
\end{array}\right.}
$$
A: Too long for a comment:
$$\int\frac{x^{-\alpha}}{1+x}dx=\int(e^u-1)^{-\alpha}du\tag{$u=\ln(1+x)$}$$
Binomial expansion:
$$=\int\sum_{k=0}^\infty\binom{-\alpha}ke^{-\alpha u-k}(-1)^kdu$$
Switching the sum and integral:
$$=\sum_{k=0}^\infty\int\binom{-\alpha}ke^{-\alpha u-k}(-1)^kdu$$
Integrating:
$$=c+\frac1{-\alpha}\sum_{k=0}^\infty\binom{-\alpha}ke^{-\alpha u-k}(-1)^k$$
Un-binomial expansion:
$$=\frac1{-\alpha}(e^u-1)^{-\alpha}+c$$
Undoing substitution:
$$=\frac1{-\alpha}x^{-\alpha}+c$$
Which is strange, as this is not the correct answer, right?  Putting this out for anyone to come up ideas with.
