Evaluate $\int \frac{\tan^3x+\tan x}{\tan^3x+3 \tan^2x+2 \tan x+6} dx$ $$\int \frac{\tan^3x+\tan x}{\tan^3x+3 \tan^2x+2 \tan x+6} dx$$
My approaches so far has been using substitution with $\tan x = t$ and $\tan \frac x2 = t$ but the calculations has been harder than I think they should.
I've also tried using ordinary polynom integration to simplify the integral but I'm having problems with factorizing the denominator.

Choose $t=\tan x$ and then $dt=(1+\tan^2x)dx$. 
So your integral is:
$$\int \frac{t}{t^3+3 t^2+2 t+6} dt=\int \frac{t}{(t+3)(t^2+2)} dt.$$
We have:
$$\frac{1}{(t+3)(t^2+2)}=\frac{At+B}{t^2+2}+\frac{C}{t+3}=\frac{(A+C)t^2+(3A+B)t+(3B+2C)}{(t+3)(t^2+2)}.$$
We easily get: $A=-C=-\dfrac{1}{11}$ and $B=\dfrac{3}{11}$.
Therefore:
$$\begin{equation}\begin{split}\int \frac{t}{t^3+3 t^2+2 t+6} dt&=\dfrac{1}{11}\int t\left(\frac{3-t}{t^2+2}+\frac{1}{t+3} \right)dt,\\&=\dfrac{1}{11}\int \frac{3t-t^2}{t^2+2}+\frac{t}{t+3}dt\\&=\dfrac{1}{11}\int \frac{3t-t^2}{t^2+2}dt+\dfrac{1}{11}\int\frac{t}{t+3}dt\\&=-\dfrac{1}{11}\int \frac{-3t+t^2+2-2}{t^2+2}dt+\dfrac{1}{11}\int\frac{t+3-3}{t+3}dt\\&=\cdots\end{split}\end{equation}$$
