How to evaluate $\int_{0}^{\pi}\ln (\tan x)\,dx$ How can I integrate $$\int_{0}^{\large\pi}\ln (\tan x)\,\text{dx}\;\;\;?$$
 A: Since $\tan\left(\pi -x\right) = - \tan(x)$, and $\tan(x)$ is positive for $0<x<\frac{\pi}{2}$ we have:
$$
   \int_0^\pi \ln\left(\tan x\right) \mathrm{d}x = i \pi \int_0^{\pi/2} \mathrm{d} x + 2 \int_0^{\pi/2} \ln\left(\tan x\right) \mathrm{d}x
$$
Furthermore, using $\tan\left(\frac{\pi}{2}-x\right) = \frac{1}{\tan(x)}$ we see that
$$\begin{eqnarray}
  2 \int_0^{\pi/2} \ln\left(\tan x\right) \mathrm{d}x &=& \int_0^{\pi/2} \log\left(\tan x \right) \mathrm{d} x + \int_0^{\pi/2} \log\left(\tan y \right) \mathrm{d} y  \\
  &\stackrel{y=\pi/2 - x}{=}& \int_0^{\pi/2} \log\left(\tan x \right) \mathrm{d} x + \int_0^{\pi/2} \log\left(\frac{1}{\tan x} \right) \mathrm{d} x = 0
\end{eqnarray}
$$ 
Thus
$$
  \int_0^\pi \ln\left(\tan x\right) \mathrm{d}x = i \frac{\pi^2}{2}
$$
A: If looking for the real value only, it's enough to consider 
$$I=\int_{0}^{\pi/2}\ln (\tan x)dx$$
and let $x=\pi/2-y$
$$I=\int_{0}^{\pi/2}\ln (\tan x)dx=\int_{0}^{\pi/2}\ln (\cot x)dx$$
$$2I=\int_{0}^{\pi/2}\ln (1)dx$$
$$I=0$$
