TITLE: Definite integral $\int_0^{\pi/4}\log\left(\tan{x}\right)\ dx$
QUESTION [7 upvotes]: $$\int_0^{\pi/4}\log\left(\tan{x}\right)\ dx$$
My turn :
$$I=\int_0^{\pi/4}\log\left(\sin{x}\right)-\log\left(\cos{x}\right)\ dx$$
$$I_1=\int_0^{\pi/4}\log\left(\sin{x}\right)\ dx$$
let
$$u=2x$$
$$I_1=\frac{1}{2}\int_0^{\pi/2}\log\left(\sin{\frac{u}{2}}\right)\ du$$
But i could not evaluate the last integral ?

REPLY [4 votes]: Another way is to use the Fourier expansion of $\log\sin x$ and $\log\cos x$ and integrate the expression term-wise. Since

$$\begin{align*}\log\cos x & =\sum\limits_{k\geq1}(-1)^{k-1}\frac {\cos 2kx}k-\log 2\\\log\sin x & =-\sum\limits_{k\geq1}\frac {\cos 2kx}k-\log 2\end{align*}$$

Therefore$$\begin{align*}I & =\int\limits_0^{\pi/4}dx\,\log\tan x\\ & =\int\limits_0^{\pi/4}dx\,\log\sin x-\int\limits_0^{\pi/4}dx\,\log\cos x\\ & =-\sum\limits_{k\geq1}\int\limits_0^{\pi/4}dx\,\frac {\cos 2kx}k+\sum\limits_{k\geq1}\int\limits_0^{\pi/4}dx\, (-1)^k\frac {\cos 2kx}k\end{align*}$$
Now integrate within the limits to get$$\begin{align*}I & =\frac 12\sum\limits_{k\geq1}\frac {(-1)^k\sin\left(\frac {\pi k}2\right)}{k^2}-\frac 12\sum\limits_{k\geq1}\frac {\sin\left(\frac {\pi k}2\right)}{k^2}\\ & =-\frac 12\sum\limits_{k\geq1}\frac {(-1)^k}{(2k-1)^2}-\frac 12\sum\limits_{k\geq1}\frac {(-1)^k}{(2k-1)^2}\\ & =-G\end{align*}$$Where $G$ is Catalan's Constant.