$I = \int_0^\infty \frac{\tanh x -x}{x^3}dx + \int_0^\infty \frac{\tanh^2 x}{x^2} dx$.
Let's call the first integral $I_1 =\int_0^\infty \frac{\tanh x -x}{x^3}dx$ and the second term $I_2 = \int_0^\infty \frac{\tanh^2 x}{x^2} dx$.
In this post it has been shown that $I_2=\frac{14\zeta(3)}{\pi^2}$.
From the following identity, $$\tanh{x} = \sum_{n=0}^{\infty} \frac{2x}{x^2 + (n+\frac{1}{2})^2 \pi^2},$$
it follows that,
$$\frac{\tanh x - x}{x^3} = 2\sum_{n=0}^{\infty} \frac{1}{x^2(x^2 + (n+\frac{1}{2})^2\pi^2)} -\frac{1}{x^2}$$
$$= -\frac{1}{x^2} + 2\sum_{n=0}^{\infty} \frac{1}{(n+\frac{1}{2})^2\pi^2}\left(\frac{1}{x^2} - \frac{1}{(x^2 + (n+\frac{1}{2})^2\pi^2)}\right)$$
$$ = \frac{1}{x^2}\left(-1 + \frac{8}{\pi^2} \sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}\right) - 2\sum_{n=0}^{\infty} \frac{1}{(n+\frac{1}{2})^2\pi^2} \frac{1}{(x^2 + (n+\frac{1}{2})^2\pi^2)}$$
The coefficient of $\frac{1}{x^2}$ is 0 because $\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2} = \frac{\pi^2}{8}$.
Therefore,
$$\frac{\tanh x - x}{x^3}= -2\sum_{n=0}^{\infty} \frac{1}{(n+\frac{1}{2})^2\pi^2} \frac{1}{(x^2 + (n+\frac{1}{2})^2\pi^2)}$$
Therefore,
$$I_1 = \int_0^\infty \frac{\tanh x - x}{x^3} dx$$
$$= -2\sum_{n=0}^{\infty} \frac{1}{(n+\frac{1}{2})^2\pi^2} \int_0^\infty \frac{1}{(x^2 + (n+\frac{1}{2})^2\pi^2)}dx$$
$$ = -2\sum_{n=0}^{\infty} \frac{1}{(n+\frac{1}{2})^2\pi^2}\frac{1}{(n+\frac{1}{2})\pi}\frac{\pi}{2}$$
$$ = -\frac{8}{\pi^2} \sum_{n=0}^{\infty} \frac{1}{(2n+1)^3}$$
Now, $\sum_{n=0}^{\infty} \frac{1}{(2n+1)^3} = \sum_{n=1}^{\infty} \frac{1}{n^3} - \sum_{n=1}^{\infty} \frac{1}{(2n)^3} = \zeta(3) - \zeta(3)/8 = \frac{7 \zeta(3)}{8}$.
Therefore, $$\boxed{I_1 = \int_0^\infty \frac{\tanh x -x}{x^3}dx = -\frac{7\zeta(3)}{\pi^2}}.$$
Thus, $$I = -\frac{7\zeta(3)}{\pi^2} + \frac{14\zeta(3)}{\pi^2} = \boxed{\frac{7\zeta(3)}{\pi^2}}$$
Alternative method: Using integration by parts, $I_1 = \int_0^\infty \frac{\tanh x - x}{x^3} dx = \int_0^\infty \frac{\operatorname{sech}^2 x - 1}{2 x^2}dx = -\frac{1}{2} \int_0^\infty \frac{\operatorname{tanh}^2 x}{x^2}dx= -I_2/2 = -7\zeta(3)/\pi^2$.
Questions the answer of which the author already knows and just presents here... are surely off-topic-- That is not the current site policy https://math.stackexchange.com/help/self-answer – Archisman Panigrahi May 13 '24 at 18:08