How to evaluate $\int_0^{\infty} \bigg(\frac{e^{-x}}{\sinh(x)} - \frac{e^{-3x}}{x}\bigg) \; dx$

Evaluate the integral below

$$\int_0^{\infty} \bigg(\frac{e^{-x}}{\sinh(x)} - \frac{e^{-3x}}{x}\bigg) \; dx$$

Using Wolfram I get the integral is $\gamma + \log\bigg(\frac{3}{2}\bigg)$, where $\gamma$ is The Euler-Mascheroni constant.

I split the integral into two parts. For the first one, I tried to use $\sinh(x) = \frac{e^{x}-e^{-x}}{2}=\frac{e^{-x}}{2}(\frac{e^{2x}-1}{2})$ and the first integral became

$$\int_0^{\infty} \frac{2}{e^{2x}-1} \; dx=\int_0^{\infty} \frac{2e^{-2x}}{1-e^{-2x}} \; dx$$

Then, I use substitution $u=1-e^{-2x}$.

$$\int_0^{\infty} \frac{2e^{-2x}}{1-e^{-2x}} \; dx=-4\int_0^{1} \frac{du}{u} = -4\ln u\;\bigg|_0^1 = \infty$$

The second integral also diverges. Where I made a mistake? How is the way to get a result like Wolfram output?

• Your last integral doesn't have the factor of $-4$. Note, if $u=1-e^{-2x}$, then $\int_0^1 \frac{2(1-u)}{2u(1-u)} \, du = \int_0^1 \frac{1}{u} \, du$. – JamalS Oct 25 '14 at 12:33
• i think to split in two parts is not a good idea – Dr. Sonnhard Graubner Oct 25 '14 at 12:36
• convert your integtral into $\frac{e^{-3 x} \left(2 e^{3 x} x-e^{2 x}+1\right)}{\left(e^{2 x}-1\right) x}$ – Dr. Sonnhard Graubner Oct 25 '14 at 12:38
• Integrate from $a$ to $\infty$ and search for the limit of the total result for $a$ going to $0$. – Claude Leibovici Oct 25 '14 at 12:49

Let $u=e^{-x}$, then \begin{align} \int^\infty_0\left(\frac{2e^{-x}}{e^{x}-e^{-x}}-\frac{e^{-3x}}{x}\right){\rm d}x =&\int^1_0\left(\frac{2u}{1-u^2}+\frac{u^2}{\ln{u}}\right){\rm d}u \end{align} Denote $$\mathcal{I}(a)=\int^1_0\left(\frac{2u}{1-u^2}+\frac{u^2}{\ln{u}}\right)u^a\ {\rm d}u$$ Differentiating under the integral sign, we get \begin{align} \mathcal{I}'(a) =&\int^1_0\left(\frac{2u^{a+1}\ln{u}}{1-u^2}+u^{a+2}\right){\rm d}u\\ =&\frac{1}{a+3}+2\sum^\infty_{n=0}\int^1_0u^{2n+a+1}\ln{u}\ {\rm d}u\\ =&\frac{1}{a+3}-2\sum^\infty_{n=0}\frac{1}{(2n+a+2)^2}\\ =&\frac{1}{a+3}-\frac{1}{2}\psi_1\left(\frac{a+2}{2}\right) \end{align} Integrating back, \begin{align} \mathcal{I}(a)=\ln(a+3)-\psi_0\left(\frac{a+2}{2}\right)+C \end{align} where \begin{align} C=\lim_{a\to\infty}\left[\psi_0\left(\frac{a+2}{2}\right)-\ln(a+3)\right] \end{align} and by Stirling's formula, we know that $\psi_0(z)\sim \ln{z}$ for large $z$. So \begin{align} C=\lim_{a\to\infty}\left[\ln\left(\frac{a+2}{a+3}\right)-\ln{2}\right]=-\ln{2} \end{align} and therefore, $$\int^\infty_0\left(\frac{2e^{-x}}{e^{x}-e^{-x}}-\frac{e^{-3x}}{x}\right){\rm d}x=\mathcal{I}(0)=\gamma+\ln\left(\frac{3}{2}\right)$$
What I am saying is that you want to use the integral representation of the Digamma function for $s>0$ $$\psi(s) =\int_{0}^{\infty}{\frac{e^{-x}}{x}-\frac{e^{-sx}}{1-e^{-x}}dx}$$ Then you want to rewrite your integral $I$ in this following sense \begin{align*}I&=\int_{0}^{\infty}{\left(2\frac{e^{-2x}}{1-e^{-2x}}-3\frac{e^{-3x}}{3x}\right)dx}\\&=\int_{0}^{\infty}{\left[\left(2\frac{e^{-2x}}{1-e^{-2x}}-3\frac{e^{-3x}}{1-e^{-3x}}\right)-3\left(\frac{e^{-3x}}{3x}-\frac{e^{-3x}}{1-e^{-3x}}\right)\right]dx}\\&=\int_{0}^{\infty}{\left(2\frac{e^{-2x}}{1-e^{-2x}}-3\frac{e^{-3x}}{1-e^{-3x}}\right)dx}-\psi(1)\end{align*} The first integral can be shown to evaluate at $\log\left(\frac{3}{2}\right)$ by the substitution $e^{-x}=u$. Combining the results we have that $$I=\log\left(\frac{3}{2}\right)-\psi(1)=\log\left(\frac{3}{2}\right)+\gamma$$