TITLE: Showing $\int_0^{\infty } \frac{1}{e^{2 x}+2 e^x \cos (x)+1} \, dx=\frac{\log (2)}{2}-\pi \sum _{n=0}^{\infty } \frac{1}{e^{\pi (2 n+1)}+1}$
QUESTION [13 upvotes]: How to prove

$$\int_0^{\infty } \frac{1}{e^{2 x}+2 e^x \cos (x)+1} \, dx=\frac{\log (2)}{2}-\pi  \sum _{n=0}^{\infty } \frac{1}{e^{\pi  (2 n+1)}+1}$$


$$\small \int_0^{\infty } \left(\frac{1}{e^{2 x}-2 e^x \cos (x)+1}-\frac{e^{-x}}{2 x^2}\right) \, dx=\pi  \sum _{n=1}^{\infty } \frac{1}{e^{2 \pi  n}-1}-\frac{\gamma }{2}+\frac{1}{2}-\frac{\pi }{8}+\frac{\log (2)}{4}$$

Any help will be appreciated.

REPLY [3 votes]: Neither of sums
$$
\sum^{\infty}_{n=0}\frac{1}{e^{(2n+1)\pi}+1}
$$
or
$$
\sum^{\infty}_{n=1}\frac{1}{e^{2n\pi}-1}
$$
have been evaluated in closed forms. I start searching for evaluations of the above two sums and ended up with this paper or if one don't have a Researchgate account this