$$\int _0^{\infty }\ln \left(\frac{e^x+1}{e^x-1}\right)dx$$
I am having trouble finding the solution and I am starting to believe that there is no answer even though they said there is
$$\int _0^{\infty }\ln \left(\frac{e^x+1}{e^x-1}\right)dx$$
I am having trouble finding the solution and I am starting to believe that there is no answer even though they said there is
With $t= \frac{e^x+1}{e^x-1} $
$$I=\int _0^{\infty }\ln \frac{e^x+1}{e^x-1}dx =\int_1^\infty\frac{2\ln t}{t^2-1}dt =\int_0^\infty\frac{\ln t}{t^2-1}dt $$
Let $ J(\alpha) = \int_0^\infty \frac{\ln (1-\alpha^2 + \alpha^2 t^2)}{2(t^2-1)}dt $ and evaluate $$ J'(\alpha) =\int_0^\infty \frac{\alpha dt}{1-\alpha^2 + \alpha^2 t^2} = \frac{\pi/2}{\sqrt{1-\alpha^2}}$$
Then
$$ I =J(1) =\int_0^1 J'(\alpha) d\alpha =\frac\pi2\int_0^1 \frac{d\alpha}{\sqrt{1-\alpha^2}} = \frac{\pi^2}{4}$$
You are looking for $$-\int_0^\infty \log\tanh(x/2)\,dx.$$ To make progress, split the integrals and expand the logarithm into its Taylor expansion: $$\int_0^\infty \log\left(1+e^{-x}\right) - \log\left(1-e^{-x}\right)\,dx=\sum_{n=1}^\infty\int_0^\infty\frac{(-1)^{n-1}}{n} e^{-nx}+\frac{1}{n}e^{-nx}\,dx.$$ The sum you obtain after evaluating the integrals is then $$\eta(2)+\zeta(2),$$ where $\zeta(s)$ is the zeta function, and $\eta(s)$ its cousin, the Dirichlet eta function. We can also directly evaluate the sum using just $\zeta(2)=\pi^2/6$: $$2\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}=2\left[\zeta(2) - \zeta(2)/2^2\right]=\pi^2/4.$$
Notice that if you factor an $e^x$ from the numerator and the denominator than use logarithm rules you get: $\int_0^{\infty} \ln{\left(1+e^{-x}\right)}-\ln{\left(1-e^{-x}\right)} \; dx$
Which can be converted into the following using the maclaurin series of $\ln{\left(1+x\right)}$ and $\ln{\left(1-x\right)}$: $\int_0^{\infty} \sum_{n=1}^{\infty} \frac{{\left(-1\right)}^{n+1}e^{-xn}}{n}+\sum_{n=1}^{\infty} \frac{e^{-xn}}{n} \;dx$.
Then using Fubini's theorem, we are allowed to interchange the integration and summation for this integral:
$\sum_{n=1}^{\infty}\frac{{\left(-1\right)}^{n+1}}{n} \int_0^{\infty} e^{-xn} \;dx + \sum_{n=1}^{\infty} \frac{1}{n} \int_0^{\infty} e^{-xn} \;dx$.
Then evaluating the integrals are simple because n is treated as a constant. $\sum_{n=1}^{\infty} \frac{{\left(-1\right)}^{n+1}}{n} \cdot \frac{1}{n} + \sum_{n=1}^{\infty}\frac{1}{n} \cdot \frac{1}{n}$
The second summation is the sum of sum of reciprocals of squares, or $\zeta\left(2\right)$, and the first summation is the alternating sum of the reciprocals of squares. The second summation converges to $\frac{\pi^2}{6}$ and the first summation converges to $\frac{\pi^2}{12}$. There are many proofs online for these two summations. Add the two values together to obtain the value of the integral: $\boxed{\frac{\pi^2}{4}}$.
Sorry if my formatting is poor, I'm learning.
This is$$\int_0^\infty\ln\frac{1+e^{-x}}{1-e^{-x}}dx=\int_0^\infty 2(e^{-x}+e^{-3x}/3+\cdots)dx=2(1+1/3^2+\cdots)=\pi^2/4.$$@Ty's answer explains this in more detail.