Prove that $\int_0^{\infty} \frac{\ln x \,dx}{x^b(x+1)}=\pi ^2 \cot(\pi b) \csc(\pi b)$ Prove that $$\int_0^{\infty} \frac{\ln x}{x^b(x+1)} dx=\pi ^2 \cot(\pi b) \csc(\pi b)$$ for $0<b<1$.
It is not hard to show it equals to 0 when $b=1/2$, but I don't know what to do next.
 A: Let $\dfrac{1}{1+x}=u$ then
\begin{align}
\int_0^{\infty} \frac{\ln x}{x^b(x+1)} dx 
&= -\dfrac{d}{db}\int_0^{\infty} \frac{1}{x^b(x+1)} dx \\
&= -\dfrac{d}{db}\int_0^1 u^{b-1}(1-u)^{-b} du \\
&= -\dfrac{d}{db}\left(\Gamma(b)\Gamma(1-b)\right) \\
&= -\dfrac{d}{db}\left(\dfrac{\pi}{\sin\pi b}\right) \\
&= \color{blue}{\pi ^2 \cot\pi b\csc\pi b}
\end{align}
A: We integrate with $b$ a real from $(0,1)$
$$f(z) = \frac{\mathrm{Log}(z)}{z+1}
\exp(-b\times \mathrm{Log}(z))$$
around a  keyhole contour  with the  slot on  the positive  real axis,
which  is also  where  the  branch cut  of  the  logarithm is  located
(argument of  the logarithm is  between $0$  and $2\pi$). Now  for the
large circle we get $\lim_{R\to\infty} 2\pi R  \log R / R^b /R = 0$ so
there is  no contribution in the  limit.  For the small  circle around
the origin we find $\lim_{\epsilon\to\  0} 2\pi \epsilon \log \epsilon
/ \epsilon^b = \lim_{\epsilon\to\ 0} 2\pi \epsilon^{1-b} \log \epsilon
= 0$ so there is no contribution here either. 
We get for the upper line segment
$$\int_0^\infty \frac{\log x}{x+1}
\exp(-b\times \log x) \; dx$$
which is  our target  integral, call  it $J$.  The lower  line segment
contributes
$$-\int_0^\infty \frac{\log x + 2\pi i}{x+1}
\exp(-b\times \log x) \exp(-b\times 2\pi i) \; dx
\\ = - \exp(-b\times 2\pi i)
\int_0^\infty \frac{\log x + 2\pi i}{x+1}
\exp(-b\times \log x) \; dx
\\ = - \exp(-b\times 2\pi i)  J
- \exp(-b\times 2\pi i)  2\pi i \int_0^\infty \frac{1}{x+1}
\exp(-b\times \log x) \; dx
\\ = - \exp(-b\times 2\pi i)  J
- \exp(-b\times 2\pi i)  2\pi i K.$$
where $J$ and $K$ are real numbers. We thus have
$$(1- \exp(-b\times 2\pi i))J
- \exp(-b\times 2\pi i) 2\pi i K =
2\pi i  \mathrm{Res}_{z=-1} f(z).$$
The residue now yields
$$(1- \exp(-b\times 2\pi i))J
- \exp(-b\times 2\pi i) 2\pi i K =
2\pi i \times \pi i \exp(-b \times \pi i)$$
or
$$(\exp(b\times \pi i) - \exp(-b\times \pi i))J
- \exp(-b\times \pi i) 2\pi i K =
2\pi i \times \pi i$$
and finally
$$\sin(\pi b) J
- \exp(-b\times \pi i) \pi K =
\pi \times \pi i.$$
Using the same contour and the same branch of the logarithm to compute
$K$ we find with
$$g(z) = \frac{1}{z+1}
\exp(-b\times \mathrm{Log}(z))$$
that
$$(1-\exp(-b \times 2\pi i)) K = 2\pi i \times
\mathrm{Res}_{z=-1} g(z)
= 2\pi i \times
\exp(-b \times \pi i)$$
which yields
$$2i \sin(\pi b) K = 2\pi i
\quad\text{so that}\quad
K = \frac{\pi}{\sin(\pi b)}.$$
Taking the real part of the equation linking $J$ and $K$ we get
$$\sin(\pi b) J - \cos(-\pi b) \frac{\pi^2}{\sin(\pi b)} = 0$$
or
$$\bbox[5px,border:2px solid #00A000]{
J = \pi^2 \cot(\pi b) \csc(\pi b)}$$
as claimed.
A: You might start with $$\int_0^\infty \dfrac{dx}{x^b(x+1)}  = \pi \csc(\pi b)$$
and differentiate with respect to $b$.
