Show that $\int_0^\pi \log^2\left(\tan\frac{ x}{4}\right)dx=\frac{\pi^3}{4}.$ Hi I am trying to prove the relation
$$
I:=\int_0^\pi \log^2\left(\tan\frac{ x}{4}\right)dx=\frac{\pi^3}{4}.
$$
I tried expanding the log argument by using $\sin x/ \cos x=\tan x,$ and than used $\log(a/b)=\log a-\log b$, I get
$$
I=\int_0^\pi \left( \log \sin \frac{x}{4}-\log\cos \frac{x}{4}\right)^2dx.
$$
We can distribute this out 
$$
\int_0^\pi \log^2 \sin \frac{x}{4}dx +\int_0^\pi \log^2\cos \frac{x}{4}dx-2\int_0^\pi\log \sin \frac{x}{4}\log \cos \frac{x}{4}dx.
$$
Now I am stuck at how to solve these.  Thanks.  

Letting $x\mapsto \frac{1}{x},$ we have
$$
I=\int_0^\pi \ln ^2\left(\tan \frac{x}{4}\right) d x=4 \int_0^{\frac{\pi}{4}} \ln ^2(\tan x) d x
$$
By my post,
$$\int_0^{\frac{\pi}{4}} \ln ^2(\tan x) d x= \frac{\pi^3}{16} ,$$
we can conclude that
$$
\boxed {I=\frac{\pi^3}{4}}
$$
