Skip to content

Special Substitutions II: Powers of Trigonometric Functions

In our study of substitution, we observed how trigonometric identities simplify algebraic radicals.

Equally important is the reverse challenge: how to evaluate integrals consisting entirely of powers and products of trigonometric functions:

\[\int \sin^m x \cos^n x\,dx, \qquad \int \tan^m x \sec^n x\,dx, \qquad \int \cot^m x \csc^n x\,dx\]

Such integrals occur repeatedly throughout calculus. They arise not only as standalone problems, but very frequently as the culmination of earlier algebraic, trigonometric, or geometric substitutions (such as setting \(x = a\sin\theta\) or \(x = a\tan\theta\)).

The method of evaluation is dictated systematically by the parity (odd or even nature) of the exponents and their algebraic sum.


Powers of Sine and Cosine

We begin with single trigonometric powers:

\[\int \sin^n x\,dx \qquad \text{and} \qquad \int \cos^n x\,dx\]

Case 1: The Exponent is Odd

When \(n = 2k + 1\) is an odd positive integer, we peel off one factor of \(\sin x\) (or \(\cos x\)) to serve as the differential. The remaining even power is then converted using the fundamental identity \(\sin^2 x + \cos^2 x = 1\).

For \(\int \sin^{2k+1} x\,dx\):

\[\int \sin^{2k+1} x\,dx = \int (\sin^2 x)^k \sin x\,dx = \int (1 - \cos^2 x)^k \sin x\,dx\]

Letting \(t = \cos x \implies dt = -\sin x\,dx\), the integrand transforms into a simple polynomial in \(t\).

Similarly, for \(\int \cos^{2k+1} x\,dx\):

\[\int \cos^{2k+1} x\,dx = \int (\cos^2 x)^k \cos x\,dx = \int (1 - \sin^2 x)^k \cos x\,dx\]

Letting \(t = \sin x \implies dt = \cos x\,dx\), the integral again reduces directly to a polynomial.


Example 1

Evaluate:

\[I = \int \sin^3 x\,dx\]

Solution:

Peel off one factor of \(\sin x\):

\[I = \int \sin^2 x \sin x\,dx = \int (1 - \cos^2 x)\sin x\,dx\]

Let:

\[t = \cos x \implies dt = -\sin x\,dx \implies \sin x\,dx = -dt\]

Substitute into the integral:

\[I = \int (1 - t^2)(-dt) = \int (t^2 - 1)\,dt\]
\[I = \frac{t^3}{3} - t + C\]

Returning to \(x\):

\[I = \frac{\cos^3 x}{3} - \cos x + C\]

Example 2

Evaluate:

\[I = \int \cos^5 x\,dx\]

Solution:

Separate one factor of \(\cos x\):

\[I = \int \cos^4 x \cos x\,dx = \int (\cos^2 x)^2 \cos x\,dx = \int (1 - \sin^2 x)^2 \cos x\,dx\]

Let:

\[t = \sin x \implies dt = \cos x\,dx\]

Substitute into the integral:

\[I = \int (1 - t^2)^2\,dt = \int (1 - 2t^2 + t^4)\,dt\]

Integrating term by term:

\[I = t - \frac{2t^3}{3} + \frac{t^5}{5} + C\]

Returning to \(x\):

\[I = \sin x - \frac{2\sin^3 x}{3} + \frac{\sin^5 x}{5} + C\]

Case 2: The Exponent is Even

When \(n = 2k\) is an even positive integer, the substitution method fails: stripping off one factor leaves an odd power that cannot be expressed as a polynomial without square roots.

Instead, we convert even powers into linear multiple-angle terms using the half-angle reduction identities:

\[\sin^2 x = \frac{1 - \cos 2x}{2}, \qquad \cos^2 x = \frac{1 + \cos 2x}{2}\]

Any resulting even powers of \(\cos 2x\) are reduced again by reapplying the formula with doubled arguments, such as:

\[\cos^2 2x = \frac{1 + \cos 4x}{2}\]

Example 3

Evaluate:

\[I = \int \cos^2 x\,dx\]

Solution:

Apply the half-angle reduction formula:

\[\cos^2 x = \frac{1 + \cos 2x}{2}\]

Substitute into the integral:

\[I = \int \frac{1 + \cos 2x}{2}\,dx = \frac{1}{2}\int 1\,dx + \frac{1}{2}\int \cos 2x\,dx\]
\[I = \frac{x}{2} + \frac{\sin 2x}{4} + C\]

Example 4

Evaluate:

\[I = \int \sin^4 x\,dx\]

Solution:

Express \(\sin^4 x\) as the square of \(\sin^2 x\):

\[\sin^4 x = (\sin^2 x)^2 = \left( \frac{1 - \cos 2x}{2} \right)^2\]

Expand the numerator:

\[\sin^4 x = \frac{1 - 2\cos 2x + \cos^2 2x}{4}\]

Reduce the remaining quadratic term \(\cos^2 2x\):

\[\cos^2 2x = \frac{1 + \cos 4x}{2}\]

Substitute this back:

\[\sin^4 x = \frac{1}{4} \left( 1 - 2\cos 2x + \frac{1 + \cos 4x}{2} \right) = \frac{1}{4} \left( \frac{3}{2} - 2\cos 2x + \frac{\cos 4x}{2} \right)\]
\[\sin^4 x = \frac{3}{8} - \frac{1}{2}\cos 2x + \frac{1}{8}\cos 4x\]

Now integrate term by term:

\[I = \int \left( \frac{3}{8} - \frac{1}{2}\cos 2x + \frac{1}{8}\cos 4x \right) dx\]
\[I = \frac{3x}{8} - \frac{\sin 2x}{4} + \frac{\sin 4x}{32} + C\]

Products of Powers of Sine and Cosine

We now turn to the general product:

\[I = \int \sin^m x \cos^n x\,dx\]

The choice of method depends on whether \(m\) and \(n\) are odd or even.


Case A: At Least One Exponent is Odd

If either exponent is an odd positive integer, we use substitution.

Subcase 1: The power of \(\sin x\) is odd (\(m = 2k + 1\))

Peel off \(\sin x\,dx\) to form the differential, convert the remaining even power of sine to cosine using \(\sin^2 x = 1 - \cos^2 x\), and substitute:

\[t = \cos x \implies dt = -\sin x\,dx\]

Subcase 2: The power of \(\cos x\) is odd (\(n = 2k + 1\))

Peel off \(\cos x\,dx\) to form the differential, convert the remaining even power of cosine to sine using \(\cos^2 x = 1 - \sin^2 x\), and substitute:

\[t = \sin x \implies dt = \cos x\,dx\]

Subcase 3: Both exponents are odd

Either substitution works. In practice, choose to peel off the factor with the smaller exponent to minimize the degree of the binomial expansion.


Example 5

Evaluate:

\[I = \int \sin^3 x \cos^2 x\,dx\]

Solution:

Here the power of \(\sin x\) is odd (\(m = 3\)). Separate one factor of \(\sin x\):

\[I = \int \sin^2 x \cos^2 x \sin x\,dx = \int (1 - \cos^2 x)\cos^2 x \sin x\,dx\]

Let:

\[t = \cos x \implies dt = -\sin x\,dx \implies \sin x\,dx = -dt\]

Substitute into the integral:

\[I = \int (1 - t^2)t^2 (-dt) = \int (t^4 - t^2)\,dt\]

Integrating gives:

\[I = \frac{t^5}{5} - \frac{t^3}{3} + C\]

Returning to \(x\):

\[I = \frac{\cos^5 x}{5} - \frac{\cos^3 x}{3} + C\]

Example 6

Evaluate:

\[I = \int \sin^3 x \cos^5 x\,dx\]

Solution:

Both exponents are odd (\(m = 3\) and \(n = 5\)). We peel off the smaller power (\(\sin x\)):

\[I = \int \sin^2 x \cos^5 x \sin x\,dx = \int (1 - \cos^2 x)\cos^5 x \sin x\,dx\]

Let:

\[t = \cos x \implies dt = -\sin x\,dx\]

Substitute into the integral:

\[I = -\int (1 - t^2)t^5\,dt = \int (t^7 - t^5)\,dt\]
\[I = \frac{t^8}{8} - \frac{t^6}{6} + C\]

Returning to \(x\):

\[I = \frac{\cos^8 x}{8} - \frac{\cos^6 x}{6} + C\]

Case B: Both Exponents are Even Non-Negative Integers

When both \(m\) and \(n\) are even non-negative integers (\(m = 2p, n = 2q\)), neither function can provide a single odd factor for substitution.

We must convert both terms to multiple angles using:

\[\sin^2 x = \frac{1 - \cos 2x}{2}, \qquad \cos^2 x = \frac{1 + \cos 2x}{2}, \qquad \sin x\cos x = \frac{\sin 2x}{2}\]

Grouping factors into \((\sin x\cos x)\) whenever possible drastically reduces the required algebra.


Example 7

Evaluate:

\[I = \int \sin^2 x \cos^2 x\,dx\]

Solution:

Group the factors using the double-angle identity:

\[\sin x\cos x = \frac{\sin 2x}{2} \implies \sin^2 x\cos^2 x = \frac{\sin^2 2x}{4}\]

Now apply the half-angle identity to \(\sin^2 2x\):

\[\sin^2 2x = \frac{1 - \cos 4x}{2}\]

The integrand becomes:

\[\sin^2 x\cos^2 x = \frac{1}{4} \cdot \frac{1 - \cos 4x}{2} = \frac{1}{8}(1 - \cos 4x)\]

Integrating directly:

\[I = \frac{1}{8}\int (1 - \cos 4x)\,dx\]
\[I = \frac{1}{8}\left( x - \frac{\sin 4x}{4} \right) + C = \frac{x}{8} - \frac{\sin 4x}{32} + C\]

Example 8

Evaluate:

\[I = \int \sin^4 x \cos^2 x\,dx\]

Solution:

Factor out \((\sin x\cos x)^2\):

\[\sin^4 x \cos^2 x = \sin^2 x (\sin x\cos x)^2 = \sin^2 x \left(\frac{\sin 2x}{2}\right)^2 = \frac{1}{4}\sin^2 x \sin^2 2x\]

Convert \(\sin^2 x\) using the half-angle formula:

\[\frac{1}{4} \left( \frac{1 - \cos 2x}{2} \right) \sin^2 2x = \frac{1}{8}\sin^2 2x - \frac{1}{8}\sin^2 2x \cos 2x\]

Split into two separate integrals:

\[I = \frac{1}{8}\int \sin^2 2x\,dx - \frac{1}{8}\int \sin^2 2x \cos 2x\,dx\]

For the first integral:

\[\frac{1}{8}\int \sin^2 2x\,dx = \frac{1}{8}\int \frac{1 - \cos 4x}{2}\,dx = \frac{1}{16}\left( x - \frac{\sin 4x}{4} \right)\]

For the second integral, the factor \(\cos 2x\,dx\) is the differential of \(\sin 2x\):

\[\frac{1}{8}\int \sin^2 2x \cos 2x\,dx = \frac{1}{16}\int \sin^2 2x (2\cos 2x\,dx) = \frac{1}{16} \cdot \frac{\sin^3 2x}{3} = \frac{\sin^3 2x}{48}\]

Combining both results:

\[I = \frac{x}{16} - \frac{\sin 4x}{64} - \frac{\sin^3 2x}{48} + C\]

The Negative Even Exponent Sum Condition

A particularly important class of integrals occurs when the exponents \(m\) and \(n\) satisfy:

\[m + n = -2k \qquad (k \in \mathbb{N})\]

That is, the sum of the exponents of \(\sin x\) and \(\cos x\) is a negative even integer (such as \(-2, -4, -6\)).

Such integrals typically appear when powers of sine and cosine are in the denominator, or as the result of earlier substitutions in fractional and radical problems.

The Tangent Transformation

When \(m + n\) is a negative even integer, we can transform the entire integral into a rational algebraic expression in \(\tan x\):

  1. Factor out \(\cos^{m+n} x\) from the integrand, or equivalently divide the numerator and denominator by \(\cos^{|m+n|} x\).
  2. Because \(|m+n|\) is an even positive integer (\(2, 4, 6, \dots\)), at least one factor of \(\sec^2 x\,dx\) is produced to serve as the differential \(d(\tan x)\).
  3. Any additional even powers of secant are converted to tangents using \(\sec^2 x = 1 + \tan^2 x\).
  4. Substitute:
\[t = \tan x \implies dt = \sec^2 x\,dx\]

(Note: Alternatively, if powers of \(\cot x\) and \(\csc^2 x\) are preferred, one may divide by \(\sin^{|m+n|} x\) and substitute \(t = \cot x\).)


Example 9

Evaluate:

\[I = \int \frac{dx}{\sin x \cos^3 x}\]

Solution:

In power notation, the integrand is:

\[\sin^{-1} x \cos^{-3} x\]

Here \(m = -1\) and \(n = -3\), giving:

\[m + n = -1 + (-3) = -4\]

Since the sum is a negative even integer, divide the numerator and denominator by \(\cos^4 x\):

\[\frac{dx}{\sin x \cos^3 x} = \frac{\frac{dx}{\cos^4 x}}{\frac{\sin x \cos^3 x}{\cos^4 x}} = \frac{\sec^4 x\,dx}{\tan x} = \frac{(1 + \tan^2 x)\sec^2 x\,dx}{\tan x}\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int \frac{1 + t^2}{t}\,dt = \int \left( \frac{1}{t} + t \right) dt\]
\[I = \ln|t| + \frac{t^2}{2} + C\]

Returning to \(x\):

\[I = \ln|\tan x| + \frac{1}{2}\tan^2 x + C\]

Example 10

Evaluate:

\[I = \int \frac{\sin^2 x}{\cos^6 x}\,dx\]

Solution:

Here \(m = 2\) and \(n = -6\), so:

\[m + n = 2 + (-6) = -4\]

Decompose the denominator into \(\cos^2 x \cdot \cos^4 x\):

\[\frac{\sin^2 x}{\cos^6 x} = \left( \frac{\sin^2 x}{\cos^2 x} \right) \frac{1}{\cos^4 x} = \tan^2 x \sec^4 x = \tan^2 x (1 + \tan^2 x)\sec^2 x\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int t^2(1 + t^2)\,dt = \int (t^2 + t^4)\,dt\]
\[I = \frac{t^3}{3} + \frac{t^5}{5} + C\]

Returning to \(x\):

\[I = \frac{\tan^3 x}{3} + \frac{\tan^5 x}{5} + C\]

Example 11

Evaluate:

\[I = \int \frac{dx}{\sin^2 x \cos^4 x}\]

Solution:

Here \(m = -2\) and \(n = -4\), so \(m + n = -6\).

Divide numerator and denominator by \(\cos^6 x\):

\[\frac{dx}{\sin^2 x \cos^4 x} = \frac{\sec^6 x\,dx}{\left(\frac{\sin^2 x}{\cos^2 x}\right)} = \frac{\sec^4 x \sec^2 x\,dx}{\tan^2 x} = \frac{(1 + \tan^2 x)^2 \sec^2 x\,dx}{\tan^2 x}\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int \frac{(1 + t^2)^2}{t^2}\,dt = \int \frac{1 + 2t^2 + t^4}{t^2}\,dt\]

Split into separate terms:

\[I = \int (t^{-2} + 2 + t^2)\,dt = -\frac{1}{t} + 2t + \frac{t^3}{3} + C\]

Returning to \(x\):

\[I = -\cot x + 2\tan x + \frac{\tan^3 x}{3} + C\]

Example 12

Evaluate:

\[I = \int \frac{dx}{\sin^{3/4} x \cos^{5/4} x}\]

Solution:

Here the exponents are fractional: \(m = -3/4\) and \(n = -5/4\).

Summing the exponents:

\[m + n = -\frac{3}{4} - \frac{5}{4} = -\frac{8}{4} = -2\]

Because \(m + n = -2\) is a negative even integer, the tangent substitution applies directly.

Divide numerator and denominator by \(\cos^2 x\):

\[\frac{dx}{\sin^{3/4} x \cos^{5/4} x} = \frac{\frac{dx}{\cos^2 x}}{\frac{\sin^{3/4} x \cos^{5/4} x}{\cos^2 x}} = \frac{\sec^2 x\,dx}{\frac{\sin^{3/4} x}{\cos^{3/4} x}} = \frac{\sec^2 x\,dx}{\tan^{3/4} x}\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int t^{-3/4}\,dt = \frac{t^{1/4}}{1/4} + C = 4t^{1/4} + C\]

Returning to \(x\):

\[I = 4(\tan x)^{1/4} + C\]

Powers of Tangent and Cotangent

Integrals of pure powers of tangent and cotangent follow a direct algebraic reduction based on the Pythagorean identity:

\[\tan^2 x = \sec^2 x - 1, \qquad \cot^2 x = \csc^2 x - 1\]

Factoring out \(\tan^2 x\) gives:

\[\tan^n x = \tan^{n-2} x \cdot \tan^2 x = \tan^{n-2} x (\sec^2 x - 1) = \tan^{n-2} x \sec^2 x - \tan^{n-2} x\]

The first term integrates immediately because \(\sec^2 x\,dx = d(\tan x)\):

\[\int \tan^{n-2} x \sec^2 x\,dx = \frac{\tan^{n-1} x}{n - 1}\]

The remaining term \(-\int \tan^{n-2} x\,dx\) has its power reduced by \(2\). Repeating this reduction eventually terminates in either \(\int 1\,dx = x\) (when \(n\) is even) or \(\int \tan x\,dx = \ln|\sec x| + C\) (when \(n\) is odd).

The exact same logic applies to \(\cot^n x\).


Example 13

Evaluate:

\[I = \int \tan^3 x\,dx\]

Solution:

Separate a factor of \(\tan^2 x\):

\[\tan^3 x = \tan x \cdot \tan^2 x = \tan x (\sec^2 x - 1) = \tan x \sec^2 x - \tan x\]

Integrating both terms:

\[I = \int \tan x \sec^2 x\,dx - \int \tan x\,dx\]

In the first integral, let \(t = \tan x \implies dt = \sec^2 x\,dx\):

\[\int \tan x \sec^2 x\,dx = \frac{\tan^2 x}{2}\]

The second integral is standard: \(\int \tan x\,dx = \ln|\sec x|\).

Therefore:

\[I = \frac{\tan^2 x}{2} - \ln|\sec x| + C\]

Example 14

Evaluate:

\[I = \int \tan^4 x\,dx\]

Solution:

Peel off \(\tan^2 x\):

\[\tan^4 x = \tan^2 x (\sec^2 x - 1) = \tan^2 x \sec^2 x - \tan^2 x\]

Express the remaining \(\tan^2 x\) again as \(\sec^2 x - 1\):

\[\tan^4 x = \tan^2 x \sec^2 x - (\sec^2 x - 1) = \tan^2 x \sec^2 x - \sec^2 x + 1\]

Now integrate term by term:

\[I = \int \tan^2 x \sec^2 x\,dx - \int \sec^2 x\,dx + \int 1\,dx\]
\[I = \frac{\tan^3 x}{3} - \tan x + x + C\]

Example 15

Evaluate:

\[I = \int \cot^4 x\,dx\]

Solution:

Apply the cotangent identity \(\cot^2 x = \csc^2 x - 1\):

\[\cot^4 x = \cot^2 x (\csc^2 x - 1) = \cot^2 x \csc^2 x - \cot^2 x = \cot^2 x \csc^2 x - (\csc^2 x - 1)\]
\[\cot^4 x = \cot^2 x \csc^2 x - \csc^2 x + 1\]

Recall that \(\frac{d}{dx}(\cot x) = -\csc^2 x\):

\[I = -\int \cot^2 x (-\csc^2 x\,dx) - \int \csc^2 x\,dx + \int 1\,dx\]
\[I = -\frac{\cot^3 x}{3} - (-\cot x) + x + C\]
\[I = -\frac{\cot^3 x}{3} + \cot x + x + C\]

Powers of Secant and Cosecant

When integrating \(\int \sec^n x\,dx\) or \(\int \csc^n x\,dx\), the behavior splits sharply between even and odd exponents.

Case 1: Even Powers of Secant

When the exponent is an even integer \(n \ge 2\), peel off \(\sec^2 x\,dx\) to serve as the differential \(dt\), and rewrite the remaining even power \(\sec^{2k-2} x\) using \(\sec^2 x = 1 + \tan^2 x\):

\[\int \sec^{2k} x\,dx = \int (\sec^2 x)^{k-1} \sec^2 x\,dx = \int (1 + \tan^2 x)^{k-1} \sec^2 x\,dx\]

Letting \(t = \tan x \implies dt = \sec^2 x\,dx\), the integral becomes a polynomial in \(t\).


Example 16

Evaluate:

\[I = \int \sec^4 x\,dx\]

Solution:

Separate \(\sec^2 x\):

\[\sec^4 x = \sec^2 x \cdot \sec^2 x = (1 + \tan^2 x)\sec^2 x\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int (1 + t^2)\,dt = t + \frac{t^3}{3} + C\]

Returning to \(x\):

\[I = \tan x + \frac{\tan^3 x}{3} + C\]

Case 2: Odd Powers of Secant and Cosecant

When the power is odd, substitution does not work directly. As seen in our study of integration by parts, odd powers must be evaluated using integration by parts by writing:

\[\sec^{2k+1} x = \sec^{2k-1} x \cdot \sec^2 x\]

and setting \(\text{I} = \sec^{2k-1} x\) and \(\text{II} = \sec^2 x\).


Example 17

Evaluate:

\[I = \int \csc^3 x\,dx\]

Solution:

Decompose the integrand as:

\[I = \int \csc x \cdot \csc^2 x\,dx\]

Apply integration by parts:

\[\text{I} = \csc x \implies \frac{d}{dx}(\csc x) = -\csc x \cot x\]
\[\text{II} = \csc^2 x \implies \int \csc^2 x\,dx = -\cot x\]

Applying the product formula:

\[I = -\csc x \cot x - \int (-\csc x \cot x)(-\cot x)\,dx = -\csc x \cot x - \int \csc x \cot^2 x\,dx\]

Use \(\cot^2 x = \csc^2 x - 1\):

\[I = -\csc x \cot x - \int \csc x(\csc^2 x - 1)\,dx = -\csc x \cot x - \int \csc^3 x\,dx + \int \csc x\,dx\]

Notice that \(\int \csc^3 x\,dx = I\):

\[I = -\csc x \cot x - I + \ln|\csc x - \cot x|\]

Add \(I\) to both sides:

\[2I = -\csc x \cot x + \ln|\csc x - \cot x|\]
\[I = -\frac{1}{2}\csc x \cot x + \frac{1}{2}\ln|\csc x - \cot x| + C\]

Products of Tangent and Secant

We now examine products of the form:

\[\int \tan^m x \sec^n x\,dx\]

The strategy is organized around which differential is readily formed:

\[\sec^2 x\,dx = d(\tan x) \qquad \text{or} \qquad \sec x \tan x\,dx = d(\sec x)\]

Case 1: The Exponent of Secant is Even

Peel off \(\sec^2 x\,dx\) to serve as the differential. Convert the remaining even power \(\sec^{n-2} x = (1 + \tan^2 x)^{(n-2)/2}\) to tangents, and substitute:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

This method works regardless of whether \(m\) is even, odd, or fractional.


Example 18

Evaluate:

\[I = \int \tan^3 x \sec^4 x\,dx\]

Solution:

The power of secant is even (\(n = 4\)). Separate \(\sec^2 x\,dx\):

\[I = \int \tan^3 x \sec^2 x (\sec^2 x\,dx) = \int \tan^3 x (1 + \tan^2 x)\sec^2 x\,dx\]

Let:

\[t = \tan x \implies dt = \sec^2 x\,dx\]

Substitute into the integral:

\[I = \int t^3 (1 + t^2)\,dt = \int (t^3 + t^5)\,dt\]
\[I = \frac{t^4}{4} + \frac{t^6}{6} + C\]

Returning to \(x\):

\[I = \frac{\tan^4 x}{4} + \frac{\tan^6 x}{6} + C\]

(Note: Because the power of tangent is also odd, one could alternatively peel off \(\sec x\tan x\,dx\) and substitute \(t = \sec x\). The resulting antiderivative \(\frac{\sec^6 x}{6} - \frac{\sec^4 x}{4} + C_1\) differs from this one by a purely numerical constant.)


Case 2: The Exponent of Tangent is Odd

Peel off \(\sec x \tan x\,dx\) to serve as the differential. Convert the remaining even power \(\tan^{m-1} x = (\sec^2 x - 1)^{(m-1)/2}\) to secants, and substitute:

\[t = \sec x \implies dt = \sec x \tan x\,dx\]

Example 19

Evaluate:

\[I = \int \tan^5 x \sec^3 x\,dx\]

Solution:

Here the power of tangent is odd (\(m = 5\)) and \(n \ge 1\). Separate \(\sec x \tan x\,dx\):

\[I = \int \tan^4 x \sec^2 x (\sec x \tan x\,dx) = \int (\sec^2 x - 1)^2 \sec^2 x (\sec x \tan x\,dx)\]

Let:

\[t = \sec x \implies dt = \sec x \tan x\,dx\]

Substitute into the integral:

\[I = \int (t^2 - 1)^2 t^2\,dt = \int (t^4 - 2t^2 + 1)t^2\,dt = \int (t^6 - 2t^4 + t^2)\,dt\]

Integrating term by term:

\[I = \frac{t^7}{7} - \frac{2t^5}{5} + \frac{t^3}{3} + C\]

Returning to \(x\):

\[I = \frac{\sec^7 x}{7} - \frac{2\sec^5 x}{5} + \frac{\sec^3 x}{3} + C\]

Case 3: Tangent is Even and Secant is Odd

If the power of tangent is even and the power of secant is odd (\(m = 2p, n = 2q + 1\)), neither substitution works directly: peeling off \(\sec^2 x\) leaves an odd power of secant (which cannot be expressed in terms of tangent without a radical), while peeling off \(\sec x\tan x\) leaves an odd power of tangent (which cannot be expressed in terms of secant without a radical).

The standard method is to convert all tangents into secants using \(\tan^2 x = \sec^2 x - 1\). The integrand expands into a sum of odd powers of secant, which are integrated by parts.


Example 20

Evaluate:

\[I = \int \tan^2 x \sec x\,dx\]

Solution:

Convert \(\tan^2 x\) to secants:

\[\tan^2 x \sec x = (\sec^2 x - 1)\sec x = \sec^3 x - \sec x\]

Split into two integrals:

\[I = \int \sec^3 x\,dx - \int \sec x\,dx\]

From our work on cyclic integrals in integration by parts:

\[\int \sec^3 x\,dx = \frac{1}{2}\sec x \tan x + \frac{1}{2}\ln|\sec x + \tan x|\]

The second integral is standard: \(\int \sec x\,dx = \ln|\sec x + \tan x|\).

Subtracting the two results:

\[I = \left( \frac{1}{2}\sec x \tan x + \frac{1}{2}\ln|\sec x + \tan x| \right) - \ln|\sec x + \tan x| + C\]
\[I = \frac{1}{2}\sec x \tan x - \frac{1}{2}\ln|\sec x + \tan x| + C\]

Interchanging Between Systems

When products or quotients of \(\tan x\), \(\sec x\), \(\cot x\), or \(\csc x\) appear confusing, fractional, or unbalanced, converting the entire expression into sines and cosines often clears away the complexity immediately:

\[\tan x = \frac{\sin x}{\cos x}, \qquad \cot x = \frac{\cos x}{\sin x}, \qquad \sec x = \frac{1}{\cos x}, \qquad \csc x = \frac{1}{\sin x}\]

Example 21

Evaluate:

\[I = \int \frac{\sec x}{\tan^2 x}\,dx\]

Solution:

Convert directly into sines and cosines:

\[\frac{\sec x}{\tan^2 x} = \frac{\frac{1}{\cos x}}{\frac{\sin^2 x}{\cos^2 x}} = \frac{1}{\cos x} \cdot \frac{\cos^2 x}{\sin^2 x} = \frac{\cos x}{\sin^2 x}\]

Now the numerator is the derivative of \(\sin x\).

Let:

\[t = \sin x \implies dt = \cos x\,dx\]

Substitute into the integral:

\[I = \int \frac{dt}{t^2} = -\frac{1}{t} + C\]

Returning to \(x\):

\[I = -\frac{1}{\sin x} + C = -\csc x + C\]

Example 22

Evaluate:

\[I = \int \frac{dx}{\tan x + \cot x}\]

Solution:

Convert the denominator into sines and cosines:

\[\tan x + \cot x = \frac{\sin x}{\cos x} + \frac{\cos x}{\sin x} = \frac{\sin^2 x + \cos^2 x}{\sin x\cos x} = \frac{1}{\sin x\cos x}\]

The reciprocal inverts:

\[I = \int \sin x\cos x\,dx = \frac{1}{2}\int \sin 2x\,dx\]
\[I = -\frac{1}{4}\cos 2x + C\]

The Artifice of Inserting Identity Numerators

When an integrand consists of products of \(\sin x\) and \(\cos x\) in the denominator and standard algebraic substitutions seem out of reach, a celebrated technique is to replace the constant \(1\) in the numerator with the Pythagorean identity:

\[1 = \sin^2 x + \cos^2 x \qquad \text{or} \qquad 1 = (\sin^2 x + \cos^2 x)^2\]

This decomposition splits an intractable fraction into separate, simpler fractions where terms cancel out directly.


Example 23

Evaluate:

\[I = \int \frac{dx}{\sin^2 x \cos^2 x}\]

Solution:

Replace \(1\) in the numerator with \(\sin^2 x + \cos^2 x\):

\[I = \int \frac{\sin^2 x + \cos^2 x}{\sin^2 x \cos^2 x}\,dx\]

Split into two fractions:

\[I = \int \left( \frac{\sin^2 x}{\sin^2 x \cos^2 x} + \frac{\cos^2 x}{\sin^2 x \cos^2 x} \right) dx = \int \left( \frac{1}{\cos^2 x} + \frac{1}{\sin^2 x} \right) dx\]
\[I = \int (\sec^2 x + \csc^2 x)\,dx\]

Both terms are standard elementary integrals:

\[I = \tan x - \cot x + C\]

Example 24

Evaluate:

\[I = \int \frac{dx}{\sin x \cos^2 x}\]

Solution:

Replace \(1\) in the numerator with \(\sin^2 x + \cos^2 x\):

\[I = \int \frac{\sin^2 x + \cos^2 x}{\sin x \cos^2 x}\,dx = \int \frac{\sin^2 x}{\sin x \cos^2 x}\,dx + \int \frac{\cos^2 x}{\sin x \cos^2 x}\,dx\]

Simplify each term:

\[I = \int \frac{\sin x}{\cos^2 x}\,dx + \int \frac{1}{\sin x}\,dx\]

The first term is \(\sec x\tan x\), and the second term is \(\csc x\):

\[I = \int \sec x \tan x\,dx + \int \csc x\,dx\]

Integrating:

\[I = \sec x + \ln|\csc x - \cot x| + C\]

Example 25

Evaluate:

\[I = \int \frac{dx}{\sin^3 x \cos x}\]

Solution:

Insert \(1 = \sin^2 x + \cos^2 x\) in the numerator:

\[I = \int \frac{\sin^2 x + \cos^2 x}{\sin^3 x \cos x}\,dx = \int \frac{\sin^2 x}{\sin^3 x \cos x}\,dx + \int \frac{\cos^2 x}{\sin^3 x \cos x}\,dx\]
\[I = \int \frac{dx}{\sin x \cos x} + \int \frac{\cos x}{\sin^3 x}\,dx\]

For the first integral, replace \(1\) again with \(\sin^2 x + \cos^2 x\):

\[\int \frac{dx}{\sin x \cos x} = \int \frac{\sin^2 x + \cos^2 x}{\sin x \cos x}\,dx = \int \frac{\sin x}{\cos x}\,dx + \int \frac{\cos x}{\sin x}\,dx = \int \tan x\,dx + \int \cot x\,dx\]

The second integral \(\int \sin^{-3} x (\cos x\,dx)\) is a direct power of \(\sin x\):

\[\int \sin^{-3} x (\cos x\,dx) = \frac{\sin^{-2} x}{-2} = -\frac{1}{2\sin^2 x} = -\frac{1}{2}\csc^2 x\]

Combining all three parts:

\[I = \ln|\sec x| + \ln|\sin x| - \frac{1}{2}\csc^2 x + C\]

Using the logarithm product rule \(\ln|\sec x| + \ln|\sin x| = \ln\left|\frac{\sin x}{\cos x}\right| = \ln|\tan x|\):

\[I = \ln|\tan x| - \frac{1}{2}\csc^2 x + C\]