Integral of ln(tanh(x)) – Calculus and Hyperbolic Functions

calculushyperbolic-functionsintegration

I'd like a hint toward how I could evaluate this definite integral. I'm aware it's likely to be non elementary and I haven't found a way to evaluate it yet:$$\int_0^\infty \ln(\tanh(x))\,\,\mathrm{d}x$$

If you're curious where this came from, I was looking at an integral involving $\ln(\sin(x))$ and I thought of this one.

Thanks.

Best Answer

By applying the definition of the hyperbolic tangent function in terms of the exponential we obtain

$$\begin{align} \int_0^{\infty}\log(\tanh(x))dx&=\int_0^{\infty}\log\left(\frac{e^x-e^{-x}}{e^x+e^{-x}}\right)dx \\ &=\int_0^{\infty}\log\left(\frac{1-e^{-2x}}{1+e^{-2x}}\right)dx\\ &=\int_0^{\infty}\log\left(1-e^{-2x}\right)-\log\left(1+e^{-2x}\right)dx \end{align}$$

Now by expanding the logarithm as a series $($!$)$ we further get

$$\begin{align} \int_0^{\infty}\log\left(1-e^{-2x}\right)-\log\left(1+e^{-2x}\right)dx&=\int_0^{\infty}-\sum_{n=1}^{\infty}\frac1{n}e^{-2nx}+\sum_{n=1}^{\infty}\frac{(-1)^n}{n}e^{-2nx}dx\\ &=-\sum_{n=1}^{\infty}\left[-\frac{e^{-2nx}}{2n^2}\right]_0^{\infty}+\sum_{n=1}^{\infty}\left[(-1)^{n+1}\frac{e^{-2nx}}{2n^2}\right]_0^{\infty}\\ &=-\sum_{n=1}^{\infty}\frac1{2n^2}-\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{2n^2}\\ &=-\frac12\zeta(2)-\frac12\eta(2)\\ &=-\frac12\frac{\pi^2}6-\frac12\frac{\pi^2}{12}\\ &=-\frac{\pi^2}8 \end{align}$$

Which is the desired result. $\zeta(s)$ denotes the Riemann Zeta Function and $\eta(s)$ the Dirichlet Eta Function respectively for which the values are known.

Anyway this solution is kind of unsteady since I cannot really justify the validity of the power series of the logarithmic functions $($which is normally restricted to $|x|<1$ $)$ nor the termwise integration. Nevertheless it leads to the right solution.


EDIT:

As illustrated by ComplexYetTrivial within the comments the validity of the series expansion of the logarithm is guaranteed due the the fact that $e^{-2x}<1$ for all $x>0$ from where the series converges. Whereas the termwise integration is justified by the monotone dominate convergence theorem. Thus my proposed solution seems to be entirely fine.

Related Question