TITLE: Integral $\int_0^\infty\frac{\tanh^2(x)}{x^2}dx$
QUESTION [40 upvotes]: It appears that
$$\int_0^\infty\frac{\tanh^2(x)}{x^2}dx\stackrel{\color{gray}?}=\frac{14\,\zeta(3)}{\pi^2}.\tag1$$
(so far I have about $1000$ decimal digits to confirm that).
After changing variable $x=-\tfrac12\ln z$, it takes an equivalent form
$$\int_0^1\frac{(1-z)^2}{z\,(1+z)^2 \ln^2z}dz\stackrel{\color{gray}?}=\frac{7\,\zeta(3)}{\pi^2}.\tag2$$
Quick lookup in Gradshteyn—Ryzhik and Prudnikov et al. did not find this integral, and it also is returned unevaluated by Mathematica and Maple. How can we prove this result? Am I overlooking anything trivial?
Further questions: Is it possible to generalize it and find a closed form of 
$$\mathcal A(a)=\int_0^\infty\frac{\tanh(x)\tanh(ax)}{x^2}dx,\tag3$$
or at least of a particular case with $a=2$?
Can we generalize it to higher powers
$$\mathcal B(n)=\int_0^\infty\left(\frac{\tanh(x)}x\right)^ndx?\tag4$$

Thanks to nospoon's comment below, we know that 
$$\mathcal B(3)=\frac{186\,\zeta(5)}{\pi^4}-\frac{7\,\zeta(3)}{\pi^2}\tag5$$
I checked higher powers for this pattern, and, indeed, it appears that
$$\begin{align}&\mathcal B(4)\stackrel{\color{gray}?}=-\frac{496\,\zeta(5)}{3\,\pi^4}+\frac{2540\,\zeta(7)}{\pi^6}\\
&\mathcal B(5)\stackrel{\color{gray}?}=\frac{31\,\zeta(5)}{\pi^4}-\frac{3175\,\zeta(7)}{\pi^6}+\frac{35770\,\zeta(9)}{\pi^8}\\
&\mathcal B(6)\stackrel{\color{gray}?}=\frac{5842\,\zeta(7)}{5\,\pi^6}-\frac{57232\,\zeta(9)}{\pi^8}+\frac{515844\,\zeta(11)}{\pi^{10}}\end{align}\tag6$$

REPLY [3 votes]: Using the Taylor series for $\tan\left(z+\frac{(2k+1)\pi}2\right)=-\frac1z+\frac z3+O\!\left(z^3\right)$ and $i\tanh(z)=\tan(iz)$, we get
$$\newcommand{\Res}{\operatorname*{Res}}
\tanh^2\left(z+i\frac{(2k+1)\pi}2\right)=\frac1{z^2}+\frac23+O\!\left(z^2\right)\tag1
$$
Using the Taylor series for $\frac1{1+z}=1-z+O\!\left(z^2\right)$, we get
$$
\frac1{\left(z+i\frac{(2k+1)\pi}2\right)^2}=-\frac4{(2k+1)^2\pi^2}-\frac{16iz}{(2k+1)^3\pi^3}+O\!\left(z^2\right)\tag2
$$
Therefore, with $z_k=i\frac{(2k+1)\pi}2$ we get that
$$
\Res\limits_{z=z_k}\left(\frac{\tanh^2(z)}{z^2}\right)=-\frac{16i}{(2k+1)^3\pi^3}\tag3
$$
We can use the contour of integration

$$
\begin{align}
\int_0^\infty\frac{\tanh^2(x)}{x^2}\,\mathrm{d}x
&=\frac12\int_{-\infty}^\infty\frac{\tanh^2(x)}{x^2}\,\mathrm{d}x\tag{4a}\\
&=\pi i\sum_{k=0}^\infty\frac{-16i}{(2k+1)^3\pi^3}\tag{4b}\\
&=\frac{14}{\pi^2}\zeta(3)\tag{4c}
\end{align}
$$
Explanation:
$\text{(4a)}$: use symmetry
$\text{(4b)}$: the integral along the contour is $2\pi i$ times the sum of the residues inside
$\text{(4c)}$: $\sum\limits_{k=0}^\infty\frac1{(2k+1)^3}=\frac78\zeta(3)$

The answer for $(3)$ from the question, with $a=2$, is given in this answer.