I was originally investigating the definite integral
$$\ I = \int_0^{\frac{\pi}{4}} \cos(\ln(\tan x))dx$$
After substituting $\ln(\tan x) = u$ and changing the upper and lower bounds, the integral simplified into
$$\ I = \int_0^{\infty} \frac{\cos u \cdot e^u}{1+e^{2u}}du$$
Which is nothing else but
$$\ I = \frac{1}{2} \cdot \int_0^{\infty} \frac{\cos u}{\cosh u} du$$
Now, I considered the Maclaurin series of $\cos x$:
$$ \cos x = \sum_{n=0}^{\infty}(-1)^n \cdot \frac{x^{2n}}{(2n)!}$$
Then, I substituted this summation inside the integral:
\begin{align} I &= \int_0^{\infty} \frac{e^u}{1+e^{2u}} \cdot \sum_{n=0}^{\infty}(-1)^n \cdot \frac{u^{2n}}{(2n)!} du \\ &= \int_0^{\infty} \frac{e^u}{1+e^{2u}}du - \frac{1}{2!}\cdot \int_0^{\infty} \frac{u^2e^u}{1+e^{2u}}du + \frac{1}{4!} \cdot \int_0^{\infty} \frac{u^4e^u}{1+e^{2u}}du +\ldots \end{align}
Rearranging the terms, we get:
$$ I = \sum_{n=0}^{\infty}\frac{(-1)^n}{(2n)!} \cdot \int_0^{\infty} \frac{u^{2n}e^u}{1+e^{2u}} du $$
As seen here and substituting $\ 2n$ instead of $\ n$, we get:
$$\int_0^{\infty} \frac{u^{2n}e^u}{1+e^{2u}} du = \Gamma(2n+1)\beta(2n+1) = (2n)!\beta(2n+1)$$
Substituting this equality into our original integral, note that the $(2n)!$ terms cancel and we obtain
$$\ I = \sum_{n=0}^{\infty}(-1)^n\beta(2n+1)$$
Meanwhile, from the comments in the answer of the same question, setting $\ t =1$, we have: $$\ I = \frac{1}{2}\int_0^{\infty} \frac{\cos u}{\cosh u} du = \frac{\pi}{4}\cdot \operatorname{sech}(\frac{\pi}{2})$$
Then, is it valid to assert the below equality?
$$\sum_{n=0}^{\infty}(-1)^n\beta(2n+1) = \frac{\pi}{4} \cdot \operatorname{sech}(\frac{\pi}{2})$$
Which seems to be true, as per WolframAlpha at least.
Can we derive it via any other method? The sum on the LHS feels like a daunting one, but it turns out to be equal to this rather simplified expression on the right.
Also - as pointed out in the comments, the limit as k approaches ${\infty}$ of $\beta(2k+1)$ should be $\ 1$. Given that this is true, how do we explain the fact that this sum converges?
Thank you for reading. Any suggestions are appreciated.
Making the story short, if you enjoy the Gaussian hypergeometric function $$ I = \int \cos(\ln(\tan x))dx$$ $$I=\frac{1+i}{4}\, \tan ^{1-i}(x) \,\, _2F_1\left(\frac{1-i}{2},1;\frac{3-i}{2};- \tan ^2(x)\right)+$$ $$\frac{1-i}{4} \tan ^{1+i}(x) \,\, _2F_1\left(\frac{1+i}{2},1;\frac{3+i}{2};- \tan ^2(x)\right)$$ which is defined for $(0 \leq x \lt \frac \pi 2)$
$$ J = \int_0^{\frac{\pi}{4}} \cos(\ln(\tan x))dx$$ $$J=\frac 1 8\Bigg(\left(\psi\left(\frac{3+i}{4}\right)-\psi \left(\frac{3-i}{4}\right)\right)- \left(\psi \left(\frac{1+i}{4}\right)+\psi \left(\frac{1-i}{4}\right)\right) \Bigg)$$ $$J=\frac{\pi}{4} \ \text{sech}\left(\frac{\pi }{2}\right)$$