Improper Integral $\int_0^\infty\left(\frac{\tanh(x)}{x^3}-\frac1{x^2\cosh^2(x)}\right)dx = \frac{7\zeta(3)}{\pi^2} $

$\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $\ds{\bbox[5px,#ffd]{\int_{0}^{\infty} \bracks{{\tanh\pars{x} \over x^{3}} - {1 \over x^{2}\cosh^{2}\pars{x}}}\,\dd x = {7 \over \pi^{2}}\,\zeta\pars{3}} \approx 0.8526\ \Large ?}$.


\begin{align} &\color{#f00}{\int_{0}^{\infty} \bracks{{\tanh\pars{x} \over x^{3}} - {1 \over x^{2}\cosh^{2}\pars{x}}}\,\dd x} \\[5mm] = &\ \int_{0}^{\infty}{\tanh\pars{x} - x \over x^{3}}\,\dd x + \int_{0}^{\infty}{\tanh^{2}\pars{x} \over x^{2}}\,\dd x \\[5mm] = & -\,\half\int_{x\ =\ 0}^{x\ \to\ \infty}\bracks{\tanh\pars{x} - x} \,\dd\pars{1 \over x^{2}} + \int_{0}^{\infty}{\tanh^{2}\pars{x} \over x^{2}}\,\dd x \\[5mm] = &\ \half\int_{0}^{\infty}{\mrm{sech}^{2}\pars{x} - 1 \over x^{2}}\,\dd x + \int_{0}^{\infty}{\tanh^{2}\pars{x} \over x^{2}}\,\dd x = \half\int_{0}^{\infty}{\tanh^{2}\pars{x} \over x^{2}}\,\dd x \\[5mm] = &\ 32\sum_{k = 0}^{\infty}\,\sum_{n = 0}^{\infty}\,\,\ \underbrace{% \int_{0}^{\infty}{1 \over \bracks{\pars{2k + 1}\pi}^{\, 2} + 4x^{2}}\, {1 \over \bracks{\pars{2n + 1}\pi}^{\, 2} + 4x^{2}}\,\dd x} _{\ds{1 \over 8\pi^{2}\pars{2k + 1}\pars{2n + 1}\pars{k + n + 1}}} \label{1}\tag{1} \\[5mm] = &\ {4 \over \pi^{2}}\ \underbrace{\sum_{k = 0}^{\infty}{H_{k} + 2\ln\pars{2} \over \pars{2k + 1}^{2}}} _{\ds{{7 \over 4}\,\zeta\pars{3}}}\label{2}\tag{2} = \color{#f00}{{7 \over \pi^{2}}\,\zeta\pars{3}} \end{align} Note that
  • In \eqref{1}, we use the identity $\ds{{\tanh\pars{x} \over x} = 8\sum_{j = 0}^{\infty}{1 \over \bracks{\pars{2j + 1}\pi}^{\, 2} + 4x^{2}}}$
  • The sum over $\ds{n}$, in \eqref{1}, yields a Digamma Function term $\ds{\Psi\pars{1 + k}}$ which explains the appearance of the Harmonic Number $\ds{H_{k} = \Psi\pars{1 + k} + \gamma}$. $\ds{\gamma}$ is the Euler-Mascheroni Constant.
  • $\ds{\sum_{k = 0}^{\infty}{H_{k} \over \pars{2k + 1}^{2}} = {1 \over 4}\bracks{7\zeta\pars{3} - \pi^{2}\ln\pars{2}}}$ is a well known result.
  • $\ds{\sum_{k = 0}^{\infty}{1 \over \pars{2k + 1}^{2}} = {1 \over 8}\,\pi^{2}}$.

A Residue Calculus Approach

At $z=\left(k+\frac12\right)\pi i$, the residue of $\frac{\tanh(x)}{x^3}$ is $\frac{i}{\left(\left(k+\frac12\right)\pi\right)^3}$ and the residue of $\frac1{x^2\cosh^2(x)}$ is $\frac {2i}{\left(\left(k+\frac12\right)\pi\right)^3}$

Therefore, $$ \begin{align} &\int_0^\infty\left(\frac{\tanh(x)}{x^3}-\frac1{x^2\cosh^2(x)}\right)\,\mathrm{d}x\tag{1}\\ &=\frac12\int_{-\infty}^\infty\left(\frac{\tanh(x)}{x^3}-\frac1{x^2\cosh^2(x)}\right)\,\mathrm{d}x\tag{2}\\ &=\frac12\int_{-\infty-i}^{\infty-i}\left(\frac{\tanh(x)}{x^3}-\frac1{x^2\cosh^2(x)}\right)\,\mathrm{d}x\tag{3}\\[6pt] &=\pi i\sum_{k=0}^\infty\left[\frac{i}{\left(\left(k+\frac12\right)\pi\right)^3}-\frac{2i}{\left(\left(k+\frac12\right)\pi\right)^3}\right]\tag{4}\\ &=\frac8{\pi^2}\sum_{k=0}^\infty\frac1{(2k+1)^3}\tag{5}\\[6pt] &=\frac{7\zeta(3)}{\pi^2}\tag{6} \end{align} $$ Explanation:
$(2)$: the integrand is even
$(3)$: the integrand vanishes at $x=\pm\infty$ and has no sinularities in $-1\lt\mathrm{Im}(z)\lt0$
$(4)$: the integrand vanishes like $\frac1{z^2}$ on $\mathrm{Im}(z)\in\mathbb{Z}\pi$
$\phantom{\text{(4): }}$and like $\frac1{z^3}$ as $|\mathrm{Re}(z)|\to\infty$
$\phantom{\text{(4): }}$so the integral is $2\pi i$ times the sum of the residues
$(5)$: algebra
$(6)$: note that the sum is $\frac78\zeta(3)$