Evaluate $\int\frac{3\cot3x-\cot x}{\tan x-3\tan3x}\,dx$ To evaluate:

$$I= \int_{ }^{ }\frac{3\cot3x-\cot x}{\tan x-3\tan3x}dx$$


My approach:
Convert $\cot x$ and $\cot 3x$ terms into $\tan x$ and $\tan3x$ respectively and use $$\displaystyle \tan3x=\frac{\left(3\tan x-\tan^{3}x\right)}{1-3\tan^{2}x}$$
Further simplification gives me $$\displaystyle I=\int_{ }^{ }\frac{\tan x}{\tan3x}dx$$
How do I proceed further? Any hints are welcome!
Edit:
For anyone wondering how $\int{\tan x/\tan(3x)}dx=\int{(1-3\tan^2x)/(3-\tan^2x)}dx$ don't forget $$\displaystyle \tan3x=\frac{\left(3\tan x-\tan^{3}x\right)}{1-3\tan^{2}x}$$

$\int{\tan x/\tan(3x)}dx=\int{(1-3\tan^2x)/(3-\tan^2x)}dx$
Now, we express the numerator as $3-\tan^2x-2(1+\tan^2x)$ so that the integrand becomes
$\int{1-2(\sec^2x/(3-\tan^2x))}dx$.
Now, take $\tan x=t$ and simplify to get $\int{1-2/(3-t^2)}dt$. Now plugin the formulas to get the answer.
