Evaluating $\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx$ I want to evaluate $\displaystyle \int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx$ but it's quite difficult.
I have tried to rewrite the integral as
$$\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx=\frac{\pi }{2}\int _0^{\frac{\pi }{2}}\tan \left(x\right)\ln ^2\left(\sin \left(x\right)\right)\:dx-\int _0^{\frac{\pi }{2}}x\tan \left(x\right)\ln ^2\left(\sin \left(x\right)\right)\:dx$$
I've also tried to integrate by parts in multiple ways yet I cant go forth with this integral, I also tried using the substitution $t=\tan{\frac{x}{2}}$ but cant get anything to work, I'll appreciate any sort of help.
I also tried using the classical expansion
$$\ln \left(\cos \left(x\right)\right)=-\ln \left(2\right)-\sum _{n=1}^{\infty }\frac{\left(-1\right)^n\cos \left(2nx\right)}{n},\:-\frac{\pi }{2}<x<\frac{\pi }{2}$$
But it only gets worse.

My approach.
$$\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx$$
$$=\frac{1}{4}\int _0^{\infty }\frac{\arctan \left(x\right)\ln ^2\left(1+x^2\right)}{x\left(1+x^2\right)}\:dx=\frac{\pi }{8}\int _0^{\infty }\frac{\ln ^2\left(1+x^2\right)}{x\left(1+x^2\right)}\:dx$$
$$-\frac{1}{4}\int _0^{\infty }\frac{\arctan \left(\frac{1}{x}\right)\ln ^2\left(1+x^2\right)}{x\left(1+x^2\right)}\:dx$$

$$\int _0^{\infty }\frac{\arctan \left(\frac{1}{x}\right)\ln ^2\left(1+x^2\right)}{x\left(1+x^2\right)}\:dx=\frac{\pi }{2}\int _0^{\infty }\frac{x\ln ^2\left(\frac{x^2}{1+x^2}\right)}{1+x^2}\:dx-\int _0^{\infty }\frac{x\arctan \left(\frac{1}{x}\right)\ln ^2\left(\frac{x^2}{1+x^2}\right)}{1+x^2}\:dx$$
$$=\frac{\pi }{2}\int _0^{\infty }\frac{x\ln ^2\left(\frac{x^2}{1+x^2}\right)}{1+x^2}\:dx-\frac{4}{3}\int _0^{\infty }\frac{x\arctan ^3\left(\frac{1}{x}\right)}{1+x^2}\:dx-\frac{4}{3}\operatorname{\mathfrak{I}} \left\{\int _0^{\infty }\frac{x\ln ^3\left(\frac{x}{x-i}\right)}{1+x^2}\:dx\right\}$$
$$=\frac{\pi }{4}\int _0^1\frac{\ln ^2\left(x\right)}{1-x}\:dx+4\int _0^{\frac{\pi }{2}}x^2\ln \left(\sin \left(x\right)\right)\:dx-\frac{4}{3}\operatorname{\mathfrak{I}} \left\{3\operatorname{Li}_4\left(2\right)+i\pi \ln ^3\left(2\right)-6\zeta \left(4\right)\right\}$$
$$=\frac{5\pi }{4}\zeta \left(3\right)-\frac{\pi ^3}{6}\ln \left(2\right)-\frac{2\pi }{3}\ln ^3\left(2\right)$$

Thus.
$$\frac{1}{4}\int _0^{\infty }\frac{\arctan \left(x\right)\ln ^2\left(1+x^2\right)}{x\left(1+x^2\right)}\:dx=\frac{\pi }{8}\zeta \left(3\right)-\frac{1}{4}\left(\frac{5\pi }{4}\zeta \left(3\right)-\frac{\pi ^3}{6}\ln \left(2\right)-\frac{2\pi }{3}\ln ^3\left(2\right)\right)$$
Therefore.
$$\int _0^{\frac{\pi }{2}}x\cot \left(x\right)\ln ^2\left(\cos \left(x\right)\right)\:dx=-\frac{3\pi }{16}\zeta \left(3\right)+\frac{\pi ^3}{24}\ln \left(2\right)+\frac{\pi }{6}\ln ^3\left(2\right)$$
