what's integration of (tanx)^5?

Let's define

I_{n} = Integral of tan^n(x)dx

You can express I_{n} in terms of
I_{n-2} as follows. We write the integrand as:

tan^n(x) = sin^n(x)/cos^n(x)

Take out a factor sin^2(x):

tan^n(x) = sin^2(x)sin^(n-2)/cos^n(x)

And then substitute:

sin^2(x) = 1 - cos^2(x)

tan^n(x) = sin^(n-2)/cos^n(x) -
sin^(n-2)/cos^(n-2)(x)

So, we have:

I_{n} = - I{n-2} +

Integral of sin^(n-2)/cos^n(x) dx

We can compute the integral in this expression as follows. The integrand can be written as:

sin^(n-2)/cos^n(x) =

1/cos^2(x) tan^(n-2)(x)

So the integral is:

Integral of 1/cos^2(x)tan^(n-2)(x)dx =

Integral tan^(n-2) dtan(x) =

1/(n-1) tan^(n-1)(x)

The formula is thus:

I_{n} = - I{n-2} + 1/(n-1) tan^(n-1)(x)

This is valid for n > 1. For n = 1, we have:

I_{1} = Integral of tan(x) dx =

- Log|cos(x)|

Using the above formula you get for
n = 5:

I_{5} = - I_{3} + 1/4 tan^(4)(x)

For n = 3 you get:

I_{3} = -I_{1} + 1/2 tan^2(x) =

Log|cos(x)| + 1/2 tan^2(x)

So you get the result:

I_{5} = -Log|cos(x)| - 1/2 tan^2(x)+ 1/4 tan^(4)(x)