# Closed form for $I(a)=\int_0^\infty \ln\left(\tanh(ax)\right)dx$?

I have been messing around with this integral that has some particular special values$$I(a)=\int_0^\infty \ln\left(\tanh(ax)\right)dx$$

I found that $$I(1)=-\frac{\pi^2}{8}$$ $$I\left(\frac{1}{2}\right)=-\frac{\pi^2}{4}$$ $$I\left(\frac{1}{4}\right)=-\frac{\pi^2}{2}$$ $$...$$ and so on. It appears that $$I(2^{-n})=-2^{n-3}\pi^2$$. Can anyone explain how to derive a general closed form for $$I(a)$$ or at least why $$I(2^{-n})$$ takes on the particular values above?

We have $$I^\prime(a)=\int_0^\infty\frac{x\operatorname{sech}^2 ax dx}{\tanh ax}=\int_0^\infty\frac{2x dx}{\sinh 2ax}=\frac{1}{2a^2}\int_0^\infty\frac{y dy}{\sinh y},$$so constants $$A,\,B$$ exist with$$I(a)=A-\frac{B}{a}.$$From your results we can infer $$A=0,\,B=\frac{\pi^2}{8}$$.
Edit: a slicker way is to write $$\int_0^\infty\ln\frac{1-e^{-2ax}}{1+e^{-2ax}}dx=-2\int_0^\infty\sum_{n=0}^\infty\frac{1}{2n+1}e^{-(4n+2)ax} dx=-\frac{\pi^2}{8a}.$$
• Wow, this is surprisingly simple! I did not consider differentiating. I also believe that the value of the last integral can be calculated by utilizing the geometric series and the value for $\zeta(2)$. Thank you so much! – aleden May 13 at 20:40
• I used wolfram alpha to calculate those values to see if there was any sort of pattern. Now I can see that $I(a)$ is proportionate to the constant $\frac{\pi^2}{8}$. – aleden May 13 at 20:45
• @J.G. What's the point in even differentiating? You can make the substitution $u=ax$ in $I(a)$ to conclude that $I(a)=\frac{k}a$ for some $k\in\mathbb{C}$. Then using $I(1)=k=-\frac{\pi^2}8$ gives the final result. – Peter Foreman May 13 at 21:37