<s>[INST] 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.  
 [/INST] Let $u=\tan{\dfrac{x}{4}}$, then $du=\dfrac{1}{4}\sec^2{\dfrac{x}{4}}dx=\dfrac{1}{4}(1+u^2)dx$. The integral becomes
\begin{align}
\int^{\pi}_0\ln^2\left(\tan\frac{x}{4}\right)dx
&=4\int^{1}_0\frac{\ln^2{u}}{1+u^2}du\\
&=4\sum_{n \ge 0}(-1)^n\int^1_0x^{2n}\ln^2{x}dx\\
&=4\sum_{n \ge 0}(-1)^n\lim_{a \to 2n}\frac{d^2}{da^2}\int^1_0x^adx\\
&=4\sum_{n \ge 0}(-1)^n\lim_{a \to 2n}\frac{d}{da}\left(-\frac{1}{(a+1)^2}\right)\\
&=8\sum_{n \ge 0}\frac{(-1)^n}{(2n+1)^3}\\
&=8\beta(3)\\
&=\frac{\pi^3}{4}
\end{align}
</s>