Primitive of Power of Cosine of a x over Power of Sine of a x/Reduction of Both Powers

Theorem

 * $\displaystyle \int \frac {\cos^m a x} {\sin^n a x} \ \mathrm d x = \frac {-\cos^{m - 1} a x} {a \left({n - 1}\right) \sin^{n - 1} a x} - \frac {m - 1} {n - 1} \int \frac {\cos^{m - 2} a x} {\sin^{n - 2} a x} \ \mathrm d x + C$

Proof
With a view to expressing the primitive in the form:
 * $\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

and let:

Then:

Also see

 * Primitive of $\dfrac {\sin^m a x} {\cos^n a x}$: Reduction of Both Powers