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.

$$\int \frac{\tan^3x+\tan x}{\tan^3x+3 \tan^2x+2 \tan x+6} dx$$
$$\int \frac{\tan x(\tan^2(x)+1)}{\tan^3x+3 \tan^2x+2 \tan x+6} dx$$
$$\int \frac{\tan x(\sec^2(x))}{\tan^3x+3 \tan^2x+2 \tan x+6} dx$$
Frome here, let $u=\tan(x)$, $\dfrac{du}{dx} = \sec^2(x)$., thus,
$$\int \frac{u}{u^3 + 3u^2 + 2u + 6}$$
From there, use partial fractions.
