Integral of $\ln(x)\operatorname{sech}(x)$
How can I prove that: $$\int_{0}^{\infty}\ln(x)\,\operatorname{sech}(x)\,dx=\int_{0}^{\infty}\frac{2\ln(x)}{e^x+e^{-x}}\,dx\\=\pi\ln2+\frac{3}{2}\pi\ln(\pi)-2\pi\ln\!\Gamma(1/4)\approx-0.5208856126\!\dots$$ I haven't really tried much of anything worth mentioning; I've had basically no experience with $\ln\!\Gamma$.
Solution 1:
$$ \begin{align} \int_0^\infty\frac{2\log(x)}{e^x+e^{-x}}\,\mathrm{d}x &=\frac{\partial}{\partial t}\int_0^\infty\frac{2x^t}{e^x+e^{-x}}\,\mathrm{d}x \end{align} $$ $$ \begin{align} \int_0^\infty\frac{2x^t}{e^x+e^{-x}}\,\mathrm{d}x &=\int_0^\infty2x^te^{-x}\left(1-e^{-2x}+e^{4x}-\dots\right)\,\mathrm{d}x\\ &=2\Gamma(t+1)\left(1-\frac1{3^{t+1}}+\frac1{5^{t+1}}-\dots\right)\\[6pt] &=2\Gamma(t+1)\beta(t+1) \end{align} $$ where $\beta(s)$ is the Dirichlet beta function.
Now we need to compute $\frac{\mathrm{d}}{\mathrm{d}x}\Gamma(x)\beta(x)$ at $x=1$.
$\Gamma(1)=1$ and $\Gamma'(1)=-\gamma$ as shown in this answer.
$\beta(1)=\frac\pi4$ using Gregory's Series. Finally, we need to compute $$ \beta'(1)=\sum_{k=0}^\infty(-1)^k\frac{\log(2k+3)}{2k+3} $$ which I am attempting to do in a manner similar to this answer. I will try to finish this in a bit.
Solution 2:
You can get the value of the integral you're interested in from the integral $$I(a) =\int_{0}^{\infty} \frac{\ln (1+\frac{x^{2}}{a^{2}})}{\cosh x} \, dx, \quad a>0.$$
Notice that $\lim_{a \to \infty} I(a) = 0$.
Differentiating under the integral sign, we get $$ \begin{align} I'(a) &= \int_{0}^{\infty} \frac{2a}{(a^{2}+x^{2})\cosh x} \, dx - \frac{2}{a} \int_{0}^{\infty} \frac{dx}{\cosh x} \, dx \\ &= \int_{0}^{\infty} \frac{2}{(1+u^{2})\cosh (au)} \, du - \frac{\pi}{a}. \end{align}$$
From the answers to this question, we know that $$\int_{0}^{\infty} \frac{2}{(1+u^{2}) \cosh (au)} \, du= \psi\left(\frac{3}{4}+ \frac{a}{2 \pi} \right) - \psi \left(\frac{1}{4} + \frac{a}{2 \pi} \right). $$
Therefore, $$ \begin{align} I(a) &= 2 \pi \left[\ln \Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right) - \ln \Gamma \left(\frac{1}{4} + \frac{a}{2 \pi} \right) \right] - \pi \ln (a)+ C \\ &= 2 \pi \ln \left[\frac{\Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right)}{\sqrt{a} \ \Gamma \left(\frac{1}{4} + \frac{a}{2 \pi} \right)} \right] +C. \end{align}$$
Letting $ a \to \infty$, we get $$ 0 = 2 \pi \lim_{a \to \infty} \log \left[\frac{\Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right)}{\sqrt{a} \ \Gamma \left(\frac{1}{4} + \frac{a}{2 \pi} \right)} \right] + C.$$
Using Stirling's approximation formula for the gamma function, we see that $$ \frac{\Gamma(x+\frac{1}{2})}{\Gamma(x)} \sim \frac{\sqrt{\frac{2\pi}{x+1/2}} \left(\frac{x+1/2}{e} \right)^{x+1/2}}{\sqrt{\frac{2\pi}{x}} \left(\frac{x}{e} \right)^{x}} =\sqrt{x} \left(1+ \frac{1}{2x} \right)^{x} e^{-1/2} \sim \sqrt{x} .$$
Therefore, $$ \lim_{a \to \infty} \ln \left[\frac{\Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right)}{\sqrt{a} \ \Gamma \left(\frac{1}{4} + \frac{a}{2 \pi} \right)} \right] = \lim_{a \to \infty} \ln \ \frac{\sqrt{\frac{1}{4} + \frac{a}{2 \pi}}}{\sqrt{a}} = \lim_{a \to \infty} \ln \sqrt{\frac{1}{4a}+\frac{1}{2 \pi}} = - \frac{\ln (2 \pi)}{2}, $$
which implies $$C= \pi \ln (2 \pi).$$
So we have $$I(a) = 2 \pi \left[\ln \Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right) - \ln \Gamma \left(\frac{1}{4} + \frac{a}{2\pi} \right) \right] - \pi \ln (a) + \pi \ln (2 \pi).$$
But since $$ \int_{0}^{\infty} \frac{\ln (a^{2}+x^{2})}{\cosh x} \, dx = I(a) + \ln(a^{2}) \int_{0}^{\infty} \frac{dx}{\cosh x} \, dx = I(a) + \pi \ln (a),$$ it follows that $$2 \int_{0}^{\infty} \frac{\ln x}{\cosh x} \, dx = \lim_{a \to 0^{+}} 2 \pi \left[\ln \Gamma \left(\frac{3}{4} + \frac{a}{2 \pi} \right) - \ln \Gamma \left(\frac{1}{4} + \frac{a}{2\pi} \right) \right] + \pi \ln (2 \pi). $$
The final step is to apply the reflection formula for the gamma function.
If we had started with the integral $\int_{0}^{\infty} \frac{\ln(a^{2}+x^{2})}{\cosh x} \, dx $, we wouldn't have had a known initial condition.