We can rewrite the numerator as:
tanx(1 + tan2x)
We know that tan2x + 1 = sec2x, thus:
\(I = \int \frac{\tan x \sec^2 x}{1 + \tan^3 x} dx\)
Let u = tanx.
Then du = sec2x dx and \(\frac{du}{\sec^2x} \) = dx

Now we need to change into u. This is simple to do because u = tanx.
\(I = \int \frac u{1 + u^3}du\)
We now observe that u3 + 1 = (u + 1)(u2 − u + 1).

We can immediately see that A = \(-\frac 13\). This means that B = C = \(\frac 13\). Thus the integral becomes:

Now we let n = u2 − u + 1. Then dn = 2u − 1du which means that du = \(\frac{dn}{2u -1}\).

We now have a third integral that needs to be solved. Call it I3.

We now let \(t = \frac{2u - 1}{\sqrt 3}\). This signifies that \(dt = \frac 2{\sqrt 3} du\) and that \(du = \frac{\sqrt 3}2\) dt.

So putting everything back together:
