Evaluate $\int_0^{\infty}\frac{\ln x}{x^a(x+1)}dx$ where $0I'm trying to compute this integral, $$\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx \hbox{ where } 0<a<1$$
I drew a typical Pacman contour with branch cut at positive real axis. Then, we have $$\int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz=\left(\int_{L_{1}}+\int_{L_{2}}+\int_{C_{R}}+\int_{C_{\epsilon}}\right)\frac{\ln z}{z^{a}(z+1)}dz$$
The function has a pole at $z=-1$. Then, by residue theorem, the whole integral becomes 
\begin{align*}
\int_{\Gamma}\frac{\ln z}{z^{a}(z+1)}dz&=2\pi i\text{res}(\frac{\ln z}{z^{a}(z+1)};-1)\\&=2\pi i\lim_{z\rightarrow-1}(z+1)\frac{\ln z}{z^{a}(z+1)}\\&=2\pi i\lim_{z\rightarrow-1}\frac{\ln z}{z^{a}}\\&=2\pi i\frac{\ln e^{i\pi}}{e^{i\pi a}}\\&=2\pi i\frac{\ln1+i\pi}{e^{i\pi a}}\\&=-\frac{2\pi^{2}}{(e^{i\pi})^{a}}
\end{align*}
On $L_1$, $z=xe^{i\epsilon}$ where $\epsilon\leq x\leq R$
On $L_{2}$, $z=xe^{i(2\pi-\epsilon)}$ where $\epsilon\leq x\leq R$
On $C_{R}$, $z=Re^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$
Lastly on On $C_{\epsilon}$, $z=\epsilon e^{i\theta}$ where $\epsilon\leq\theta\leq2\pi-\epsilon$
So I tried to compute them separately and I anticipate the curves will both go to $0$ by ML inequality, and two linear integrals will consist of the term $\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx$ and hence simply solve for it. But I'm having trouble physically solving it out. I think the log is throwing me off. Can anybody please help me?
 A: The integral can be evaluated to 
$$\pi^2\cot\pi a~\csc\pi a$$
I will provide a proof later.

Let 
$$J(a)=\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx$$
$$I(a)=\int_0^\infty\frac{x^{-a}}{x+1}dx$$
Clearly, $J(a)=-I'(a)$.
Evaluation of $I(a)$ is easier.
Let 
$$f(z)=\frac{z^{-a}}{z+1}=\frac{\exp(-a(\ln|z|+i\arg z))}{z+1}\hbox{ where }\arg z\in[0,2\pi).$$
Let $C$ be the keyhole contour centered at the origin, avoiding the branch cut of $z^{-a}$.
By residue theorem,
$$\oint_C f(z)dz=2\pi i\operatorname*{Res}_{z=-1}f(z)=2\pi i(-1)^{-a}=2\pi ie^{-\pi i a}\qquad{(1)}$$
Also,
$$\oint_C =\int_{\text{large circle}}+\int_{\text{small circle}}+\int_{\text{upper real axis}}+\int_{\text{lower real axis}}$$
You can easily prove that the first two integrals tend to zero.
Moreover,
$$\int_{\text{upper real axis}}=\int^\infty_0 f(te^{i0})dt=I(a)$$
$$\begin{align}
\int_{\text{lower real axis}}
&=\int_\infty^0 f(te^{i2\pi})dt \\
&=\int_\infty^0\frac{(te^{2\pi i})^{-a}}{t+1}dt \\
&=-e^{-2\pi i a}\int^\infty_0\frac{t^{-a}}{t+1}dt \\
&=-e^{-2\pi i a}I(a) \\
\end{align}
$$
Back to $(1)$,
$$I(a)-e^{-2\pi i a}I(a)=2\pi ie^{-\pi i a}$$
$$(e^{\pi i a}-e^{-\pi i a})I(a)=2\pi i$$
$$\frac{e^{\pi i a}-e^{-\pi i a}}{2i}I(a)=\pi$$
$$(\sin{\pi a})I(a)=\pi$$
$$I(a)=\pi\csc{\pi a}$$
Therefore, $J(a)=-I'(a)=\pi^2\cot\pi a~\csc\pi a$.
$$\color{red}{\int_{0}^{\infty}\frac{\ln x}{x^{a}(x+1)}dx=\pi^2\cot\pi a~\csc\pi a}$$
Some special values are
$$J(1/6)=2\sqrt3\pi^2, ~J(1/4)=\sqrt2\pi^2, ~J(1/3)=2\pi^2/3, ~J(1/2)=0$$
$J(a)$ satisfies the functional equation
$$J(a)=-J(1-a).$$
A: Actually you do not strictly need Complex  Analysis. Using the Beta function and the reflection formula for the $\Gamma$ function one gets
$$ \int_{0}^{+\infty}\frac{x^\beta}{x+1}\,dx = -\frac{\pi}{\sin(\pi\beta)}$$
for any $\beta\in(-1,0)$. By differentiating both sides with respect to $\beta$ it follows that
$$ \int_{0}^{+\infty}\frac{x^\beta\log x}{x+1}\,dx = \frac{\pi^2\cos(\pi\beta)}{\sin^2(\pi\beta)}$$
so
$$ \forall \alpha\in(0,1),\qquad \int_{0}^{+\infty}\frac{\log x}{x^\alpha(x+1)}\,dx = \color{red}{\frac{\pi^2\cos(\pi\alpha)}{\sin^2(\pi\alpha)}}.$$
A: We seek to compute using contour integration the integral
$$J = \int_0^\infty \frac{\ln x}{x^a (1+x)} \; dx$$
where $0\lt a\lt 1.$ We work with
$$f(z) = \frac{\mathrm{Log}(z)}
{\exp(a\mathrm{Log}(z)) (1+z)}$$
where $\mathrm{Log}(z)$ is the branch  with argument in $[0,2\pi).$ We
use a keyhole contour wih radius $R$ and the slot on the positive real
axis.  Let $\Gamma_0$  be the  segment  on the  real axis  up to  $R$,
$\Gamma_1$ the big circle of  radius $R$, $\Gamma_2$ the segment below
the real  axis coming  in from  $R$ and  finally $\Gamma_3$  the small
circle of radius $\epsilon$ enclosing the origin. We then have
$$\left(\int_{\Gamma_0}
+ \int_{\Gamma_1}+ \int_{\Gamma_2}+ \int_{\Gamma_3}\right) f(z) \; dz
= 2\pi i \times \mathrm{Res}_{z=-1} f(z)
= 2\pi i \times \frac{\pi i}{\exp(a\pi i)}$$
Observe that in the limit
$$\int_{\Gamma_0}  f(z) \; dz =
\int_0^\infty \frac{\ln x}{x^a (1+x)} \; dx = J.$$
For $\Gamma_1$ we have by  ML estimate $\lim_{R\to\infty} 2\pi R \times
(\log R + 2\pi) / R^a / (R-1) $ or $\lim_{R\to\infty} 2\pi \times
(\log R + 2\pi) / R^a + \lim_{R\to\infty} 2\pi \times
(\log R + 2\pi) / R^a /(R-1) = 0,$ so this vanishes.
Furthermore for $\Gamma_2$ in the  limit (we get $\mathrm{Log}(z) =
\log |z| + 2\pi i$)
$$\int_{\Gamma_2}  f(z) \; dz =
\int_\infty^0 \frac{\ln x + 2\pi i}
{\exp(2a\pi i) x^a(1+x)} \; dx
\\ = - \exp(-2a\pi i) J
- \exp(-2a\pi i) 2\pi i \int_0^\infty \frac{1}{x^a(1+x)} \; dx
\\ = - \exp(-2a\pi i) J
- \exp(-2a\pi i) 2\pi i K.$$
For $\Gamma_3$  we again use  ML and  get $\lim_{\epsilon\to 0}  2 \pi
\epsilon \times (|\log\epsilon| +2\pi) / \epsilon^a / (1-\epsilon)$ which is
$\lim_{\epsilon\to  0} 3/2 \times  2  \pi  \epsilon^{1-a}   \times  (|\log\epsilon| 
+2\pi)  = 0$, so this  too vanishes. We have  shown that in
the limit
$$2\pi i \times \frac{\pi i}{\exp(a\pi i)} =
J - \exp(-2a\pi i) J
- \exp(-2a\pi i) 2\pi i K.$$
This is
$$-2\pi^2 = 2 i J \sin(a\pi) - \exp(-a\pi i) 2\pi i K.$$
It seems we require $K.$ We use the same estimates and the same contour
to get
$$K (1-\exp(-2a\pi i)) = 2\pi i \times \exp(-a\pi i)$$
which is
$$K = 2\pi i \frac{\exp(-a\pi i)}{1-\exp(-2a\pi i)}
= 2\pi i \frac{1}{\exp(a\pi i)-\exp(-a\pi i)}
= \frac{\pi}{\sin(a\pi)}.$$
We then get
$$2i J\sin(a\pi) =
-2\pi^2 + \exp(-a\pi i)2\pi i \frac{\pi}{\sin(a\pi)}
\\ = 2\pi^2 \frac{-\sin(a\pi)+i\exp(-a\pi i)}{\sin(a\pi)}
\\ = 2\pi^2
\frac{-\exp(a\pi i)/2/i+\exp(-a\pi i)/2/i-\exp(-a\pi i)/i}
{\sin(a\pi)}
\\ = - 2\pi^2 \frac{\cos(a\pi)/i}{\sin(a\pi)}.$$
We thus have
$$J = - 2\pi^2 \frac{\cos(a\pi)/i}{\sin^2(a\pi)} \frac{1}{2i}$$
This is
$$\bbox[5px,border:2px solid #00A000]{
J = \pi^2 \frac{\cos(a\pi)}{\sin^2(a\pi)}.}$$
