# 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}$$

-
How many weird integrals and sums have you posted now with absolutely no context or thought of your own? – mrf Feb 4 '13 at 9:34
@Ryan: if I understand mrf correctly, when you post one of these integrals, perhaps you may want to add a brief description of how you may have tried doing it, or how you think it may need to be done. That said, I do not want to discourage your postings, as we have been able to learn some techniques for these problems. – Ron Gordon Feb 4 '13 at 9:53
It's hard for me to refrain myself from upvoting the question since I only focus on the problem itself (+1). On the other hand, I understand people that ask for more details because your question might be wrongly understood. – user 1618033 Feb 4 '13 at 10:30
maple12 couldn't get closed form, numerically it's -0.34657... – coffeemath Feb 4 '13 at 13:18
@coffeemath: this seems like $-\ln 2 / 2$ – user 1618033 Feb 4 '13 at 13:23

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.

-
Interesting method, I use trying to solve this yesterday, by $\psi$ do you mean $\psi(x)=\frac{\Gamma '(x)}{\Gamma(x)}$ – user10444 Feb 5 '13 at 11:32
@MhenniBenghorbal :Thx for your nice method! I struggled for few days and find a ugly solution...:) – Ryan Feb 5 '13 at 11:43
Can you show how to get that two constants plz? :) – Ryan Feb 5 '13 at 12:11
@MhenniBenghorbal: brilliant! (+1) – user 1618033 Feb 5 '13 at 14:19
@MhenniBenghorbal: I think that Laplace point is a tricky one :+) – Babak S. Jul 14 '13 at 6:37

\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}

-