Integrals of powers of secant ant tangent is a bit common calculus problem. Here I will summarize the techniques that we can used to solve this problem. First thing is the Pythagoras theorem $$1+\tan^2\theta=\sec^2\theta,$$ which we can used to interchange between them. Next we have few elementary integrals related to these two functions $$\displaystyle\int\sec^2\theta\,d\theta=\tan\theta,\qquad\qquad \displaystyle\int\sec\theta\tan\theta\,d\theta=\sec\theta,$$ and $$\displaystyle\int\tan\theta\,d\theta=\ln|\sec\theta|,\qquad\qquad \displaystyle\int\sec\theta\,d\theta=\ln|\sec\theta+\tan\theta|. $$
Now we are ready to attack the general question $\displaystyle\int\sec^m\theta\tan^n\theta\,d\theta.$
We can solve most of them using substitutions:
$$\begin{array}{|l|c|r |}
m & n & \text{substitution} \\
\hline
\text{even} & \text{odd} & x=\tan\theta,\,x=\sec\theta \\
\text{even} & \text{even} & x=\tan\theta \\
\text{odd} & \text{odd} & x=\sec\theta \\
\text{odd} & \text{even} & \text{None}
\end{array}
$$
The odd case "neither does secant have an even power nor does tangent have an odd power" type problems can be handle via integration by parts followed by applying Pythagoras theorem. Since this last case is very interesting, its second simplest problem even has a Wikipedia page.