# How do you integrate int tan^5(x/4)?

Mar 7, 2017

Given $\int {\tan}^{5} \left(\frac{x}{4}\right) \mathrm{dx}$

Begin with a substitution for $\frac{x}{4}$:

$u = \frac{x}{4} \implies \mathrm{du} = \frac{1}{4} \mathrm{dx} \implies 4 \mathrm{du} = \mathrm{dx}$

We now have:

$4 \int {\tan}^{5} \left(u\right) \mathrm{du}$

Break up ${\tan}^{5} \left(u\right)$:

$4 \int {\tan}^{2} \left(u\right) \cdot {\tan}^{3} \left(u\right) \mathrm{du}$

Use the trigonometric identity ${\tan}^{2} \left(\theta\right) = {\sec}^{2} \left(\theta\right) - 1$:

$4 \int \left({\sec}^{2} \left(u\right) - 1\right) {\tan}^{3} \left(u\right) \mathrm{du}$

Distribute ${\tan}^{3}$:

$4 \int {\sec}^{2} \left(u\right) {\tan}^{3} \left(u\right) - {\tan}^{3} \left(u\right) \mathrm{du}$

Split the integral:

$4 \int {\sec}^{2} \left(u\right) {\tan}^{3} \left(u\right) \mathrm{du} - 4 \int {\tan}^{3} \left(u\right) \mathrm{du}$

For the LH integral, we can perform a substitution:

$z = \tan \left(u\right) \implies \mathrm{dz} = {\sec}^{2} \left(u\right) \mathrm{du}$

$4 \int {\sec}^{2} \left(u\right) {\tan}^{3} \left(u\right) \mathrm{du} \implies 4 \int {z}^{3} \mathrm{dz}$

This is basic integral. We will now move on to the RHS.

$4 \int {\tan}^{3} \left(u\right) \mathrm{du}$

Break up ${\tan}^{3} \left(u\right)$:

$4 \int {\tan}^{2} \left(u\right) \cdot \tan \left(u\right) \mathrm{du}$

Apply trigonometric identity ${\tan}^{2} \left(\theta\right) = {\sec}^{2} \left(\theta\right) - 1$:

$4 \int \left({\sec}^{2} \left(u\right) - 1\right) \tan \left(u\right) \mathrm{du}$

Distribute $\tan \left(u\right)$:

$4 \int {\sec}^{2} \left(u\right) \tan \left(u\right) - \tan \left(u\right) \mathrm{du}$

Split the integral:

$4 \int {\sec}^{2} \left(u\right) \tan \left(u\right) \mathrm{du} - 4 \int \tan \left(u\right) \mathrm{du}$

For the LH integral, a substitution:

$r = \tan \left(u\right) \implies \mathrm{dr} = {\sec}^{2} \left(u\right) \mathrm{du}$

$4 \int {\sec}^{2} \left(u\right) \tan \left(u\right) \mathrm{du} = 4 \int r \mathrm{dr}$

This is a basic integral, as is $4 \int \tan \left(u\right) \mathrm{du}$.

We have:

$4 \int {z}^{3} \mathrm{dz} - \left[4 \int r \mathrm{dr} - 4 \int \tan \left(u\right) \mathrm{du}\right]$

We integrate, then substitute back in for all of the variables.

$4 \left(\frac{1}{4} {z}^{4}\right) - \left[4 \left(\frac{1}{2} {r}^{2}\right) - 4 \ln | \sec \left(u\right) |\right] + C$

$\implies {\tan}^{4} \left(u\right) - 2 {\tan}^{u} + 4 \ln | \sec \left(u\right) | + C$

$\implies {\tan}^{4} \left(\frac{x}{4}\right) - 2 {\tan}^{2} \left(\frac{x}{4}\right) + 4 \ln | \sec \left(\frac{x}{4}\right) | + C$