<s>[INST] Integrate $\int_{-\infty}^\infty \frac{x}{\sinh x}~dx$ From a Problem Set on residues:
Evaluate $$\int_0^\infty \frac{\log x}{(x-1) \sqrt{x}}~dx.$$
After the substitution $x = e^u$ and easy computations, the integral becomes $$\int_{-\infty}^\infty \frac{x}{\sinh x}~dx.$$
 [/INST] We have
$$\int_1^{\infty} \dfrac{\log(x)}{(x-1)\sqrt{x}}dx = \int_1^0 \dfrac{\log(1/x)}{(1/x-1)1/\sqrt{x}} \left(-\dfrac{dx}{x^2}\right) = \int_0^1 \dfrac{-\log(x)}{(1-x)\sqrt{x}}dx = \int_0^1 \dfrac{\log(x)}{(x-1)\sqrt{x}}dx$$
Hence, the integral is
\begin{align}
I & = -2\int_0^1 \dfrac{\log(x)dx}{(1-x)\sqrt{x}} = -2 \sum_{k=0}^{\infty}\int_0^1 x^{k-1/2}\log(x)dx = 2\sum_{k=0}^{\infty} \dfrac1{(k+1/2)^2} =8 \sum_{k=0}^{\infty} \dfrac1{(2k+1)^2} = \pi^2
\end{align}

A very similar method to evaluate $$I=\int_{-\infty}^{\infty} \dfrac{x}{\sinh(x)}dx = 2\int_0^{\infty} \dfrac{x}{\sinh(x)}dx$$
We have
\begin{align}
I & = 2 \cdot \int_0^{\infty} \dfrac{2x}{e^x-e^{-x}}dx = \int_0^{\infty} \dfrac{4xe^{-x}}{1-e^{-2x}}dx = 4 \sum_{k=0}^{\infty} \int_0^{\infty}xe^{-(2k+1)x}dx = 4 \sum_{k=0}^{\infty} \dfrac1{(2k+1)^2} = \dfrac{\pi^2}2
\end{align}
</s>