How can I compute this integral in closed form :
$$\displaystyle\int_{0}^{\displaystyle \tfrac{π}{4}}\ln^{2}\left(\tan x\right)dx$$
How can use Fourier series here ?
$$-2\displaystyle \sum_{n=0}^{\infty}\frac{\cos((4n+2)x)}{2n+1}$$
$$=\ln\left(\tan x\right)$$
And what's about if $\displaystyle\int_0^{\displaystyle \tfrac{π}{4}}\ln^2(\cot x)dx$
Please give me ideas or hints
Hint. The change of variable $$ t=\tan x,\quad x=\arctan t,\quad dx=\frac{dt}{1+t^2}, $$ gives $$ I=\int_0^{\pi/4}\ln^2\tan x\,dx=\int_0^1\frac{\ln^2t}{1+t^2}\,dt $$ then expanding $$ \frac{1}{1+t^2}=\sum_{n=0}^\infty(-1)^nt^{2n},\quad |t|<1, $$and integrating termwise gives $$ I=\frac{\pi^3}{16}. $$