
What I tried was I took $$\tan^{-1}(x) =t, $$ but I got terms like $$\cos(\tan(t))$$ which I don't know what to do with. So please guide me into solving this..

What I tried was I took $$\tan^{-1}(x) =t, $$ but I got terms like $$\cos(\tan(t))$$ which I don't know what to do with. So please guide me into solving this..
Hint :
$$t = \arctan \left ( \sec x + \cos x \right )
,\\dt = \frac{\sin ^{3}xdx}{\cos^{4}x+ 3\cos ^{2}x + 1 }\\
\int \frac{dt}{t} = \log_{e} \arctan \left ( \sec x + \cos x \right ) + C$$