Integral: $\int_0^{\pi/12} \ln(\tan x)\,dx$ 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!
 A: Let $I(a)=-\int_0^{\frac\pi{12}}\tanh^{-1}\frac{2\cos2x}{a+a^{-1}}dx$. Then
$$ I’(a) = \int_0^{\frac\pi{12}}\frac{2(a^2-1)\cos2x}{a^4+1-2a^2\cos4x}dx
=\frac{\tan^{-1}\frac a{a^2-1}}{2a}
$$
and
\begin{align}
\int_0^\frac\pi{12}\ln(\tan x)~dx
&= -\int_0^\frac\pi{12}\tanh^{-1}(\cos2x)dx 
=\int_0^1 I’(a)da \\
&=\int_0^1\frac{\tan^{-1}\frac a{a^2-1}}{2a}da
=-\int_0^1\left(\frac{\tan^{-1}a}{2a}\right.
+\underset{a^3\to a}{\left.\frac{\tan^{-1}a^3}{2a}\right)}da\\
&=-\left(\frac12+\frac16\right) \int_0^1\frac{\tan^{-1}a}{a}da=-\frac23G
\end{align}
A: 
$\qquad\qquad\qquad\qquad$ Hello, there! Cleo just asked me to post this:

$$\int_0^\tfrac\pi{12}\ln(\tan x)~dx=-\dfrac23\cdot\text{Catalan}$$
A: Rewriting the Lobachevsky functions in terms of dilogarithms, we get
$$\mathcal{I}=-\frac12\Im\left[\operatorname{Li}_2\left(e^{\pi i/6}\right)+\operatorname{Li}_2\left(e^{5\pi i/6}\right)\right]=\frac12\color{blue}{\Im\left[\operatorname{Li}_2\left(e^{-\pi i/6}\right)-\operatorname{Li}_2\left(e^{5\pi i/6}\right)\right]}=-\frac23\mathbf{G},$$
where the blue expression was calculated in this answer using the triplication formula for $\operatorname{Li}_2(z)$.
Explanation: The basic building block is the integral
$$\int_0^{\pi\alpha}\ln\left(2\sin x\right)dx=-\frac12\Im\operatorname{Li}_2\left(e^{2\pi i\alpha}\right),\qquad \alpha\in\left[0,1/{2}\right].$$
Writing $\ln\tan x=\ln\left(2\sin x\right)-\ln\left(2\sin (\frac{\pi}{2}-x)\right)$ and using that $\Im\operatorname{Li}_2(-1)=0$ reduces the integral to the above.
A: An alternative "elementary" method.
Consider,
\begin{align*}
K&=\int_0^1 \frac{\arctan\left(\frac{x}{1-x^2}\right)}{x}\,dx\\
\end{align*}
Perform the change of variable $x=\tan\left(\frac{t}{2}\right) $,
\begin{align*}
K&=\int_0^{\frac{\pi}{2}} \frac{\arctan\left(\frac{1}{2}\tan t\right)}{\sin t}\,dt
\end{align*}
Défine the function $H$ on $\left[\frac{1}{2};1\right]$ to be,
\begin{align*}H(a)&=\int_0^{\frac{\pi}{2}} \frac{\arctan\left(a\tan t\right)}{\sin t}\,dt\end{align*}
Observe that $K=H\left(\dfrac{1}{2}\right)$ and,
\begin{align*}H(1)&=\int_0^{\frac{\pi}{2}} \frac{t}{\sin t}\,dt\\
&=\Big[t\ln\left(\tan\left(\frac{t}{2} \right)\right)\Big]_0^{\frac{\pi}{2}}-\int_0^{\frac{\pi}{2}}\ln\left(\tan\left(\frac{t}{2} \right)\right)\,dt\\
&=-\int_0^{\frac{\pi}{2}}\ln\left(\tan\left(\frac{t}{2} \right)\right)\,dt\\
\end{align*}
Perform the change of variable $x=\dfrac{t}{2}$,
\begin{align*}H(1)&=-2\int_0^{\frac{\pi}{4}}\ln\left(\tan\left(t \right)\right)\,dt\\
&=2\text{G}
\end{align*}
\begin{align*}H^\prime (a)&=\int_0^{\frac{\pi}{2}} \frac{\cos x}{1-(1-a^2)\sin^2 x}\,dt\\
&=\left[\frac{1}{2\sqrt{1-a^2}}\ln\left(\frac{1+\sin(x)\sqrt{1-a^2}}{1-\sin(x)\sqrt{1-a^2}}\right)\right]_0^{\frac{\pi}{2}}\\
&=\frac{1}{2\sqrt{1-a^2}}\ln\left(\frac{1+\sqrt{1-a^2}}{1-\sqrt{1-a^2}}\right)
\end{align*}
Therefore,
\begin{align*}H(1)-H\left(\frac{1}{2}\right)&=\int_{\frac{1}{2}}^1 \frac{1}{2\sqrt{1-a^2}}\ln\left(\frac{1+\sqrt{1-a^2}}{1-\sqrt{1-a^2}}\right)\,da\end{align*}
Perform the change of variable $y=\arctan\left(\sqrt{\dfrac{1+\sqrt{1-a^2}}{1-\sqrt{1-a^2}}}\right)$
\begin{align*}H(1)-H\left(\frac{1}{2}\right)&=-2\int_{\frac{\pi}{12}}^{\frac{\pi}{4}} \ln\left(\tan y\right)\,dy\\
&=-2\int_0^{\frac{\pi}{4}} \ln\left(\tan y\right)\,dy+2\int_0^{\frac{\pi}{12}} \ln\left(\tan y\right)\,dy
\end{align*}
But, it is well known that,
\begin{align*}\int_0^{\frac{\pi}{4}} \ln\left(\tan y\right)\,dy=-\text{G}\\\end{align*}
Thus,
\begin{align*}\int_0^{\frac{\pi}{12}} \ln\left(\tan y\right)\,dy=-\frac{1}{2}K\\\end{align*}
On the other hand,
\begin{align}\int_0^1 \frac{\arctan\left( \frac{x}{1-x^2}\right)}{x}\,dx-\int_0^1 \frac{\arctan x}{x}\,dx=\int_0^1 \frac{\arctan \left(x^3\right)}{x}\,dx\end{align}
In the latter integral perform the change of variable $\displaystyle y=x^3$,
\begin{align}\int_0^1 \frac{\arctan\left( \frac{x}{1-x^2}\right)}{x}\,dx-\int_0^1 \frac{\arctan x}{x}\,dx=\frac{1}{3}\int_0^1 \frac{\arctan x}{x}\,dx\end{align}
Therefore,
\begin{align}\int_0^1 \frac{\arctan\left( \frac{x}{1-x^2}\right)}{x}\,dx&=\frac{1}{3}\int_0^1 \frac{\arctan x}{x}\,dx+\int_0^1 \frac{\arctan x}{x}\,dx\\
&=\frac{4}{3}\int_0^1 \frac{\arctan x}{x}\,dx\\
&=\frac{4}{3}\text{G}
\end{align}
Thus,
\begin{align*}\int_0^{\frac{\pi}{12}} \ln\left(\tan y\right)\,dy&=-\frac{1}{2}\times \frac{4}{3}\text{G} \\
&=\boxed{-\frac{2}{3}\text{G}}
\end{align*}
A: 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}
A: First: $~\displaystyle 2\int_0^{\tfrac{\pi}{12}} \log(\tan(3x))dx=\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx\qquad(1)$
Proof:
Let $I=\displaystyle \int_0^{\tfrac{\pi}{12}} \log(\tan(3x))dx$
$\tan(3x)=\tan(x)\tan\big(\dfrac{\pi}{3}+x\big)\tan\big(\dfrac{\pi}{3}-x\big)$
$\displaystyle I= \int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx+\int_0^{\tfrac{\pi}{12}} \log\Big(\tan\Big (\dfrac{\pi}{3}+x\Big)\Big)dx+\int_0^{\tfrac{\pi}{12}} \log\Big(\tan\Big (\dfrac{\pi}{3}-x\Big)\Big)dx$
$\displaystyle I=\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx+\int_{\tfrac{\pi}{3}}^{\tfrac{5\pi}{12}} \log(\tan(x))dx+\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{3}} \log(\tan(x))dx$
$\displaystyle I=\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx+\int_{\tfrac{\pi}{4}}^{\tfrac{5\pi}{12}} \log(\tan(x))dx$
$\displaystyle I=\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx-\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{12}} \log\Big(\tan\Big (\dfrac{\pi}{2}-x\Big)\Big)dx$
$\tan\Big (\dfrac{\pi}{2}-x\Big)=\dfrac{1}{\tan(x)}$
So: $~\displaystyle I=\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx+\int_{\tfrac{\pi}{4}}^{\tfrac{\pi}{12}}\log(\tan(x))dx$
$\displaystyle I=2\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx-\int_0^{\tfrac{\pi}{4}} \log(\tan(x))dx$
$\displaystyle I=2\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx-3\int_0^{\tfrac{\pi}{12}} \log(\tan(3x))dx$
$\displaystyle I=2\int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx-3I$
$\displaystyle 2I=\int_0^{\tfrac{\pi}{12}}\log(\tan(x))dx$
Now perform change of variable $u=3x$ in the left member of $(1)$:
$\displaystyle 2\int_0^{\tfrac{\pi}{12}} \log(\tan(3x))dx=\dfrac{2}{3} \int_0^{\tfrac{\pi}{4}} \log(\tan(x))dx$
Since $~\displaystyle G=-\int_0^{\tfrac{\pi}{4}} \log(\tan(x))dx~$ then $~\displaystyle \int_0^{\tfrac{\pi}{12}} \log(\tan(x))dx=-\dfrac{2}{3}G$.
$($Proof found in: Representations of Catalan's constant, David Bradley, $2001)$.
A: Hint:
Shifting by $u=x+\frac{\pi}{12}$,
$$\int_{-\pi/12}^{\pi/12}\ln \tan\left(\frac{\pi}{3}+x\right)\,dx=\int_{0}^{\pi/6}\ln \tan\left(\frac{\pi}{4}+u\right)\,du.$$
The integrand can be expressed via trigonometric series as:
$$\frac12\ln\tan{\left(\frac{\pi}{4}+\frac{x}{2}\right)}=\sum_{k-1}^{\infty}(-1)^{k-1}\frac{\sin{\left[(2k-1)x\right]}}{2k-1}$$
$$\implies \ln\tan{\left(\frac{\pi}{4}+u\right)}=2\sum_{k-1}^{\infty}(-1)^{k-1}\frac{\sin{\left[2(2k-1)u\right]}}{2k-1}.$$
Then,
$$\begin{align}
\int_{0}^{\pi/6}\ln \tan\left(\frac{\pi}{4}+u\right)\,du
&=2\int_{0}^{\pi/6}\sum_{k-1}^{\infty}(-1)^{k-1}\frac{\sin{\left[2(2k-1)u\right]}}{2k-1}\,du\\
&=2\sum_{k-1}^{\infty}\frac{(-1)^{k-1}}{2k-1}\int_{0}^{\pi/6}\sin{\left[2(2k-1)u\right]}\,du\\
&=2\sum_{k-1}^{\infty}\frac{(-1)^{k-1}}{2k-1}\cdot\frac{\cos^2{\left(\frac{\pi}{3}(k+1)\right)}}{2k-1}\\
&=2\sum_{k-1}^{\infty}\frac{(-1)^{k-1}}{(2k-1)^2}\cos^2{\left(\frac{\pi}{3}(k+1)\right)}.\\
\end{align}$$
Sums of this sort can readily be re-expressed as components of dilogarithms.
A: Not an answer, just a cool series (and infinite product) representation
We will work with $$\mathrm{L}(\phi):=\int_0^\phi \log\sin x\,\mathrm dx,\qquad \phi\in (0,\pi)$$
Before we evaluate the integral, we take a look at how it relates to your integral. We define
$$\begin{align}
\mathrm{T}(\phi)=&\int_0^\phi\log\tan x\,\mathrm dx\\
=&\int_0^\phi\log\sin x\,\mathrm dx-\int_0^\phi\log\cos x\,\mathrm dx\\
=&\mathrm{L}(\phi)-\int_0^\phi\log\sin(x+\pi/2)\,\mathrm dx\\
=&\mathrm{L}(\phi)-\int_{\pi/2}^{\phi+\pi/2}\log\sin x\,\mathrm dx\\
=&\mathrm{L}(\phi)-\mathrm{L}(\phi+\pi/2)+\mathrm{L}(\pi/2)\\
=&\mathrm{L}(\phi)-\mathrm{L}(\phi+\pi/2)-\frac\pi2\log2
\end{align}$$
Recall that $$\sin x=x\prod_{n\geq1}\left(1-\frac{x^2}{\pi^2 n^2}\right)$$
Applying $\log$ on both sides,
$$\log\sin x=\log x+\sum_{n\geq1}\log\left(1-\frac{x^2}{\pi^2 n^2}\right)$$
Then integrate over $[0,\phi]$:
$$\mathrm{L}(\phi)=\phi(\log\phi-1)+\sum_{n\geq1}\phi\left[\log\frac{\pi^2n^2-\phi^2}{\pi^2n^2}-2\right]+\pi n\log\frac{\pi n+\phi}{\pi n-\phi}$$
So your integral is given by $\mathrm{T}(\pi/12)=\mathrm{L}(\pi/12)-\mathrm{L}(7\pi/12)-\frac\pi2\log2$ which boils down to the series
$$\begin{align}
\mathrm{T}(\pi/12)=&\frac\pi2\log\frac{6e}\pi-\frac{7\pi}{12}\log7\\&+\pi\sum_{n\geq1}\frac1{12}\left[\log\frac{144n^2-1}{144n^2e^2}+7\log\frac{144n^2e^2}{144n^2-49}\right]+n\log\frac{(12n+1)(12n-7)}{(12n-1)(12n+7)}\end{align}$$
Which can be simplified more if you so desire. If you combine all the $\log$ terms, you can use $$\log\prod_{i}a_i=\sum_{i}\log a_i$$ To turn the series into an infinite product.
