Integral $\int \frac{\tan^4 \theta d \theta}{1-\tan^2 \theta}$?

Hint:

Use the substitution $u=\tan\theta$, $\mathrm d\mkern1.5mu u=(1+u^2)\mkern1.5mu\mathrm d\mkern1mu\theta$. You'll get the integral of the rational function: $$\int\frac{u^4}{1-u^4}\,=\int\frac{u^4}{(1-u)(1+u)(1+u^2)}\,\mathrm d\mkern1mu u$$ Then, decomposition in partial fractions and back to $\theta$.


Here is another way to proceed:

$\displaystyle\int\frac{\tan^4\theta}{1-\tan^2\theta}d\theta=\int\frac{\tan^4\theta-1}{1-\tan^2\theta}d\theta+\int\frac{1}{1-\tan^2\theta}d\theta=-\int(\tan^2\theta+1)d\theta+\int\frac{\cos^2\theta}{\cos^2\theta-\sin^2\theta}d\theta$

$=\displaystyle-\int\sec^2\theta \;d\theta+\int\frac{\frac{1}{2}(1+\cos 2\theta)}{\cos 2\theta}d\theta= -\tan\theta+\int\left(\frac{1}{2}\sec2\theta+\frac{1}{2}\right)d\theta$

$=\displaystyle-\tan\theta+\frac{1}{4}\ln\big|\sec2\theta+\tan2\theta\big|+\frac{1}{2}\theta+C$


Hint: (This expands the hint of @Bernard... it was what I needed to make it work.)

Note that $\frac{1}{1-\tan^{2}(\theta)}=\frac{1+\tan^{2}(\theta)}{(1-\tan^{2}(\theta))(1+\tan^{2}(\theta))}=\frac{\sec^{2}(\theta)}{1-\tan^{4}(\theta)}$.

So using the suggested substitution $u=\tan(\theta)$ gives you

$$\int \frac{\tan^{4}\theta}{1-\tan^{2}\theta}d\theta= \int \frac{u^{4}}{1-u^4}du=\int -1 + \frac{1}{1-u^4}du.$$

Then, $(1-u^4)=(1-u)(1+u)(1+u^2)$ and can be finished with partial fractions.