Evaluating $\int_0^{\infty} \frac{\ln (x)}{1-x^n}\text{d}x$

definite integrals

This is just for recreational purposes.

I've been wondering how to evaluate the following integral:

$$\int_0^{\infty} \frac{\ln (x)}{1-x^n}\text{d}x$$

Because I noticed that certain values for $n$ lead to some nice rational multiples of $\pi^2$ when evaluated in WolframAlpha. This leads me to believe we should somehow get it into series form to turn it into something Basel-esque. However, I've been struggling with this. I managed to put into series form a related integral, to at least show some kind of context/effort, which is:

$$\int_0^{1} \frac{\ln (x)}{1-x^n}\text{d}x$$

When inputting the series expansion of $1-x^n$, one simply needs to evaluate an integral of the form $x^{kn} \ln(x)$, which is simple, and the following series emerges:

$$\int_0^{1} \frac{\ln (x)}{1-x^n}\text{d}x = \sum_{k=0}^{\infty} \frac{1}{(kn+1)^2}$$

However, this approach doesn't work with bounds from $0$ to $\infty$ for obvious reasons. Could someone give me some help?

Best Answer

It turns out that $\int_0^1\frac{\ln(x)}{1-x^a}\mathrm{d}x=-\frac{1}{a^2}\sum_{n=0}^{\infty}\frac{1}{(n+1/a)^2}$ (I think you dropped a minus sign). Enforcing the substitution $x\rightarrow 1/x$ yields $$\int_1^{\infty}\frac{\ln(x)}{1-x^a}\mathrm{d}x=\int_0^1\frac{x^{a-2}\ln(x)}{1-x^a}\mathrm{d}x=\sum_{n=0}^{\infty}\int_0^1\ln(x)x^{an+a-2}\mathrm{d}x=-\frac{1}{a^2}\sum_{n=0}^{\infty}\frac{1}{\big(n+1-1/a\big)^2}$$ Putting both pieces together yields $$\begin{eqnarray*}\int_0^{\infty}\frac{\ln(x)}{1-x^a}\mathrm{d}x&=&-\frac{1}{a^2}\Bigg[\sum_{n=0}^{\infty}\frac{1}{(n+1/a)^2}+\sum_{n=0}^{\infty}\frac{1}{(n+1-1/a)^2}\Bigg] \\ &=& -\frac{1}{a^2}\Bigg[\sum_{n=0}^{\infty}\frac{1}{(n+1/a)^2}+\sum_{n=1}^{\infty}\frac{1}{(-n+1/a)^2}\Bigg] \\ &=& -\frac{1}{a^2}\sum_{n=-\infty}^{\infty}\frac{1}{(n+1/a)^2} \end{eqnarray*}$$ It is a known result in complex analysis (using residues to evaluate sums of series) that for any $x\notin \mathbb{Z}$ we have $$\sum_{n=-\infty}^{\infty}\frac{1}{(n+x)^2}=\Big(\pi \csc(\pi x)\Big)^2$$ Taking $x$ to be $1/a$ yields $$\int_0^{\infty}\frac{\ln(x)}{1-x^a}\mathrm{d}x=-\frac{\pi^2}{a^2}\csc^2(\pi/a)$$