$$\int_0^\infty\left(\frac{\tanh x}{x^2}-\frac{1}{xe^{2x}}\right)dx$$

I haven't been able to find references to the indefinite integral of the $\tanh$ term except for some similar forms that had solutions. see here and here.

Edit: Following Random Variable's result we have the form $$12\log A-\frac{4}{3}\log 2$$

  • $\begingroup$ Do you mean $\tanh(x)?$ what is $\tanh$ being applied to? $\endgroup$ – Chickenmancer Oct 10 '17 at 23:59
  • $\begingroup$ I relied on Wolfram Alpha to evaluate a limit, but looks like it's $$8 \psi^{-2} \left(\frac{1}{2} \right) + \log(2) -2 \log(4 \pi),$$ where $\psi^{-2} \left(\frac{1}{2} \right) = \int_{0}^{1/2} \ln \Gamma(x) \, dx$, which can be expressed in terms of the Glaisher–Kinkelin constant. $\endgroup$ – Random Variable Oct 11 '17 at 3:13
  • $\begingroup$ All approaches are appreciated, but it’s understandable. And why the close votes? $\endgroup$ – tyobrien Oct 11 '17 at 17:14

Let $$I(z) =\frac{z}{a}\int_0^\infty \left(\frac{1}{2}-\frac{z}{at}+\frac{1}{e^{at/z}-1}\right) \frac{1-e^{-at}}{t^2} dt$$ Then Binet's first formula says $$I(z) = \int_0^z \left[\ln\Gamma(x) - (z-\frac{1}{2})\ln z + z - \frac{\ln(2\pi)}{2}\right] dx $$

Letting $a=2,z=1/2$ gives $$4I(\frac{1}{2}) =\int_0^\infty \left(\frac{1}{2}-\frac{1}{4t}+\frac{1}{e^{4t}-1}\right) \frac{1-e^{-2t}}{t^2} dt$$ and $a=4,z=1$ gives $$4I(1) =\int_0^\infty \left(\frac{1}{2}-\frac{1}{4t}+\frac{1}{e^{4t}-1}\right) \frac{1-e^{-4t}}{t^2} dt$$

Some algebraic manipulation yields $$4I(1)-4I(\frac{1}{2}) = \underbrace{\int_0^\infty \left[\frac{1}{2t^2}-\frac{e^{-2t}}{2t} - (\frac{1}{2}-\frac{1}{4t})\left(\frac{e^{-2t}-e^{-4t}}{t^2}\right)\right] dt}_{J} - \frac{I}{2}$$

With $I$ your desired integral. Surprisingly, $J$ has elementary primitive (even it were not, we still have systematic way to crash it), with value $5/8$.

Hence it remains to evalute $$\int_0^1 \ln \Gamma(x) dx \quad \quad \int_0^{1/2} \ln \Gamma(x) dx$$ The former is just $\ln(2\pi)/2$, for the latter, we can use the integral representation of Barnes G function: $$\int_0^z \ln \Gamma(x) dx = \frac{z(1-z)}{2}+\frac{z}{2}\ln(2\pi) + z \ln\Gamma(z) - \log G(1+z)$$

and the special value $$\ln G(\frac{3}{2}) = -\frac{3}{2}\ln A + \frac{\ln \pi}{4}+\frac{1}{8}+\frac{\ln 2}{24}$$

with $A$ being the Glaisher-Kinkelin constant.

Alternatively, use Fourier expansion of $\ln \Gamma(x)$, integrate termwise, and remember the relation between $A$ and $\zeta'(2)$ also gives the value of the integral $$\int_0^{1/2} \ln\Gamma(x)dx = \frac{3}{2}\ln A + \frac{5}{24}\ln 2 + \frac{\ln \pi}{4}$$


Let $$I(a) = \int_{0}^{\infty} \left(\frac{\tanh (x)}{x} -e^{-2x} \right)\frac{e^{-ax}}{x} \, dx.$$

I will show that $$I(a) = 8 \psi^{(-2)} \left(\frac{a+2}{4} \right)- 8 \psi^{(-2)}\left(\frac{a}{4} \right)-a \log(a)+a + 2 a \log (2)+ \log(a+2)- 2 \log(4 \pi),$$ where $$ \psi^{(-2)}(x) = \int_{0}^{x} \log \Gamma (t) \, dt.$$

Your integral is the limit of the right-hand side of the above expression as $a \downarrow 0$, namely $$ \psi^{(-2)} \left(\frac{1}{2} \right)+ \log(2) - 2 \log(4\pi). $$

(As explained in pisco125's answer, $\psi^{(-2)} \left(\frac{1}{2} \right)$ can be expressed in terms of the Glaisher-Kinkelin constant.)

Differentiating $I(a)$ under the integral sign (which is permissible for $a \ge c$, where $c$ is some positive value), we get $$I'(a) = -\int_{0}^{\infty}\left(\frac{\tanh (x)}{x}-e^{-2x} \right) e^{-ax} = -\int_{0}^{\infty} \frac{\tanh (x)}{x} \, e^{-ax} + \frac{1}{a+2}.$$

We can use a property of the Laplace transform to find the Laplace transform of $\frac{\tanh x}{x}$.

$$\begin{align}\int_{0}^{\infty} \frac{\tanh (x)}{x} \, e^{-ax} \, dx &= \int_{a}^{\infty} \int_{0}^{\infty} \tanh (t) e^{-pt} \, dt \, dp \\ &=\int_{a}^{\infty} \int_{0}^{\infty} \frac{1-e^{-2t}}{1+e^{-2t}} \, e^{-pt} \, dt \, dp \\ &= \int_{a}^{\infty} \int_{0}^{\infty} \left(2\sum_{n=0}^{\infty} (-1)^{n} e^{-2nt} -1\right) e^{-pt} \, dt \, dp \\ &= \int_{a}^{\infty} \left( 2 \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+p}- \frac{1}{p}\right) \\ &= \int_{a}^{\infty} \left(\frac{2}{p} \sum_{n=0}^{\infty} \frac{(-1)^{n}}{\frac{2}{p}n +1} - \frac{1}{p}\right) \\ &= \int_{a}^{\infty} \left(\frac{1}{2} \left(\psi \left(\frac{p+2}{4} \right)- \psi\left(\frac{p}{4} \right)\right)- \frac{1}{p} \right) \, dp \tag{1} \\ &= -2 \log (2) -2\log \Gamma \left(\frac{a+2}{4} \right) +2 \log \Gamma \left(\frac{a}{4} \right) + \log (a) \tag{2}.\end{align}$$

Integrating back, we get $$I(a) =2a \log(2) + 8 \psi^{(-2)} \left(\frac{a+2}{4} \right)- 8 \psi^{(-2)} \left(\frac{a}{4} \right)- a \log(a) +a + \log(a+2) +C. $$

To determine the integration constant $C$, I asked Wolfram Alpha to evaluate the limit of the above expression as $a \to \infty$. If you want to do it by hand, you could use the relationshiop between the log gamma integral and the Barnes G-function, along with the asymptotic expansion of the Barnes G-function.

The constant of integration turns out to be $-2 \log(4 \pi)$.

$(1)$ $\sum_{k=0}^{\infty} \frac{(-1)^{k}}{xk+1} =\frac{1}{2x} \left(\psi \left(\frac{x+1}{2x} \right) - \psi \left(\frac{1}{2x} \right) \right) $ (entry 5)

$(2)$ Using Striling's formula, the asymptotic expansion of $\log \Gamma \left(\frac{a+2}{4} \right)$ as $a \to \infty$ is

$$\log \Gamma\left(\frac{a+2}{4} \right) \sim \left(\frac{a+2}{4} - \frac{1}{2} \right) \log \left(\frac{a+2}{4} \right) - \frac{a+2}{4} + \frac{1}{2} \log(2 \pi) + \mathcal{O}\left(\frac{1}{a} \right), $$ where

$$\log \left(\frac{a+2}{4} \right) \sim \ln \left(\frac{a}{4} \left( 1+ \frac{2}{a}\right) \right) = \log \left(\frac{a}{4} \right) + \log \left(1+ \frac{2}{a} \right) \sim \log \left(\frac{a}{4} \right) + \frac{2}{a} + \mathcal{O}\left(\frac{1}{a^{2}} \right).$$


$(A)\enspace$ Dissolving the integral

With the split

$\displaystyle \frac{\tanh x}{x^2}-\frac{1}{x e^{2x}} =$

$\displaystyle =\left( \frac{2}{e^{2x}} -\frac{1}{e^{4x}} -\frac{1}{e^x} \right) \frac{1}{x} - \frac{e^{2x}-1}{e^{4x} (e^{2x}+1)} \frac{1}{x} + \frac{1}{e^{2x}+1} \frac{e^{2x}-1-2x}{x^2} + \frac{1}{x e^x} - \frac{1}{x e^{2x}} $


$\displaystyle \int\limits_0^\infty \left(\frac{\tanh x}{x^2}-\frac{1}{x e^{2x}}\right) dx = \int\limits_0^\infty \left( \frac{2}{e^{2x}} -\frac{1}{e^{4x}} -\frac{1}{e^x} \right) \frac{dx}{x} - \int\limits_0^\infty \frac{e^{2x}-1}{e^{4x} (e^{2x}+1)} \frac{dx}{x} + $

$\hspace{5cm}\displaystyle +\int\limits_0^\infty \frac{1}{e^{2x}+1} \sum\limits_{n=2}^\infty \frac{2^n x^{n-2}}{n!} dx + \int\limits_0^\infty \left(\frac{1}{x e^x} - \frac{1}{x e^{2x}}\right) dx =$

$\displaystyle = \text{Ei}(0)\cdot (2-1-1) - \int\limits_0^\infty \frac{(1-e^{-ax})(1-e^{-bx})}{x(e^x-1)}dx |_{a=b=\frac{1}{2}} + \sum\limits_{n=2}^\infty \frac{2^n}{n!} \int\limits_0^\infty \frac{x^{n-2}}{e^{2x}+1} dx + \ln 2 $

$\displaystyle = 0 + \ln\frac{\Gamma(1+a)\Gamma(1+b)}{\Gamma(1+a+b)} |_{a=b=\frac{1}{2}} + \sum\limits_{k=2}^\infty \frac{2^k}{k!}\eta(k-1)\Gamma(k-1)2^{1-k} + \ln 2 $

$\displaystyle = 2\ln2 + \ln\frac{\pi}{4} + 2 \sum\limits_{n=2}^\infty \frac{\eta(n)}{n(n+1)} $

$(B)\enspace$ Basics

The following calculation of $\enspace\displaystyle \sum\limits_{n=2}^\infty \frac{\eta(n)}{n(n+1)}\enspace $ is based on a generalization of the Gamma function,

called $Q_m(x)$ in https://www.fernuni-hagen.de/analysis/download/bachelorarbeit_aschauer.pdf ,

with $\enspace\displaystyle \ln Q_m(x)=\frac{(-x)^{m+1}}{m+1}\gamma +\sum\limits_{n=2}^\infty\frac{(-x)^{m+n}}{m+n}\zeta(n)\enspace$ on page $13$, $(4.2)\,$ .

A modification is $\enspace\displaystyle Q_m^*(x):=(1+x)Q_m(x)\enspace$ on page $24$, $(4.8)$ and $(4.9)$ .

Special values which are used here are $\,Q_0^*(-1)=1\,$, $\,\displaystyle Q_1^*(-1)=\frac{1}{\sqrt{2\pi}}\,$ ,

$\displaystyle Q_0(-\frac{1}{2})=\Gamma(\frac{1}{2})=\sqrt{\pi}\,$ and $\,\displaystyle Q_1(-\frac{1}{2})=A^{\frac{3}{2}}2^{-\frac{7}{24}}\,$ (page $38$) .

With the generalized Glaisher-Kinkelin constant $\,A_n\,$ it’s $\,A:=A_1\,$ .

Note: $\enspace\displaystyle Q_0(x)=\Gamma(1+x)\,$ , $\enspace\displaystyle Q_1(x)=\frac{\sqrt{2\pi}^x}{e^{\frac{1}{2}x(x+1)}G(1+x)}\,$ ($G$ is the Barnes G function)

$\hspace{1.4cm}$Special value: $\enspace\displaystyle G(\frac{1}{2})=2^\frac{1}{24}e^\frac{1}{8}\pi^{-\frac{1}{4}}A^{-\frac{3}{2}}$

$(C)\enspace$ Calculating the series

$\displaystyle \sum\limits_{n=2}^\infty \frac{x^n}{n(n+1)} \eta(n) =$

$\displaystyle =\left(\sum\limits_{n=2}^\infty \frac{x^n}{n} \zeta(n) - \sum\limits_{n=2}^\infty \frac{x^n}{n+1} \zeta(n)\right) - 2 \left(\sum\limits_{n=2}^\infty \frac{x^n}{2^n n} \zeta(n) - \sum\limits_{n=2}^\infty \frac{x^n}{2^n (n+1)} \zeta(n)\right) $

$\displaystyle = \left(\ln Q_0(-x) - x\gamma - \frac{1}{x}(\ln Q_1(-x)-\frac{x^2}{2}\gamma) \right) $

$\hspace{0.5cm}\displaystyle - 2 \left(\ln Q_0(-\frac{x}{2} ) - \frac{x}{2}\gamma - \frac{2}{x}(\ln Q_1(-\frac{x}{2})-\frac{x^2}{8}\gamma) \right) $

$\displaystyle = \ln Q_0^*(-x) - \frac{1}{x}\ln Q_1^*(-x) + \frac{1-x}{x}\ln(1-x) - 2 \ln Q_0(-\frac{x}{2}) + \frac{4}{x}\ln Q_1(-\frac{x}{2}) $

With $\,x\uparrow 1\,$ follows

$ \displaystyle \sum\limits_{n=2}^\infty \frac{\eta(n)}{n(n+1)} = \ln Q_0^*(-1) - \ln Q_1^*(-1) - 2 \ln Q_0(-\frac{1}{2}) + 4 Q_1(-\frac{1}{2}) $

$\hspace{2.5cm}\displaystyle = -\frac{2}{3}\ln 2 - \frac{1}{2}\ln \pi + 6 \ln A $

and therefore

$\displaystyle \int\limits_0^\infty \left(\frac{\tanh x}{x^2}-\frac{1}{x e^{2x}}\right) dx = 2\ln2 + \ln\frac{\pi}{4} + 2 \left(-\frac{2}{3}\ln 2 - \frac{1}{2}\ln \pi + 6 \ln A \right) $

$\hspace{4.5cm}\displaystyle = 12 \ln A - \frac{4}{3}\ln 2 \enspace$ .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.