# $\int \left(\tan^2 x + \tan^4 x\right) dx$

I am trying to calculate:

$$\int \left(\tan^2 x + \tan^4 x\right) dx$$

I have managed to reduce it to:

$$\int \left(\tan^2 x\sec^2 x\right) dx$$

I then tried applying integration by parts, but that just made it more complicated. Any suggestions/advice on how I should proceed with this question?

• Try $u$-substitution with $u = \tan x$. – Eric Tressler Sep 17 '15 at 20:45
• Didn't think of trying that. Thanks, it worked :) – user2681474 Sep 17 '15 at 20:47

Use substitution Let $u =tan(x)$ then $du= (sec(x))^{2} dx$ by making the subtitution to the integral you will have

$$\int u^2 du = \frac{1}{3} u^3 + c$$

then sutitute $tan(x)$ back in place of $u$

Let $u=\tan x$ and get $\mathrm{d}u=\sec^2 x \mathrm{d}x$. So the integral simplifies to $$\int u^2 \ \mathrm{d}u$$. This is easy to integrate.

• It's simpler to write $\mathrm d\mkern1mu u=(1+u^2)\mathrm d\mkern1mu x$. – Bernard Sep 17 '15 at 20:52

Notice, Let $$\tan x=t \implies \sec^2 xdx=dt$$ $$(1+\tan^2 x)dx=dt\iff dx=\frac{1}{1+t^2}dt$$

$$\int (\tan^2 x+\tan^4 x)dx=\int \frac{(t^2+t^4)dt}{1+t^2}$$ $$=\int \frac{t^2(1+t^2)dt}{1+t^2}$$$$=\int t^2 dt=\frac{t^3}{3}+C$$ $$=\frac{\tan^3x}{3}+C$$

Alternative method: $$\int (\tan^2 x+\tan^4 x)dx$$$$=\int \tan^2 x(1+\tan^2 x)dx$$ $$=\int \tan^2 x\sec^2 xdx$$ by substituting $\tan x=t$ $$=\int t^2 dt$$ $$=\frac{t^3}{3}+C$$ $$=\frac{\tan^3x}{3}+C$$