[Math] Integral $\int_0^{\pi/4} \frac{\ln \tan x}{\cos 2x} dx=-\frac{\pi^2}{8}.$

calculuscomplex-analysisdefinite integralsintegrationreal-analysis

$$I:=\int_0^{\pi/4} \frac{\ln \tan x}{\cos 2x} dx=-\frac{\pi^2}{8}.$$
I am trying to see nice solutions to this integral. I tried the following
$$
I=\int_0^{\pi/4}\frac{\ln \sin x}{\cos 2x} dx-\int_0^{\pi/4} \frac{\ln \cos x }{\cos 2x}dx
$$
but am not sure how to work with this denominator of $\cos 2x$. If this helps:
$$
\int_0^{\pi/4}\log \sin x \, dx=-\frac{1}{4}\big(2K+\pi \ln 2\big)
$$
where K is the Catalan constant (note I am using Borwein convention not mathematica of using a C to define this constant.) It is given by
$$
K=\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2}=\beta(2)
$$
where $\beta(2)$ is the Dirichlet beta function.
However I cannot solve this integral either. Thanks

Best Answer

Introduce variables $t$ and $y$ such that $t = \tan x = e^{-y}$, we have

$$\begin{align} \int_0^{\pi/4}\frac{\log\tan x}{\cos 2x} dx &= \int_0^1\frac{\log t}{\frac{1-t^2}{1+t^2}}\frac{dt}{1+t^2}\\ &= -\int_0^\infty \frac{y}{1 - e^{-2y}} e^{-y} dy = -\int_0^\infty \sum_{k=0}^\infty y e^{-(2k+1)y} dy\\ &= -\sum_{k=0}^\infty\frac{1}{(2k+1)^2} = -\left[\sum_{k=1}^\infty\frac{1}{k^2} - \sum_{k=1}^\infty\frac{1}{(2k)^2}\right]\\ &= -\left(1-\frac14 \right)\zeta(2) = -\frac{\pi^2}{8} \end{align} $$