How to evaluate the definite integral $\int _{0}^{\frac{\pi }{2}}\frac{\ln(\tan x)}{1-\tan x+\tan^{2} x}\mathrm{d} x$? I am struggling with this integral:
$\displaystyle \int _{0}^{\frac{\pi }{2}}\frac{\ln(\tan x)}{1-\tan x+\tan^{2} x}\mathrm{d} x$
What I tried so far:
$\displaystyle \int _{0}^{\frac{\pi }{2}}\frac{\ln(\tan x)}{1-\tan x+\tan^{2} x}\mathrm{d} x$
$\displaystyle =\int _{0}^{\frac{\pi }{2}}\frac{\cos^{2} x\ln(\tan x)}{1-\sin x\cos x}\mathrm{d} x$
$\displaystyle =\int _{0}^{\frac{\pi }{2}}\frac{-\sin^{2} x\ln(\tan x)}{1-\sin x\cos x}\mathrm{d} x$
$\displaystyle =\frac{1}{2}\int _{0}^{\frac{\pi }{2}}\frac{\cos 2x\ln(\tan x)}{1-\sin x\cos x}\mathrm{d} x$
The answer should come out to be $\dfrac{-7\pi^2}{72}$.
Any help will be appreciated.

Since
$$
\displaystyle \int _{0}^{\frac{\pi }{2}}\frac{\ln(\tan x)}{1-\tan x+\tan^{2} x}\mathrm{d} x=\int_0^{\infty} \frac{\ln t}{(1-t+t^2)(1+t^2)}dt,
$$
consider
$$
\begin{aligned}
\mathscr{I}(s)&=\int_0^{\infty} \frac{t^s}{(1-t+t^2)(1+t^2)}dt
\\&=\int_0^{\infty} \frac{t^{s-1}}{1-t+t^2}dt-\int_0^{\infty} \frac{t^{s-1}}{1+t^2}dt
\\&=\int_0^{\infty} \frac{t^{s-1}}{1+t^3}dt+\int_0^{\infty} \frac{t^{s}}{1+t^3}dt-\int_0^{\infty} \frac{t^{s-1}}{1+t^2}dt.
\end{aligned}
$$
With Beta function, we have
$$
\int_{0}^{\infty}\frac{t^{s-1}}{1+t^{a}}dt=\frac{\pi \csc(\frac{\pi s}{a})}{a}
$$
thus
$$
\mathscr{I}(s)=\frac{\pi \csc(\frac{\pi s}{3})}{3}+\frac{\pi \csc(\frac{1}{3} \pi (s+1))}{3}-\frac{\pi \csc(\frac{\pi s}{2})}{2}.
$$
In conclusion,
$$
\begin{aligned}
\int_0^{\frac{\pi}{2}}\frac{\ln \tan x}{1-\tan x+\tan^2 x}dx&=\lim_{s\to 0}\frac{\partial }{\partial s}\mathscr{I}(s)
\\&=\lim_{s\to 0}\left(-\frac{\pi^{2} \csc(\frac{\pi s}{3}) \cot(\frac{\pi s}{3})}{9}-\frac{\pi^{2} \csc(\frac{1}{3} \pi s+\frac{1}{3} \pi) \cot(\frac{1}{3} \pi s+\frac{1}{3} \pi)}{9}+\frac{\pi^{2} \csc(\frac{\pi s}{2}) \cot(\frac{\pi s}{2})}{4}\right)
\\&=-\frac{7 \pi^{2}}{72}
\end{aligned}
$$
