How to Integrate Tangent/Secant Problems with an Odd, Positive Power of Tangent
Here’s how you integrate a trig integral that contains tangents and secants where the tangent power is odd and positive. You’ll need the tangentsecant version of the Pythagorean identity:

Lop off a secanttangent factor and move it to the right.
First, rewrite the problem:

Convert the remaining (even) tangents to secants with the tangentsecant version of the Pythagorean identity.
Now make the switch.

Solve with the substitution method with u = sec(x) and du = sec(x) tan(x)dx.