I seem to be stuck trying to prove the following integral
$$
\int\frac{\cos^mx}{\sin^nx}dx = -\frac{\cos^{m+1}x}{(n-1)\sin^{n-1}x}-\frac{m-n+2}{n-1}\int\frac{\cos^mx}{\sin^{n-2}x} dx + C\,\,(n \neq 1)
$$
My thinking so far has been that if I take
$$
I = \int\frac{\cos^mx}{\sin^nx}dx
$$
I have been able to prove that
$$
I = -\frac{\cos^{m-1}x}{(n-1)\sin^{n-1}x} - \frac{m-1}{n-1}\int\frac{\cos^{m-2}x}{\sin^{n-2}x}\,dx+C\,\,\,\,\,(1)
$$
and
$$
I = \frac{\cos^{m-1}x}{(m-n)\sin^{n-1}x} + \frac{m-1}{m-n}\int\frac{\cos^{m-2}x}{\sin^nx}\,dx+C\,\,\,\,\,(2)
$$
but showing that
$$
I = -\frac{\cos^{m+1}x}{(n-1)\sin^{n-1}x}-\frac{m-n+2}{n-1}\int\frac{\cos^mx}{\sin^{n-2}x} dx + C
$$
seems to be eluding me. I attempted to apply a similar technique what I used on $(1)$ to get $(2)$ to try to obtain this integral, but it didn't seem to work.
I can also show that
$$
I = -\frac{\cos^{m+1}x}{(m+1)\sin^{n+1}x} - \frac{n+1}{m+1}\int\frac{\cos^{m+2}x}{\sin^{n+2}x}\, dx + C\,\,\,\,\,(3)
$$
but there's obviously more to it.
Any broad hints would be more than welcome.