TITLE: Calculating the integral $\int_0^{\infty}{\frac{\ln x}{1+x^n}}$ using complex analysis
QUESTION [25 upvotes]: I need to calculate $\int_0^{\infty}{\frac{\ln x}{1+x^n}}$ $,n\geq2$ using complex analysis. I probably need to use the Residue Theorem.
I use the function $f(z)={\frac{\ln z}{1+z^n}}$ in the normal branch.
I've tried to use this contour.

Where $\theta$ is an angle so that only $z_{0}$ will be in the domain (I hope this is clear from the drawing)
I estimated $|\int_{\Gamma_{R}}|$ and $|\int_{\Gamma_{\epsilon}}|$ and showed that they must tend to $0$ when $\epsilon \rightarrow0$ and $R \rightarrow\infty$. (Is it true?)
However I'm having trouble calculating $\int_{\Gamma_{2}}$ . Does it have something to do with choosing the "right" $\theta$?
Any ideas?
Thanks!
UPDATE
After Christopher's comment I chose $\theta=\frac{2\pi}{n}$ which gives, after the paramatrization $\Gamma (t) = te^{\frac{2\pi i}{n}}$, $t\in(\epsilon,R)$:
$$\int_{\Gamma_{2}}{\frac{\ln z}{1+z^n}dz} = \int_{\epsilon}^{R}{\frac{\ln (te^\frac{2\pi i}{n})}{1+t^n}e^\frac{2\pi i}{n}dt} = 
e^\frac{2\pi i}{n}\int_{\epsilon}^{R}{\frac{\ln t}{1+t^n}dt} +
ie^\frac{2\pi i}{n}\int_{\epsilon}^{R}{\frac{\frac{2\pi}{n}}{1+t^n}dt}  =$$
$$
=
e^\frac{2\pi i}{n}\int_{0}^{\infty}{\frac{\ln t}{1+t^n}dt} +
ie^\frac{2\pi i}{n}\int_{0}^{\infty}{\frac{\frac{2\pi}{n}}{1+t^n}dt}
$$
But I have no idea how to deal with the second integral.

REPLY [5 votes]: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
$\ds{\int_{0}^{\infty}{\ln\pars{x} \over 1 + x^{n}}\,\dd x:\ {\large ?}.\qquad
     n \geq 2.}$

\begin{align}
&\color{#c00000}{\int_{0}^{\infty}{\ln\pars{x} \over 1 + x^{n}}\,\dd x}
=\int_{0}^{\infty}{\ln\pars{x^{1/n}} \over 1 + x}\,{1 \over n}\,x^{1/n - 1}\dd x
={1 \over n^{2}}\int_{0}^{\infty}{x^{1/n - 1}\ln\pars{x} \over 1 + x}\,\dd x
\\[3mm]&={1 \over n^{2}}\lim_{\mu \to 1/n - 1}\partiald{}{\mu}
\color{#00f}{\int_{0}^{\infty}{x^{\mu} \over 1 + x}\,\dd x}\tag{1}
\end{align}

\begin{align}
&\color{#00f}{\int_{0}^{\infty}{x^{\mu} \over 1 + x}\,\dd x}
=2\pi\ic\expo{\pi\mu\ic}
-\int^{0}_{\infty}{x^{\mu}\expo{2\pi\mu\ic} \over 1 + x}\,\dd x 
=2\pi\ic\expo{\pi\mu\ic}
+\expo{2\pi\mu\ic}\color{#00f}{\int_{0}^{\infty}{x^{\mu} \over 1 + x}\,\dd x}
\end{align}

$$
\color{#00f}{\int_{0}^{\infty}{x^{\mu} \over 1 + x}\,\dd x}
=2\pi\ic\expo{\pi\mu\ic}\,{1 \over 1 - \expo{2\pi\mu\ic}}
=\pi\,{2\ic \over \expo{-\pi\mu\ic} - \expo{\pi\mu\ic}}
=-\pi\csc\pars{\pi\mu}
$$

Replacing in $\pars{1}$:

\begin{align}
&\color{#66f}{\large\int_{0}^{\infty}{\ln\pars{x} \over 1 + x^{n}}\,\dd x}
={1 \over n^{2}}
\lim_{\mu \to 1/n - 1}\partiald{\bracks{-\pi\csc\pars{\pi\mu}}}{\mu}
\\[3mm]&={1 \over n^{2}}\,
\lim_{\mu \to 1/n - 1}\bracks{\pi^{2}\cot\pars{\pi\mu}\csc\pars{\pi\mu}}
={\pi^{2} \over n^{2}}\,\cot\pars{{\pi \over n} - \pi}
\csc\pars{{\pi \over n} - \pi}
\\[3mm]&=\color{#66f}{\large-\,{\pi^{2} \over n^{2}}\,\cot\pars{{\pi \over n}}
\csc\pars{{\pi \over n}}}\,,\qquad n > 1
\end{align}