Evaluate $\int_{0}^{+\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x}$
Evaluate : $$\int_{0}^{+\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x}$$
Related technique. Here is a closed form solution of the integral
$$\int_{0}^{+\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x} = -\frac{\ln(2)}{2}. $$
Here is the technique, consider the integral
$$ F(s) = \int_{0}^{+\infty }{e^{-sx}\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x}, $$
which implies
$$ F''(s) = \int_{0}^{+\infty }{e^{-sx}\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\text{d}x}. $$
The last integral is the Laplace transform of the function
$$ \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} $$
and equals
$$ F''(s) = \frac{1}{4}\,\psi' \left( \frac{1}{2}+\frac{1}{2}\,s \right) -\frac{1}{2s}. $$
Now, you need to integrate the last equation twice and determine the two constants of integrations, then take the limit as $s\to 0$ to get the result.
\begin{align} ? &\equiv {1 \over 4}\int_{-\infty}^{\infty} {x - \sinh\left(x\right) \over x^{2}\sinh\left(x\right)}\,{\rm d}x = {1 \over 4}\sum_{n = 1}^{\infty}2\pi{\rm i} \lim_{x \to {\rm i}\,n\,\pi} {\left\lbrack x - \sinh\left(x\right)\right\rbrack\left(x - {\rm i}n\pi\right) \over x^{2}\sinh\left(x\right)} \\[3mm]&= {\rm i}\,{\pi \over 2}\sum_{n = 1}^{\infty} {{\rm i}n\pi \over \left({\rm i}n\pi\right)^{2}}\,\lim_{x \to {\rm i}\,n\,\pi} {x - {\rm i}n\pi \over \sinh\left(x\right)} = {1 \over 2}\sum_{n = 1}^{\infty} {1 \over n}\,{1 \over \cosh\left({\rm i}n\pi\right)} = {1 \over 2}\sum_{n = 1}^{\infty} {1 \over n}\,{1 \over \cos\left(\pi n\right)} \\[3mm]&= {1 \over 2}\sum_{n = 1}^{\infty} {\left(-1\right)^{n} \over n} = {1 \over 2}\int_{0}^{1}{\rm d}x \left\lbrack {{\rm d} \over {\rm d}x}\sum_{n = 1}^{\infty} {\left(-1\right)^{n}x^{n} \over n} \right\rbrack = {1 \over 2}\int_{0}^{1}{\rm d}x\, \sum_{n = 1}^{\infty}\left(-1\right)^{n}x^{n - 1} \\[3mm]&= {1 \over 2}\int_{0}^{1}{-1 \over 1 - \left(-x\right)}\,{\rm d}x = \color{#ff0000}{\large -\,{1 \over 2}\,\ln\left(2\right)} \end{align}
We also can use this way to calculate instead of using complex analysis or special functions. Noting that $$ \int_0^\infty te^{-xt}dt=\frac{1}{x^2} $$ we have \begin{eqnarray} &&\int_{0}^{\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\frac{1}{{{x}^{2}}}\text{d}x}\\ &=&\int_{0}^{\infty }{\left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)\left(\int_0^\infty te^{-xt}\text{d}t\right)\text{d}x}\\ &=&\int_{0}^{\infty}t\left(\int_0^\infty \left( \frac{x}{{{\text{e}}^{x}}-{{\text{e}}^{-x}}}-\frac{1}{2} \right)e^{-xt}\text{d}t\right)\\ &=&\frac12\int_{0}^{\infty}t\left(\int_0^\infty \frac{2xe^{-x}-1+e^{-2x}}{1-e^{-2x}}e^{-xt}\text{d}x\right)\text{d}dt\\ &=&\frac12\int_{0}^{\infty}t\left(\int_0^\infty(2xe^{-x}-1+e^{-2x})e^{-xt}\sum_{n=0}^\infty e^{-2nx}\text{d}x\right)\text{d}dt\\ &=&\frac12\int_{0}^{\infty}t\sum_{n=0}^\infty\left(-\frac1{2n+t}+\frac2{(2n+t+1)^2}+\frac1{2n+t+2}\right)\text{d}dt\\ &=&-\sum_{n=0}^\infty \left(1+n\ln n+\ln(n+\frac{1}{2})-(n+1)\ln(n+1)\right)\\ &=&-\lim_{n\to 0^+}\left(1+n\ln n+\ln(n+\frac{1}{2})-(n+1)\ln(n+1)\right)-\sum_{n=1}^\infty \left(1+n\ln n+\ln(n+\frac{1}{2})-(n+1)\ln(n+1)\right)\\ &=&-(1-\ln 2)+1-\frac32\ln 2\\ &=&-\frac12\ln 2. \end{eqnarray}