Here’s how you integrate a trig integral that contains tangents (and no secant factors) where the tangent power is even and positive.

1. Convert one tan-squared (x) factor to secants by using the Pythagorean identity.

2. Distribute and split up the integral.

3. Solve the first integral using substitution, where u = tan(x) and du=sec2(x)dx.

4. For the second integral, repeat the process shown in Steps 1 and 2 above.

For this piece of the problem, you get

5. For the first integral immediately above, repeat Step 3.

6. For the second integral from Step 4, use the Pythagorean identity to convert the

into

Both of these integrals can be done with simple reverse differentiation rules.

After collecting all these pieces — piece 1 from Step 3, piece 2 from Step 5, and pieces 3 and 4 from Step 6 — your final answer should be

Piece of cake.