By De Moivre's formula $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$ we have the following Fourier sine series:
$$\frac{\sin(3x)\sin(4x)\sin(5x)\cos(6x)}{\sin^2(x)}\\= -\frac{1}{2} \sin(2x)-\frac{1}{2}\sin(4x)+\sin(8x)+\frac{3}{2}\sin(10x)+\frac{3}{2}\sin(12x)+\sin(14x)+\frac{1}{2}\sin(16 x)$$
and:
$$I(n)=\int_{0}^{+\infty}\frac{\sin(2nx)}{x\cosh(x)}\,dx = 2\arctan\left(\tanh\frac{\pi n}{2}\right) $$
follows by differentiation under the integral sign. The original integral can so be expressed in terms of the Gudermannian function:
$$ I = \frac{1}{2} \big(-\text{gd}(\pi)- \text{gd}(2\pi) +
2 \text{gd}(4\pi) + 3 \text{gd}(5\pi) +
3 \text{gd}(6\pi) + 2 \text{gd}(7\pi) +
\text{gd}(8\pi)\big) \approx 7.11363 $$
I'm not sure how you showed the two integrals are equivalent, but the following is an evaluation of $$\int_{0}^{\infty} e^{-x} \cos (x) \tanh(x) \, \frac{\mathrm dx}{x}.$$
For $\Re(s) >0$, we have
$$ \begin{align} \int_{0}^{\infty} \tanh(t) e^{-st} \, \mathrm dt &= \int_{0}^{\infty} \frac{1-e^{-2t}}{1+e^{-2t}} \, e^{-st} \, \mathrm dt \\ &= \int_{0}^{\infty} (1-e^{-2t})e^{-st} \sum_{n=0}^{\infty} (-1)^{n}e^{-2tn} \, \mathrm dt \\ &= \sum_{n=0}^{\infty} (-1)^{n}\int_{0}^{\infty}\left(e^{-(2n+s)t} -e^{-(2n+s+2)t} \right) \, \mathrm dt \\ &= \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+s} - \sum_{n=0}^{\infty} \frac{(-1)^{n}}{2n+s+2} \\ &= \frac{1}{2} \left(\sum_{n=0}^{\infty} \frac{(-1)^{n}}{n+\frac{s}{2}} - \sum_{n=0}^{\infty} \frac{(-1)^{n}}{n+\frac{s}{2}+1} \right) \\ &\overset{(1)}{=} \frac{1}{4} \left(\psi \left(\frac{s}{4} + \frac{1}{2}\right)- \psi \left( \frac{s}{4}\right) - \psi \left(\frac{s}{4}+1 \right) + \psi \left(\frac{s}{4}+\frac{1}{2} \right)\right) \\ &\overset{(2)}{=} \frac{1}{2} \left( \psi \left(\frac{s}{4}+ \frac{1}{2} \right) - \psi \left(\frac{s}{4} \right) - \frac{2}{s} \right). \end{align}$$
Therefore, $ \begin{align} \int_{0}^{\infty} e^{-x} \cos (x) \tanh(x) \, \frac{\mathrm dx}{x} &= \Re\int_{0}^{\infty} e^{-(1+i)x} \frac{\tanh (x)}{x} \, \mathrm dx \\ &= \Re \int_{0}^{\infty}e^{-(1+i)x} \tanh(x) \int_{0}^{\infty} e^{-xt} \, \mathrm dt \, \mathrm dx \\ &= \Re \int_{0}^{\infty} \int_{0}^{\infty}\tanh(x) e^{-(1+i+t)x} \, \mathrm dx \, \mathrm dt \\ &= \Re \int_{0}^{\infty} \frac{1}{2}\left(\psi \left(\frac{1+i+t}{4}+ \frac{1}{2} \right) - \psi \left(\frac{1+i+t}{4} \right) - \frac{2}{1+i+t} \right) \, \mathrm dt \\ &= \Re \left(2 \ln\Gamma \left(\frac{3+i+t}{4} \right) -2 \ln \Gamma \left(\frac{1+i+t}{4} \right) -\ln (1+i+t)\right) \Bigg|_{0}^{\infty} \\ &\overset{(3)}= \Re \left(-2 \ln(2) - 2 \ln \Gamma \left(\frac{3+i}{4} \right)+2 \ln \Gamma \left(\frac{1+i}{4} \right) + \ln(1+i)\right)\\ &= - \frac{3 \ln (2)}{2} + 2\Re \left(\ln \Gamma \left(\frac{1+i}{4} \right)- \ln \Gamma \left(\frac{3+i}{4} \right) \right). \end{align}$
$(1)$ For $\Re(z) > 0$, $\sum_{k=0}^{\infty} \frac{(-1)^{k}}{k+z} = \frac{1}{2} \left(\psi \left(\frac{z+1}{2} \right) - \psi \left(\frac{z}{2} \right) \right).$
$(2)$ Recurrence relation of the digamma function
$(3)$ For $a >0$, $\ln \Gamma(z_{1}+ax)- \ln \Gamma(z_{2}+ax) \sim (z_{1}-z_{2}) \ln(ax) + \mathcal{O} \left(\frac{1}{x}\right)$ as $x \to \infty$.
Best Answer
Since $$ \frac{\sin(x)}{\cosh(x)+\cos(x)}=2\sum_{n\ge 1}(-1)^{n-1}e^{-nx}\sin(nx )$$ (shown here), we can combine the above with $\sin^2(x)\sin(nx) = \frac14 \left[2 \sin(n x) + \sin((2 - n) x) - \sin((2 + n) x)\right]$ and $\int_0^\infty e^{-ax}\frac{\sin{(bx)}}{x}\mathrm{d}x = \arctan\left(\frac{b}{a}\right)$ to get \begin{align*} I &= \frac{1}{2}\sum_{n\ge 1}(-1)^{n-1}\int_{0}^{\infty}\frac{e^{-nx}}{x}\left[2 \sin(n x) + \sin((2 - n) x) - \sin((2 + n) x)\right] \, \mathrm{d}x\\ & = \frac{1}{2}\sum_{n\ge 1}(-1)^{n-1} \left[\frac\pi2 + \arctan\left(\frac{2-n}{n} \right) - \arctan\left(\frac{2+n}{n} \right)\right]\\ & = \frac{1}{2}\sum_{n\ge 1}(-1)^{n-1} \left[\arctan(n+1) - \arctan(n-1)\right]\\ & = \frac{1}{2}\left[-\arctan(0) + \arctan(1) \right]\\ & = \frac{\pi}{8} \end{align*} as desired.
Note that to re-write the arctangent expressions from equations $2\to 3$ we combine $\arctan(\alpha) - \arctan(\beta) = \arctan\left(\frac{\alpha - \beta}{1 + \alpha\beta} \right)$ and $\arctan(x) + \arctan\left( \frac1x\right)= \frac\pi2,\ x>0$. Thus \begin{align*} \frac\pi2 + \arctan\left(\frac{2-n}{n} \right) - \arctan\left(\frac{2+n}{n} \right) &=\frac\pi2 + \arctan\left(\frac{-n^2}{2}\right) \\ &\overset{\color{blue}{n^2/2 >0}}{=} \arctan\left(\frac{2}{n^2}\right) \\ &=\arctan(n+1) - \arctan(n-1) \end{align*} also exploiting the fact that $\arctan(x)$ is odd.