Show $\int_{0}^{\infty}\frac{x}{x^{2}+1}\log\left(\left|\frac{x^r+1}{x^r-1}\right|\right)dx = \frac{\pi^2}{4r}$

absolute valueintegrationlogarithms

After playing around with a few values of $r$, I have the following conjecture:
$$\int_{0}^{\infty}\frac{x}{x^{2}+1}\log\left(\left|\frac{x^r+1}{x^r-1}\right|\right)dx = \frac{\pi^2}{4r}$$ for $r\gt 0$. My question is whether or not this is true and how to show as such.


I was inspired to ask this question after reading Cody's about showing $$\displaystyle \int_{0}^{\infty}\frac{x}{x^{2}+a^{2}}\log\left(\left|\frac{x+1}{x-1}\right|\right)dx=\pi\tan^{-1}(1/a)$$
One can see that the $r=1$ case of mine and the $a=1$ case of Cody's coincide.

That integral with $r=1$ lends itself to contour integration in the upper half plane because $\log\left(\left|\frac{x+1}{x-1}\right|\right)$ is an odd function, making the integrand even. However, my integrand lacks that nice symmetry for arbitrary $r$. For odd integers $r$, we regain that symmetry but branch points in the upper half plane add complexity. I'm not sure whether the integral with irrational $r$ can be handled with complex techniques, so I feel unsure of how to proceed.

Best Answer

I'll offer another approach. You can easily show $f(x):=\tfrac{x}{x^2+1}\ln|\tfrac{x^r+1}{x^r-1}|$ satisfies $f(\tfrac{1}{x})=f(x)$ so $$\int_0^\infty f(x)dx=\int_0^1 (1+\tfrac{1}{x^2})f(x)dx=\int_0^1 \tfrac{1}{x}\ln\tfrac{1+x^r}{1-x^r}dx.$$With $y=x^r$ your integral becomes $\tfrac{1}{r}\int_0^1 \tfrac{1}{y}\ln\tfrac{1+y}{1-y}dy$, so the $r=1$ case you already know completes the proof.

Related Question