Contour Integral of $\log(z)/(1+z^a)$ where $a\gt1$ I am asked to prove that:
$$ \int_{0}^{+\infty}\frac{\log z}{1+z^{\alpha}}\,dz = -\frac{\pi^2}{\alpha^2}\cdot\frac{\cos\frac{\pi}{\alpha}}{\sin^2\frac{\pi}{\alpha}},$$
provided that $\alpha > 1$, with a complex analytic method, i.e. contour integration.
However, I was not able to find a good candidate as a meromorphic function to integrate, neither a proper contour. Would you mind giving me a hand?
 A: To do the contour integration, use a circular wedge of radius $R$ and angle $2 \pi/\alpha$ in the complex plane.  This wedge encloses the pole at $z=e^{i \pi/\alpha}$.  The integral about the arc vanishes as $R \to \infty$.  (We technically should have a small cutout of radius $\epsilon$ about the origin, but we may ignore that piece as there is no contribution.)  

The integrals that remain are over the real axis and over the line in the complex plane that is at an angle $\alpha$ with respect tot he real axis.  Thus, by the residue theorem,
$$\int_0^{\infty} dx \frac{\log{x}}{1+x^{\alpha}} - e^{i 2 \pi/\alpha} \int_0^{\infty} dx \frac{\log{x}+i 2 \pi/\alpha}{1+x^{\alpha}} = i 2 \pi \operatorname*{Res}_{z=e^{i \pi/\alpha}} \frac{\log{z}}{1+z^{\alpha}} $$
which becomes
$$\left ( 1-e^{i 2 \pi/\alpha} \right ) \int_0^{\infty} dx \frac{\log{x}}{1+x^{\alpha}} - i \frac{2 \pi}{\alpha} e^{i 2 \pi/\alpha} \int_0^{\infty} \frac{dx}{1+x^{\alpha}} = \frac{2 \pi^2}{\alpha^2} e^{i \pi/\alpha}$$
To evaluate the second integral on the LHS, use the same contour and pole:
$$\left ( 1-e^{i 2 \pi/\alpha} \right )\int_0^{\infty} \frac{dx}{1+x^{\alpha}} = i 2 \pi \operatorname*{Res}_{z=e^{i \pi/\alpha}} \frac{1}{1+z^{\alpha}}  = -\frac{i 2 \pi}{\alpha} e^{i \pi/\alpha}$$
so that
$$\int_0^{\infty} \frac{dx}{1+x^{\alpha}} = \frac{\pi}{\alpha \sin{(\pi/\alpha)}}$$
Thus, we now have that
$$-i 2 \sin{(\pi/\alpha)}\int_0^{\infty} dx \frac{\log{x}}{1+x^{\alpha}} - i \frac{2 \pi^2}{\alpha^2} \frac{e^{i \pi/\alpha}}{\sin{(\pi/\alpha)}} = \frac{2 \pi^2}{\alpha^2} $$
Take real and imaginary parts of the second term, and the real part cancels the RHS.  Thus, dividing by the factor in front of the integral, we are left with
$$\int_0^{\infty} dx \frac{\log{x}}{1+x^{\alpha}} = -\frac{\pi^2}{\alpha^2} \frac{\cos{(\pi/\alpha)}}{\sin^2{(\pi/\alpha)}} $$
as was to be shown.
A: We may notice that:
$$\frac{\log z}{1+z^\alpha}=\frac{d}{d\alpha}\log\left(\frac{z^\alpha}{1+z^\alpha}\right)\tag{1}$$
hence it is enough to compute:
$$ I(\alpha)=\int_{0}^{+\infty}\log\left(\frac{z^\alpha}{1+z^\alpha}\right)\,dz = -\frac{1}{\alpha}\int_{0}^{+\infty}z^{\frac{1}{\alpha}-1}\log\left(1+\frac{1}{z}\right)\,dz$$
or:
$$ I(\alpha) = -\frac{1}{\alpha}\int_{0}^{+\infty}\frac{\log(1+z)}{z^{1+\frac{1}{\alpha}}}\,dz = -\frac{1}{\alpha}\left.\frac{d}{d\beta}\int_{0}^{+\infty}\frac{(z+1)^\beta}{z^{1+\frac{1}{\alpha}}}\,dz\,\right|_{\beta=0^+}\tag{2}$$
that exploiting the Euler beta function is just:
$$ I(\alpha) = -\frac{1}{\alpha}\lim_{\beta\to 0^+}\frac{d}{d\beta}\left(\frac{\Gamma\left(-\frac{1}{\alpha}\right)\Gamma\left(\frac{1}{\alpha}-\beta\right)}{\Gamma\left(-\beta\right)}\right)=-\frac{\pi}{\sin\frac{\pi}{\alpha}}\tag{3}$$
by the $\Gamma$ reflection formula. If we differentiate $(3)$ with respect to $\alpha$ we get:
$$ \int_{0}^{+\infty}\frac{\log z}{1+z^{\alpha}}\,dz = -\frac{\pi^2}{\alpha^2}\cdot\frac{\cos\frac{\pi}{\alpha}}{\sin^2\frac{\pi}{\alpha}}\tag{4}$$
as wanted.
A: This is similar to Jack D'Aurizio's solution, but proceeds by making use of the derivative $\displaystyle \frac{dx^b}{db}=\log(x)x^b$.
So, we begin by writing the integral of interest as
$$\begin{align}
\int_0^\infty \frac{\log(z)}{1+z^\alpha}\,dz&=\left.\frac{d}{db}\left(\int_0^\infty \frac{x^b}{1+x^\alpha}\,dx\right)\right|_{b=0}\tag1
\end{align}$$
Enforcing the substitution $x\to x^{1/\alpha}$ in $(1)$ reveals
$$\begin{align}
\int_0^\infty \frac{\log(z)}{1+z^\alpha}\,dz&=\left.\frac{d}{db}\left(\frac1\alpha\int_0^\infty \frac{x^{(b+1)/\alpha-1}}{1+x}\,dx\right)\right|_{b=0}\tag2
\end{align}$$

Using the integral representation $\displaystyle B(x,y)=\int_0^\infty\frac{t^{x-1}}{(1+t)^{x+y}}\,dt$ of the Beta function, the relationship $\displaystyle B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(y)}$, and the reflection formula $\displaystyle \Gamma(x)\Gamma(1-x)=\frac{\pi }{\sin(\pi x)}$ in $(2)$ (See This Answer for Development of these relationships), we find that $(2)$ can be expressed as 

$$\begin{align}
\int_0^\infty \frac{\log(z)}{1+z^\alpha}\,dz&=\left.\frac{d}{db}\left(\frac1\alpha B\left(\frac{b+1}{\alpha},1-\frac{b+1}{\alpha}\right)\right)\right|_{b=0}\\\\
&=\frac1\alpha \left.\frac{d}{db}\left(\Gamma\left(\frac{b+1}{\alpha}\right)\Gamma\left(1-\frac{b+1}{\alpha}\right)\right)\right|_{b=0}\\\\
&=\frac1\alpha \left.\frac{d}{db}\left(\frac{\pi}{\sin\left(\pi(b+1)/\alpha\right)}\right)\right|_{b=0}\\\\
&=-\frac{\pi^2}{\alpha^2}\frac{\cos(\pi \alpha)}{\sin^2(\pi \alpha)}
\end{align}$$
as was to be shown!
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}$

I start with the following rewriting
  $\ds{\pars{~z^{\alpha} \mapsto z~}}$

\begin{equation}
\left.\int_{0}^{\infty}\!\!{\ln\pars{z} \over 1 + z^{\alpha}}\,\dd z\,\right\vert_{\ \alpha\ >\ 1} =
{1 \over \alpha^{2}}\int_{0}^{\infty}\!\!{z^{1/\alpha - 1}\ln\pars{z} \over
1 + z}\,\dd z\label{1}\tag{1}
\end{equation}

I'll consider
$\ds{\,\mc{I} \equiv
\oint_{\mc{C}}{z^{1/\alpha - 1}\ln\pars{z} \over 1 - z}\,\dd z}$. Both $\ds{z^{1/\alpha - 1}\ \mbox{and}\ \ln}$ are its principal branches. The contour $\ds{\,\mc{C}}$ is a key-hole one which 'takes care' of the above mentioned branch-cuts. Obviously, $\ds{\,\mc{I} = 0}$.
\begin{align}
0 & \,\,\,\stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\,
-\int_{-\infty}^{-\epsilon}
{\pars{-x}^{1/\alpha - 1}
\exp\pars{\bracks{1/\alpha - 1}\ic\pi}\bracks{\ln\pars{-x} + \ic\pi} \over
1 - x}\,\dd x
\\[2mm] &
\phantom{\,\,\,\stackrel{\mrm{as}\ \epsilon\ \to\ 0^{+}}{\sim}\,\,\,\,\,\,}
-\int_{-\epsilon}^{-\infty}
{\pars{-x}^{1/\alpha - 1}
\exp\pars{-\bracks{1/\alpha - 1}\ic\pi}\bracks{\ln\pars{-x} - \ic\pi} \over
1 - x}\,\dd x
\end{align}
The integral around an indented semicircle around the origin and around a circumference with a radius $\ds{R \to \infty}$ vanish out and they were omitted in the above expression. Then, as $\ds{\epsilon \to 0^{+}}$,
\begin{align}
0 & =
\expo{\ic\pi/\alpha}\int_{0}^{\infty}
{x^{1/\alpha - 1}\bracks{\ln\pars{x} + \ic\pi} \over 1 + x}\,\dd x -
\expo{-\ic\pi/\alpha}\int_{0}^{\infty}
{x^{1/\alpha - 1}\bracks{\ln\pars{x} - \ic\pi} \over 1 + x}\,\dd x
\\[5mm] & =
2\ic\sin\pars{\pi \over a}
\int_{0}^{\infty}{x^{1/\alpha - 1}\ln\pars{x} \over 1 + x}\,\dd x +
2\pi\ic\cos\pars{\pi \over a}
\int_{0}^{\infty}{x^{1/\alpha - 1} \over 1 + x}\,\dd x
\end{align}
\begin{equation}
\bbx{\int_{0}^{\infty}{x^{1/\alpha - 1}\ln\pars{x} \over 1 + x}\,\dd x =
-\pi\cot\pars{\pi \over a}
\int_{0}^{\infty}{x^{1/\alpha - 1} \over 1 + x}\,\dd x}\label{2}\tag{2}
\end{equation}

The remaining integral is evaluated by a similar procedure ( as the above one ). Namely:
\begin{align}
&\bbx{\int_{0}^{\infty}{x^{1/\alpha - 1} \over 1 + x}\,\dd x =
\pi\csc\pars{\pi \over a}}\label{3}\tag{3}
\end{align}


With \eqref{1}, \eqref{2} and \eqref{3}:

$$\bbox[15px,#ffe,border:1px dotted navy]{\ds{%
\left.\int_{0}^{\infty}\!\!{\ln\pars{z} \over 1 + z^{\alpha}}\,\dd z\,\right\vert_{\ \alpha\ >\ 1} =
-\pars{\pi \over \alpha}^{2}\cot\pars{\pi \over a}\csc\pars{\pi \over a}}}
$$
