<s>[INST] How to integrate this : $ \int \cot(5x) \tan(2x) \mathrm{d}x$ Methods to integrate this integral: 
$$\int \cot(5x) \tan(2x) \mathrm{d}x$$
I have tried several methods, step by step, and they have led to invalid results. Helpful hints or processes are welcome. 
I did this further : 
$$ \cot(5x) = \frac{1}{\tan(2x+ 3x)}$$
$$= \frac{1}{\frac{\tan 2x +\tan 3x}{1-\tan 2x\tan 3x}}$$
Simplifying it further by breaking $\tan(3x) = \tan(2x +x)$  again we get 
$$= \frac{1-\tan^2 x -2\tan x \tan 2x}{2\tan 2x -\tan^2 2x . \tan x +\tan x}$$
now the integral is $$ = \frac{1-\tan^2 x -2\tan x \tan 2x}{2\tan 2x -\tan^2 2x . \tan x +\tan x} \tan 2x $$
Can we do something with this further thanks..
 [/INST] Letting $\tan x=z$, the integral can be rewritten as $$I=\int \frac{2z(1-10z^2+5z^4)}{(1-z^4)(5z-10z^3+z^5)}dz\\=2\int\frac{1-10z^2+5z^4}{(1-z^4)(5-10z^2+z^4)}dz\\=2\int \frac{1}{1-z^4}dz-8\int \frac{1}{5-10z^2+z^4}dz\\=2J-8K$$ where $J$ can be easily evaluated. As for $K$, it can be written as $$\int \frac{1}{(z^2-5-2\sqrt{5})(z^2-5+2\sqrt{5})}dz$$ which can then be evaluated without much effort. I admit that the final expressions will be ugly, but the evaluation process is straightforward. 
</s>