Calculus – Integral: $\int_0^{\pi/12} \ln(\tan x)\,dx$ Explained

calculusdefinite integralsintegration

I am trying to evaluate:
$$\int_0^{\pi/12} \ln(\tan x)\,dx$$

I think the integral is quite simple but I am having a hard time evaluating it. I started with the result:
$$\int_0^{\pi/4} \ln(\tan x)\,dx= -G$$
where $G$ is the Catalan's constant. With the change of variables $x\rightarrow 3x$ and using the fact that $\tan(3x)=\tan x\tan\left(\frac{\pi}{3}+x\right)\tan\left(\frac{\pi}{3}-x\right)$, the integral is:
$$\int_0^{\pi/12}\ln(\tan x)\,dx+\int_0^{\pi/12}\ln \tan\left(\frac{\pi}{3}+x\right)\,dx+\int_0^{\pi/12}\ln \tan\left(\frac{\pi}{3}-x\right)\,dx=-\frac{G}{3}$$
$$\Rightarrow \int_0^{\pi/12}\ln(\tan x)\,dx+\int_{-\pi/12}^{\pi/12}\ln \tan\left(\frac{\pi}{3}+x\right)\,dx=-\frac{G}{3}$$
But I do not see how to proceed.

Help is appreciated. Thanks!

Best Answer

Using the Fourier series of $\ln(\tan{x})$, \begin{align} &\int^\frac{\pi}{12}_0\ln(\tan{x})\ {\rm d}x\\ =&-2\sum^\infty_{n=0}\frac{1}{2n+1}\int^\frac{\pi}{12}_0\cos\Big{[}(4n+2)x\Big{]}\ {\rm d}x\\ =&-\sum^\infty_{n=0}\frac{\sin\Big[(2n+1)\tfrac{\pi}{6}\Big{]}}{(2n+1)^2}\\ =&\color{#E2062C}{-\frac{1}{2}\sum^\infty_{n=0}\frac{1}{(12n+1)^2}}\color{#6F00FF}{-\sum^\infty_{n=0}\frac{1}{(12n+3)^2}}-\color{#E2062C}{\frac{1}{2}\sum^\infty_{n=0}\frac{1}{(12n+5)^2}}\\ &\color{#E2062C}{+\frac{1}{2}\sum^\infty_{n=0}\frac{1}{(12n+7)^2}}\color{#6F00FF}{+\sum^\infty_{n=0}\frac{1}{(12n+9)^2}}\color{#E2062C}{+\frac{1}{2}\sum^\infty_{n=0}\frac{1}{(12n+11)^2}}\\ =&\color{#6F00FF}{-\frac{1}{9}\underbrace{\sum^\infty_{n=0}\left[\frac{1}{(4n+1)^2}-\frac{1}{(4n+3)^2}\right]}_{G}}\color{#E2062C}{-\frac{1}{2}G-\frac{1}{2}\underbrace{\sum^\infty_{n=0}\left[\frac{1}{(12n+3)^2}-\frac{1}{(12n+9)^2}\right]}_{\frac{1}{9}G}}\\ =&\left(-\frac{1}{9}-\frac{1}{2}-\frac{1}{18}\right)G=\large{-\frac{2}{3}G} \end{align}


Things could be made clearer if we explicitly write out the terms of the sums. For the red sums, \begin{align} &-\frac{1}{2}\left(\frac{1}{1^2}+\frac{1}{5^2}-\frac{1}{7^2}-\frac{1}{11^2}+\cdots\right)\\ =&-\frac{1}{2}\left(\frac{1}{1^2}-\frac{1}{3^2}+\frac{1}{5^2}-\frac{1}{7^2}+\frac{1}{9^2}-\frac{1}{11^2}+\cdots\right)-\frac{1}{2}\left(\frac{1}{3^2}-\frac{1}{9^2}+\frac{1}{15^2}-\cdots\right)\\ =&-\frac{1}{2}G-\frac{1}{2}\cdot\frac{1}{9}\left(\frac{1}{1^2}-\frac{1}{3^2}+\frac{1}{5^2}-\cdots\right)=-\frac{5}{9}G \end{align}