# Definite integral $\int_0^{\pi/4}\log\left(\tan{x}\right)\ dx$

$$\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 ?

• The integral of $\ln(\sin(x))$ is not expressible in terms of elementary functions. Yet by a mere knowledge of special functions, you can easily find that $$\int \ln(\sin(x))\ \text{d}x = \frac{1}{2} i \left(x^2+\text{Li}_2\left(e^{2 i x}\right)\right)-x \log \left(1-e^{2 i x}\right)+x \log (\sin (x))$$ Where $\text{Li}_n$ defines the Poly-Logarithm special function. Jun 11 '18 at 13:49
• Does it work with $$\log\left(\cos{x}\right)$$ Jun 11 '18 at 14:36
• It does. In particular: $$\int\ln\cos(x))\ \text{d}x = \frac{1}{2} i \text{Li}_2\left(-e^{2 i x}\right)+\frac{i x^2}{2}-x \log \left(1+e^{2 i x}\right)+x \log (\cos (x))$$ Jun 12 '18 at 7:32

Under $$\tan x\to x$$, one has $$\begin{eqnarray} &&\int_0^{\pi/4}\ln(\tan x)dx\\ &=&\int_0^1\frac{\ln x}{1+x^2}dx\\ &=&\int_0^1\ln x\sum_{n=0}^\infty(-1)^nx^{2n}dx\\ &=&-\sum_{n=0}^\infty\int_0^1(-1)^nx^{2n}\ln xdx\\ &=&-\sum_{n=0}^\infty(-1)^n\frac{1}{(2n+1)^2}\\ &=&-C \end{eqnarray}$$ where $$C$$ is the Catalan constant.
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.