<s>[INST] Find the value of the integral $\int_{0}^{\frac{\pi}{12}}\frac{\tan^2x-3}{3\tan^2x-1}dx$ Find the value of the integral $\int_{0}^{\frac{\pi}{12}}\frac{\tan^2x-3}{3\tan^2x-1}dx$

$\int_{0}^{\frac{\pi}{12}}\frac{\tan^2x-3}{3\tan^2x-1}dx$
$=\int_{0}^{\frac{\pi}{12}}\frac{1}{3}\frac{\tan^2x-\frac{1}{3}+\frac{1}{3}-3}{\tan^2x-\frac{1}{3}}dx$
$=\frac{1}{3}-\frac{8}{9}\int_{0}^{\frac{\pi}{12}}\frac{dx}{\tan^2x-\frac{1}{3}}dx$
$=\frac{1}{3}-\frac{8}{9}\int_{0}^{\frac{\pi}{12}}\frac{\cot^2x dx}{1-\frac{1}{3}\cot^2x}dx$
$=\frac{1}{3}-\frac{8}{9}\int_{0}^{\frac{\pi}{12}}\frac{\cot^2x dx}{\frac{4}{3}-\frac{1}{3}\csc^2x}dx$
I am stuck here and could not solve further.Please help me.
 [/INST] HINT: convert your integrand into $\frac{4\cos(x)^2-1}{4\cos(x)^2-3}$ and use the tan-half angle formulas
the result should be $$2/3\,\sqrt {3}{\rm arctanh} \left(\cot \left( {\frac {5\,\pi }{12}}
 \right) \sqrt {3}\right)+\pi /12
$$
</s>