Find $\int \frac{\sin2x+2\tan x}{\cos^6x+6\cos^2x+4}dx$
You are almost there.
Note that\begin{align}\frac{1+\frac1t}{t^3+6t+4}&=\frac{t+1}{t(t^3+6t+4)}\\&=\frac14\left(\frac1t-\frac{t^2+2}{t^3+6t+4}\right).\end{align}Now, use the fact that $(t^3+6t+4)'=3(t^2+2)$.
Let $$I=-\int \frac{1+1/t}{t^3+6t+4} dt=\int \frac{1+t}{12t(t^3+6t+4)} dt=\int \left(\frac{1}{4t}-\frac{1}{12} \frac{3t^3+6}{(t^3+6t+4)}\right) dt$$ $$=\frac{\ln t}{4}-\frac{1}{12} \ln ~(t^3+6t+4)+C.$$