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

I have to evaluate this indefinite integral $$\int \frac{\tan^4 \theta\, d \theta}{1-\tan^2 \theta}$$ I tried it as follows $$I=\int\frac{(\sec^2 \theta-1)\tan^2 \theta\, d \theta}{1-\tan^2 \theta}=\int\frac{\sec^2 \theta \tan^2 \theta\, d \theta}{1-\tan^2 \theta}-\int\frac{\tan^2 \theta \,d \theta}{1-\tan^2 \theta}$$ First part of integration can be easily solved by substitution but how to solve the second part? Help to solve it by other method if you have. Thanks!

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 into partial fractions and back to $$\theta$$.

• @Harish Chandra Rajpoot: Thank you for the correction of the lapsus. Commented May 22, 2015 at 22:40
• But $du = \sec^2 \theta d\theta$... Commented May 22, 2015 at 22:43
• yes you are right. It needs re-editing! Commented May 22, 2015 at 22:44
• @Harish Chandra Rajpoot: finally there was no error in my initial post. I was suggested a correction that I accepted. Only some details were missing. Commented May 22, 2015 at 22:49
• Thanks, @Sebastiano! Note I just applied Bioche's rules for this substitution Commented Nov 5, 2021 at 21:02

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.

• wouldn't it be $\frac{u^4}{1-u^2}$ instead of power $4$? Commented May 22, 2015 at 23:30
• @Foliar, No because you multiplied top and bottom by $1+u^2=1+\tan^{2}\theta=\sec^{2}\theta$ Commented May 23, 2015 at 0:06

HINT: Multiply the numerator and denominator by $$\cos^2(\theta)$$. Rewrite $$\cos^2(\theta) - \sin^2(\theta)$$ as $$\cos(2\theta)$$ and $$\sin^2(\theta)$$ in terms of $$\cos(2\theta)$$. We know how to integrate $$\sec(2\theta)$$.

• It took me a few moments to guess how you wanted to rewrite $\sin^2 \theta.$ OP might need a hint about that, too. Commented May 22, 2015 at 22:18
• Yeah fair point - there's so much you could do. But having said that if there's a cos(2x) in the denominator...I guess when you 'see it' it seems so obvious (especially when the result immediately follows)! Commented May 23, 2015 at 1:36
• very nice hint +1 Commented Apr 21, 2021 at 7:22