Home » Blog » Verify the given integral formula

Verify the given integral formula

Verify the formula using any method.

    \[ \int \frac{\cos^m x}{\sin^n x} \, dx = -\frac{\cos^{m+1} x}{(n-1)\sin^{n-1} x} - \frac{m-n+2}{n-1} \int \frac{\cos^m x}{\sin^{n-2} x} \, dx + C \]

for n \neq 1.


Proof. As a first step, we write

    \[ \int \frac{\cos^m x}{\sin^n x} \, dx = \int \frac{\cos^{m+2} x}{\sin^n x} \sec^2 x \, dx. \]

Then, we integrate by parts with

    \begin{align*}  u &= \frac{\cos^{m+2} x}{\sin^n x} & du &= \frac{-(m+2) \cos^{m+1} x \sin^{n+1} x - n \sin^{n-1} x \cos^{m+3} x}{\sin^{2n} x} \, dx \\[9pt]  &&&= \frac{-(m+2) \cos^{m+1} x \sin^2 x - n \cos^{m+3} x}{\sin^{n+1} x} \, dx \\[9pt]  &&&= -(m+2) \frac{\cos^{m+1} x}{\sin^{n-1} x} - n \frac{\cos^{m+3} x}{\sin^{n+1} x} \, dx\\[9pt]  dv &= \sec^2 x \, dx & v &= \tan x. \end{align*}

This gives us

    \begin{align*}  \int \frac{\cos^m x}{\sin^n x} &= \int \frac{\cos^{m+2} x}{\sin^n x} \sec^2 x \, dx \\[9pt]  &= uv - \int v \, du \\[9pt]  &= \frac{\cos^{m+1} x}{\sin^{n-1} x} - \int \left( -(m+2) \frac{\cos^m x}{\sin^{n-2} x} - n \frac{\cos^{m+2} x}{\sin^n x} \right) \, dx \\[9pt]  &= \frac{\cos^{m+1} x}{\sin^{n-1} x} + (m+2) \int \frac{\cos^m x}{\sin^{n-2} x} \, dx + n \int \frac{\cos^{m+2} x}{\sin^n x} \, dx \\[9pt]  &= \frac{\cos^{m+1} x}{\sin^{n-1} x} + (m+2) \int \frac{\cos^m x}{\sin^{n-2} x} \, dx + n \int \frac{\cos^m x (1 - \sin^2 x)}{\sin^n x} \, dx \\[9pt]  &= \frac{\cos^{m+1} x}{\sin^{n-1} x} + (m+2) \int \frac{\cos^m x}{\sin^{n-2} x} \, dx + n \int \frac{\cos^m x}{\sin^n x} \, dx - n \int \frac{\cos^m x}{\sin^{n-2} x} \, dx. \end{align*}

Moving the n \int \frac{\cos^m x}{\sin^n x} \, dx back to the left we then have,

    \begin{align*}  (1-n) \int \frac{\cos^m x}{\sin^n x} \, dx &= \frac{\cos^{m+1} x}{\sin^{n-1} x} + (m+2-n) \int \frac{\cos^m x}{\sin^{n-2} x} \, dx \\[9pt]  \implies \qquad \int \frac{\cos^m x}{\sin^n x} \, dx &= -\frac{\cos^{m+1} x}{(n-1)\sin^{n-1} x} - \frac{m-n+2}{n-1} \int \frac{\cos^m x}{\sin^{n-2} x} \, dx. \qquad \blacksquare \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):