# Integrate tan^3 x dx?

1. Apr 20, 2014

### Cali920

1. The problem statement, all variables and given/known data

∫tan3x dx

2. The attempt at a solution
∫tan x + ∫tan2x

∫tan x (sec2x - 1) dx

∫(tan x (sec2x - tan x) dx

∫tan x sec2x dx - ∫tan x dx

u = sec x
du = sec x tan x dx

∫tan x sec x sec x - ∫tan x dx

Now I'm stuck..

∫ du * u - ∫ tan x dx ?

Last edited: Apr 20, 2014
2. Apr 20, 2014

### Panphobia

For the second part, tan(x) = sin(x)/cos(x), and a simple u substitution should be fine for that.

3. Apr 20, 2014

### Cali920

so ∫ du * u - (sin x /cos x)? What do I do with the du * u? I'm confused...

Thanks for the response! I appreciate it!

4. Apr 20, 2014

### Panphobia

it is ∫ u * du- ∫(sin x /cos x)dx and maybe you should learn the basics of integration before you even use substitution. The integral of x is (x^2)/2, so ∫ u * du = (u^2)/2.

5. Apr 20, 2014

### HallsofIvy

I presume it was a typo, but of course, "$\int tan^3(x) dx$" is NOT "$\int tan(x) dx+ \int tan(x) dx$".

Personally, I would have written this integral as $\int \frac{sin^3(x)}{cos^3(x)} dx$ and used the standard "odd power of sine or cosine" technique: factor out one of the sines to use with the dx:
$$\int \frac{sin^2(x)}{cos^3(x)} sin(x)dx= \int \frac{1- cos^2(x)}{cos^3(x)} (sin(x)dx)$$
and let u= cos(x), du= - sin(x)dx, to get
$$\int \frac{1- u^2}{u^3} (- du)= -\int (u^{-3}- u^{-1})du= \int (u^{-1}- u^{-3})du$$

6. Apr 20, 2014

### Staff: Mentor

Just to set the record straight, ∫tan3x dx ≠ ∫tan x dx + ∫tan2x dx
I think that's what HallsOfIvy was attempting to say, but omitted the exponent on the second integral.

7. Apr 20, 2014

### Zondrina

If you prefer:

$\int tan^3(x) dx = \int (sec^2(x) - 1) tanx dx = \int sec^2(x) tan(x) dx - \int tan(x) dx$

Both the latter integrals can be integrated quite easily. For the integral on the left, set $u = sec(x) \Rightarrow du = sec(x)tan(x)dx$.

8. Apr 20, 2014

### Panphobia

Yea, I assumed that was a typo since the rest of the work was correct.

9. Apr 20, 2014

### Cali920

AH! I didn't even realize I did that.

= ∫ tan x * ∫ tan2x
= ∫ tan x (sec2x - 1) dx
= ∫ (tan x sec2x) dx - ∫ (tan x) dx
u = tan x
du = sec2x dx

= ∫ u * du - ∫ u

Is this correct so far?

Or can you do two u substitutions?:
AH! I didn't even realize I did that.

= ∫ tan x * ∫ tan2x
= ∫ tan x (sec2x - 1) dx
= ∫ (tan x sec2x) dx - ∫ (tan x) dx
u = tan x & u = cos x
du = sec2x dx & du = -sin x dx?

Last edited: Apr 20, 2014
10. Apr 20, 2014

### Staff: Mentor

Right off the bat you have a mistake. ∫tan3(x)dx ≠ ∫ tan x dx * ∫ tan2x dx

The first integral looks OK, but not the second. It's missing the du factor. In addition, the same substitution you're using in the first integral won't work in the second.

11. Apr 20, 2014

### Zondrina

I believe the OP is confused about the integral operation commuting over multiplication.

$\int f(x) g(x) dx ≠ \int f(x) dx \int g(x) dx$

So for example $\int tan^3(x) dx = \int tan^2(x)tan(x) dx ≠ \int tan^2(x) dx \int tan(x) dx$

12. Apr 20, 2014

### lurflurf

you need sec(x)^2 as a factor

$$\tan^3(x)=\frac{\tan^3(x)}{\tan^2(x)+1}\sec^2(x)=\left( \tan(x) - \frac{\tan(x)}{\tan^2(x)+1} \right) \sec^2(x)$$

13. Apr 20, 2014

### Cali920

Oh okay. So then what can I do if I can't do ∫ tan x dx * ∫ tan2x dx?

14. Apr 20, 2014

### Zondrina

Look at post #7, I already gave you most of the work really.

Just note that $sec^2(x) - tan^2(x) = 1$. Much like $sin^2(x) + cos^2(x) = 1$. If you want to get your hands dirty, $csc^2(x) - cot^2(x) = 1$ can also be useful for these trig integrals.

15. Apr 20, 2014

### Cali920

I think I started off doing that originally then got stuck which is why I tried a different u substitution but ->(from my first post):

=∫tan x (sec2x - 1) dx

∫(tan x (sec2x - tan x) dx

∫tan x sec2x dx - ∫tan x dx

u = sec x
du = sec x tan x dx

∫tan x sec x sec x - ∫tan x dx

∫udu - ∫tan x dx ?

16. Apr 20, 2014

### Zondrina

Watch the second line there. You have an extra bracket you don't need.

So far that looks fine. I'm sure you can integrate udu, the second integral can be easily solved by letting $tan(x) = \frac{sin(x)}{cos(x)}$ and making a simple substitution.

17. Apr 20, 2014

### Staff: Mentor

Continue what you were doing earlier.
I've already replied about the first integral being OK, but the second one is not OK.

18. Apr 20, 2014

### Cali920

whoops! THANK YOU!

=∫tan x (sec2x - 1) dx

∫(tan x sec2x - tan x) dx

∫tan x sec2x dx - ∫tan x dx

u = sec x
du = sec x tan x dx

∫tan x sec x sec x - ∫tan x dx

∫udu - ∫tan x dx ?

= 1/2 u^2 + C -∫ (sin x / cos x) dx?

so u = cos x?

19. Apr 20, 2014

### Zondrina

While I'm sure you meant $sec^2(x)$ on those lines, you should make it explicit or someone might confuse it for $sec(2x)$.

Yes $u = cos(x)$ so that $-du = sin(x) dx$.

20. Apr 20, 2014

### Cali920

Just didn't copy and paste right. But thanks again! I really appreciate it.

=∫tan x (sec2x - 1) dx

∫(tan x sec2x - tan x) dx

∫tan x sec2x dx - ∫tan x dx

u = sec x
du = sec x tan x dx

∫tan x sec x sec x - ∫tan x dx

∫udu - ∫tan x dx ?

= u2/2 + C -∫ (sin x / cos x) dx

u = cos x
du = - sin x dx → - du = sin x dx

so then u2/2 + C + du/u?

Last edited: Apr 21, 2014