Integrating Products and Powers of [latex]\tan{x}[/latex] and [latex]\sec{x}[/latex]
Before discussing the integration of products and powers of [latex]\tan{x}[/latex] and [latex]\sec{x}[/latex], it is useful to recall the integrals involving [latex]\tan{x}[/latex] and [latex]\sec{x}[/latex] we have already learned:
For most integrals of products and powers of [latex]\tan{x}[/latex] and [latex]\sec{x}[/latex], we rewrite the expression we wish to integrate as the sum or difference of integrals of the form [latex]{\displaystyle\int}{\tan}^{j}x{\sec}^{2}xdx[/latex] or [latex]{\displaystyle\int}{\sec}^{j}x\tan{x}dx[/latex]. As we see in the following example, we can evaluate these new integrals by using u-substitution. Before doing so, it is useful to note how the Pythagorean Identity implies relationships between other pairs of trigonometric functions.
For any angle [latex]x[/latex]:
[latex]\sin^2 x + \cos^2 x = 1[/latex]
Dividing the original equation by [latex]\cos^2 x[/latex] and simplifying yields an expression for [latex]\sec^2 x[/latex] in terms of [latex]\tan^2 x[/latex]:
[latex]\tan^2 x + 1 = \sec^2 x[/latex]
Subtracting both sides of the equation by [latex]1[/latex] yields an expression for [latex]\tan^2 x[/latex] in terms of [latex]\sec^2 x[/latex]:
If [latex]j[/latex] is even and [latex]j\ge 2[/latex], rewrite [latex]{\sec}^{j}x={\sec}^{j - 2}x{\sec}^{2}x[/latex] and use [latex]{\sec}^{2}x={\tan}^{2}x+1[/latex] to rewrite [latex]{\sec}^{j - 2}x[/latex] in terms of [latex]\tan{x}[/latex]. Let [latex]u=\tan{x}[/latex] and [latex]du={\sec}^{2}x[/latex].
If [latex]k[/latex] is odd and [latex]j\ge 1[/latex], rewrite [latex]{\tan}^{k}x{\sec}^{j}x={\tan}^{k - 1}x{\sec}^{j - 1}x\sec{x}\tan{x}[/latex] and use [latex]{\tan}^{2}x={\sec}^{2}x - 1[/latex] to rewrite [latex]{\tan}^{k - 1}x[/latex] in terms of [latex]\sec{x}[/latex]. Let [latex]u=\sec{x}[/latex] and [latex]du=\sec{x}\tan{x}dx[/latex]. (Note: If [latex]j[/latex] is even and [latex]k[/latex] is odd, then either strategy 1 or strategy 2 may be used.)
If [latex]k[/latex] is odd where [latex]k\ge 3[/latex] and [latex]j=0[/latex], rewrite [latex]{\tan}^{k}x={\tan}^{k - 2}x{\tan}^{2}x={\tan}^{k - 2}x\left({\sec}^{2}x - 1\right)={\tan}^{k - 2}x{\sec}^{2}x-{\tan}^{k - 2}x[/latex]. It may be necessary to repeat this process on the [latex]{\tan}^{k - 2}x[/latex] term.
If [latex]k[/latex] is even and [latex]j[/latex] is odd, then use [latex]{\tan}^{2}x={\sec}^{2}x - 1[/latex] to express [latex]{\tan}^{k}x[/latex] in terms of [latex]\sec{x}[/latex]. Use integration by parts to integrate odd powers of [latex]\sec{x}[/latex].
Since the power on [latex]\sec{x}[/latex] is even, rewrite [latex]{\sec}^{4}x={\sec}^{2}x{\sec}^{2}x[/latex] and use [latex]{\sec}^{2}x={\tan}^{2}x+1[/latex] to rewrite the first [latex]{\sec}^{2}x[/latex] in terms of [latex]\tan{x}[/latex]. Thus,
This integral requires integration by parts. To begin, let [latex]u=\sec{x}[/latex] and [latex]dv={\sec}^{2}x[/latex]. These choices make [latex]du=\sec{x}\tan{x}[/latex] and [latex]v=\tan{x}[/latex]. Thus,
Since the integral [latex]{\displaystyle\int}{\sec}^{3}xdx[/latex] has reappeared on the right-hand side, we can solve for [latex]{\displaystyle\int}{\sec}^{3}xdx[/latex] by adding it to both sides. In doing so, we obtain