# Integrate $\int_{0}^\infty \frac{\tanh(x)}{x^3}-\frac{\operatorname{sech}(x)}{x^2}dx$

I would like to integrate:

$$\int_{0}^{\infty} \left[{\tanh\left(x\right) \over x^{3}}-{\operatorname{sech}\left(x\right) \over x^{2}}\right] \mathrm{d}x$$ I'm not sure where I found this integral, but I have a feeling I wrote it down because its solution. I want to say it's related to the Zeta Function, but I'm not sure. I've managed to rewrite it as: $$\small \sum_{n = 1}^{\infty}\!\!\left(-1\right)^{n + 1}\!\! \left[\!2\ln\left(\!2n - 1 \over n - 1\!\right)\! +\! 4n\ln\left(\!n - 1 \over 2n - 1\!\right)\! +\! 2n^{2}\ln\left(\!n \over n - 1\!\right)\! +\! 4n\ln\left(2\right)\! -\! 2n\! -\! 2\ln\left(2\right)\! +\! 1\!\right]$$

Above follows by writing the hyperbolic functions in terms of exponential functions and then using series. Then I used differentiating under the integral.

This makes me think otherwise about the Zeta Function/having a closed form for the original integral. I would appreciate any help in solving this.

Start by splitting the integral into two convergent parts: $$I=\int_0^\infty \frac{\tanh x-x+x-x\operatorname{sech} x}{x^3}dx=\int_0^\infty \frac{\tanh x-x}{x^3}dx+\int_0^\infty \frac{1-\operatorname{sech} x}{x^2}dx$$ $$I_1=\int_0^\infty \frac{\tanh x-x}{x^3}dx\overset{IBP}=\frac12 \int_0^\infty \frac{\operatorname{sech}^2 x -1}{x^2}dx$$ $$\overset{IBP}=-\int_0^\infty \frac{\tanh x\operatorname{sech}^2 x}{x}dx=-\frac{7\zeta(3)}{\pi^2}$$

$$I_2=\int_0^\infty \frac{1-\operatorname{sech} x}{x^2}dx\overset{IBP}=\int_0^\infty \frac{\tanh x\operatorname{sech} x}{x}dx=\frac{4G}{\pi}$$

$$I_2=\int_0^\infty \frac{\tanh x \operatorname{sech} x}{x}dx\overset{x=\ln t}=2\int_1^\infty \frac{(t^2-1)}{(t^2+1)\ln t}dt\overset{t=\frac{1}{x}}=\int_0^\infty \frac{x^2-1}{(x^2+1)^2\ln x}dx$$ Above the two integrals were averaged after the reciprocal subtitution was done.

Now we will use Feynman's trick alongside beta function: $$I(a)=\int_0^\infty \frac{x^a-1}{(x^2+1)^2 \ln x}dx\Rightarrow I'(a)=\int_0^\infty \frac{x^a}{(x^2+1)^2}dx=\frac12 \left(\frac{1-a}{2}\right)\frac{\pi}{\sin\left(\frac{\pi(a+1)}{2}\right)}$$ $$I(0)=0\Rightarrow I_2=\frac{\pi}{4}\int_0^2 \frac{1-a}{\sin\frac{\pi(a+1)}{2}}da =\frac{2}{\pi} \int_{0}^\frac{\pi}{2}\frac{t}{\sin t}dt=\frac{4 G}{\pi}$$ $$I_1$$ can be found here.

• Thanks for the insight. It was very difficult dealing with the integrands convergence, so I tried brute forcing it (which obviously didn’t work). Commented Sep 4, 2019 at 22:33
• @Zacky I remember I found $I(a)=\int_0^\infty\frac{\tanh^2(ax)}{x^2}\ dx=\frac{14a}{\pi^2}\zeta(3)$ on this site but unfortunately I didn't save the link. Any way, if we differentiate $I(a)$ with respect to $a$ then set $a=1$ we get your $I_1$. Commented Sep 5, 2019 at 2:27

The integrand function is even and we may exploit$$^{(*)}$$ $$\tanh(x) = \sum_{n\in\mathbb{Z}}\frac{1}{x-\left(n+\frac{1}{2}\right)\pi i},\qquad \text{sech}(x)=\sum_{n\in\mathbb{Z}}\frac{(-1)^{n+1}}{x-\left(n+\frac{1}{2}\right)\pi i}$$ and the residue theorem (applied to symmetric rectangular contours in the upper half-plane, with a small indentation around the origin) to state that $$\int_{0}^{+\infty}\frac{\tanh(x)}{x^3}-\frac{\text{sech}(x)}{x^2}\,dx =-\frac{8}{\pi^2}\sum_{k\geq 0}\frac{1}{(2k+1)^3}+\frac{4}{\pi}\sum_{k\geq 0}\frac{(-1)^k}{(2k+1)^2}$$ equals $$\frac{4G}{\pi}-\frac{7\zeta(3)}{\pi^2}$$ as claimed by Zacky in the comments.

(*) The series have to be intended in the symmetric sense, $$\sum_{n\in\mathbb{Z}}=\lim_{N\to+\infty}\sum_{n=-N}^{N}$$.

• It's nice to see that different methods work! Perhaps it might be easier to use your given power series for $I_1$ and $I_2$, but I see a Cauchy product incoming, so better not. Commented Sep 4, 2019 at 20:59