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.