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

calculusdefinite integralsimproper-integralsintegration

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.

Best Answer

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.