How to tackle the integral $\int_{0}^{\infty} \frac{\ln x}{x^{n}-1} d x$? In my post, I started to investigate the integral $\displaystyle \int_{0}^{\infty} \frac{\ln x}{x^{2}-1} d x$.  Fortunately,
$$\displaystyle \int_{0}^{\infty} \frac{\ln x}{x^{2}-1} d x =2 \int_{0}^{1} \frac{\ln x}{x^{2}-1} d x.$$
So we only need to evaluate the integral $J$ using series and integration by part.
$\displaystyle  \begin{aligned} J\displaystyle  & =  \int_{0}^{1} \frac{\ln x}{1-x^{2}} d x =\sum_{k=0}^{\infty} \int_{0}^{1} x^{2 k} \ln x d x=\sum_{k=0}^{\infty}\left(\left[\frac{x^{2 k+1} \ln x}{2 k+1}\right]_{0}^{1}-\frac{1}{2 k+1} \int_{0}^{1} x^{2 k+1} \cdot \frac{1}{x} d x\right) \\\displaystyle &=-\sum_{k=0}^{\infty}\frac{1}{(2 k+1)^{2}}=-\frac{\pi^{2}}{8} \end{aligned} \tag*{} $
$$\therefore \displaystyle \int_{0}^{\infty} \frac{\ln x}{x^{2}-1} d x =-2J=\frac{\pi^{2}}{4} $$
However, when I began to increase the power $n$, I found, in Wolframalpha, that there is a pattern for the integral$$
I_{n}=\int_{0}^{\infty} \frac{\ln x}{x^{n}-1} d x
$$
$$
\begin{array}{|c|c|c|c|c|c|c|c|c|}
\hline n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline I_{n} & \text { Diverges } & \frac{\pi^{2}}{4} & \frac{4 \pi^{2}}{27} & \frac{\pi ^2}{8} & \frac{8 \pi^{2}}{25(5-\sqrt{5})} & \frac{\pi^{2}}{9} & \frac{\pi^{2}}{49} \csc ^{2}\left(\frac{\pi}{7}\right) & \frac{\pi^{2}}{64} \csc ^{2}\left(\frac{\pi}{8}\right) \\
\hline
\end{array}
$$
By the pattern, let’s guess the formula for $I_n$ as $$
I_{n}=\left(\frac{\pi}{n}\right)^{2}\csc ^{2}\left(\frac{\pi}{n}\right).
$$
How to prove it? Is it difficult or interesting?  Looking forward to your suggestions and  proofs.
 A: In order to make use of power series, I split the integration interval of $I_n$ as:
$$
I_n=\underbrace{\int_{0}^{1} \frac{\ln x}{x^{n}-1} d x}_{J}+\underbrace{\int_{1}^{\infty} \frac{\ln x}{x^{n}-1} d x}_{K} $$
$$
\begin{aligned}
J &=-\sum_{k=0}^{\infty} \int_{0}^{1} x^{n k} \ln x d x \\
&=-\sum_{k=0}^{\infty} \int_{0}^{1} \ln x d\left(\frac{x^{n k+1}}{n k+1}\right) \\
& \stackrel{IB P}{=}-\sum_{k=0}^{\infty}\left(\left[\frac{x^{n k+1}\ln x}{n k+1}\right]_{0}^{1}-\int_{0}^{1} \frac{x^{n k}}{n k+1} d x\right) \\
&=\sum_{k=0}^{\infty} \frac{1}{(n k+1)^{2}} \\
&=\frac{1}{n^{2}} \sum_{k=0}^{\infty} \frac{1}{\left(\frac{1}{n}+k\right)^{2}}
\end{aligned}
$$
Similarly, $$
\begin{aligned}
K &=\int_{1}^{\infty} \frac{\ln x}{x^{n}\left(1-\frac{1}{x^{n}}\right)} d x \\
&=\sum_{k=0}^{\infty} \int_{1}^{\infty} \ln x \cdot x^{-n-n k} d x\\ &\stackrel{IBP}{=}\sum_{k=0}^{\infty}\left(\left[\frac{x^{-n-n k+1}\ln x}{-n-n k+1}\right]_{1}^{\infty}-\int_{1}^{\infty} \frac{x^{-n-n k}}{-n-n k+1} d x\right)\\& =\sum_{k=0}^{\infty} \frac{1}{[-n (k+1)+1]^{2}}\\
\end{aligned}
$$
Reindexing by replacing $k$ by $-k-1$ gives $$
\begin{aligned}
K&=\sum_{k=-\infty}^{-1} \frac{1}{(n k+1)^{2}}=\frac{1}{n^{2}} \sum_{k=-\infty}^{-1} \frac{1}{\left(\frac{1}{n}+k\right)^{2}}
\end{aligned}
$$
Finally, adding $J$ and $K$ gives $$
\begin{aligned}
I_n &=\frac{1}{n^{2}} \sum_{k=-\infty}^{-1} \frac{1}{\left(\frac{1}{n}+k\right)^{2}}+\frac{1}{n^{2}} \sum_{k=0}^{\infty} \frac{1}{\left(\frac{1}{n}+k\right)^{2}} =\frac{1}{n^{2}} \sum_{k=-\infty}^{\infty} \frac{1}{\left(\frac{1}{n}+k\right)^{2}}
\end{aligned}
$$
By the theorem, $$
\sum_{k=-\infty}^{\infty} \frac{1}{z+k}=\pi \cot (\pi z)
$$
Differentiating w.r.t. $z$ yields
$$
\sum_{k=-\infty}^{\infty} \frac{1}{(z+k)^{2}}=\pi^{2} \csc^{2}(\pi z)
$$
Putting $ \displaystyle z=\frac{1}{n}$ yields the conclusion that
$$\boxed{I_n=\left(\frac{\pi}{n}\right)^{2} \csc ^{2}\left(\frac{\pi}{n}\right)}.$$
Wish you enjoy the proof.  Your comments and alternate proofs are warmly welcome.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,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{\on}[1]{\operatorname{#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}$
\begin{align}
&\bbox[5px,#ffd]{2\int_{0}^{1}{\ln\pars{x} \over x^{2} - 1}\dd x} =
\left. 2\,\partiald{}{\nu}\int_{0}^{1}{1 - x^{\nu} \over
1 - x^{2}}\,\dd x\right\vert_{\nu\ =\ 0}
\\[5mm] \stackrel{x^{2}\ \mapsto\ x}{=}\,\,\,\, &
\left. \partiald{}{\nu}\int_{0}^{1}{x^{-1/2}\ -\ x^{\nu/2 - 1/2} \,\,\,\over
1 - x}\,\dd x\right\vert_{\nu\ =\ 0}
\\[5mm] = & \
\partiald{}{\nu}\bracks{%
\int_{0}^{1}{1\ -\ x^{\nu/2 - 1/2} \,\,\,\over 1 - x}\,\dd x -
\int_{0}^{1}{1\ -\ x^{-1/2} \,\,\,\over 1 - x}\,\dd x
}_{\nu\ =\ 0}
\\[5mm] = & \
\left.\partiald{\Psi\pars{\nu/2 + 1/2}}{\nu}
\right\vert_{\nu\ =\ 0} = {1 \over 2}\,\Psi\,'\pars{1 \over 2} =
\bbx{\pi^{2} \over 4} \approx 2.4674
\end{align}
