How do we prove $$\int\dfrac{\sin^nx}{\cos^mx}dx=\dfrac{\sin^{n-1}x}{(m-1)\cos^{m-1}x}-\dfrac{n-1}{m-1}\int\dfrac{\sin^{n-2}x}{\cos^{m-2}x}dx,m\ne-1?$$
At first I decided to take $m=n$. In this case we can write the given integral as $$-\int\dfrac{\sin^{n+2}x}{\cos^nx}d\cot x=-\dfrac{1}{1-n}\int\sin^2xd(\cot^{-n+1}x)=\\\dfrac{1}{n-1}\sin^2x\cot^{-n+1}x-\dfrac{1}{n-1}\int\cot^{-n+1}xd\sin^2x=\\\dfrac{1}{n-1}\dfrac{\sin^2x\cos^{-n+1}x}{\sin^{-n+1}x}-\dfrac{1}{n-1}\int\dfrac{2\sin x\cos x\cos^{-n+1}x}{\sin^{-n+1}x}dx$$
I really don't know how to proceed when $m$ and $n$ are not equal, though. We don't even know if $n>m$ (or the other way around) which seems to be important in my try which is for $n=m$. Any help would be appreciated.
I'm trying to solve the problem by integration by parts.
To show what it asks of you, just use integration by parts, let's note the following: $$\int \frac{\sin^{n}x}{\cos^{m}x }dx = \int \frac{\sin^{n-1}x \sin x}{\cos^{m}x }dx $$ Now let's use integration by parts considering the variables $u$ and $v$ as: $u =\sin^{n-1}x$ y $dv = \frac{ \sin x}{\cos^{m}x }dx$ so let's notice that $du = (n-1)\sin^{n-2}x$ $dx$ y $v =\frac{ 1}{(m-1)\cos^{m-1}x } $ Therefore, substituting in integration by parts we have to: $$\int \frac{\sin^{n}x}{\cos^{m}x }dx = \int \frac{\sin^{n-1}x \sin x}{\cos^{m}x }dx = uv- \int vdu =$$ $$ \sin^{n-1}x\frac{1}{(m-1)\cos^{m-1}x}- \int \frac{ 1}{(m-1)\cos^{m-1}x } (n-1)\sin^{n-2}x dx$$. which is what is requested in the problem.