Prove reduction formula for $\int \cos^n (x)\sin^m (x) \, dx$
$$\displaystyle\int \:\sin^n\left(x\right)\cos^m\left(x\right)\mathrm dx=\frac{\sin^{n+1}x\cos^{m-1}x}{m+n}+\frac{m-1}{m+n}\int \:\sin^nx\cos^{m-2}x\,\mathrm dx$$
I have been trying to solve for over a week now can someone please help me.
$$\operatorname I(n,m) =\int \sin^n x \cos^m x\, \mathrm dx= \int \sin^{n} x \cos^{m-1} x \cos x \, \mathrm dx$$
$$u = \sin^{n} x \cos^{m-1} x\iff\,\mathrm du=n\sin^{n-1} x\cos^mx-(m-1)\cos^{m-2}x\sin^{n+1}x\,\mathrm dx$$ $$\,\mathrm dv = \cos x\,\mathrm dx\iff v=\sin x$$
$\begin{align} \operatorname I(n,m)&=\sin^{n+1} x \cos^{m-1} x-n\operatorname I(n,m)-(m-1)\int\cos^{m-2}x\sin^{n+2}x\,\mathrm dx\tag{1}\\ &=\sin^{n+1} x \cos^{m-1} x-n\operatorname I(n,m)-(m-1)\int\cos^{m-2}x\sin^{n}x\sin^2x\,\mathrm dx\tag{2}\\ \operatorname I(n,m)&=\frac{\sin^{n+1} x \cos^{m-1} x}{m+n}-\frac{(m-1)}{m+n}\int\cos^{m-2}x\sin^{n}x\,\mathrm dx\tag{3}\\ \end{align}$
$$\operatorname I(n,m) =\int \sin^n x \cos^m x\,\mathrm dx=\frac{\sin^{n+1} x \cos^{m-1} x}{m+n}-\frac{(m-1)}{m+n}\int\cos^{m-2}x\sin^{n}x\,\mathrm dx$$
$\text{Explanation 2 $\to$ 3}$ using $\sin^2 x = 1- \cos^2 x$ in last integral, then separating out terms with $\operatorname I(n,m)$ and rewriting.
Note: You can also show
$$\displaystyle\int\sin^{n}x\cos^{m}x\,\mathrm dx=-\frac{\sin^{{n-1}}x\cos^{{m+1}}x}{m+n% }+\frac{n-1}{m+n}\int\sin^{{n-2}}x\cos^{m}x\,\mathrm dx$$
by splitting of $\sin^nx$ and then following similar procedure
$$I_{m,n}=\int \sin^nx\cos^mx dx=\int \sin^nx\cos^{m-1}x \cos xdx$$ $$I_{m,n}=\int \sin^nx\cos^mx dx=\int \cos^{m-1}x \sin^nx\cos xdx$$ $$=\cos^{m-1}x\frac{sin^{n+1}x}{n+1}-\frac{m-1}{n+1}\int \sin^{n+2}x\cos^{m-2}x dx$$ ($\because$ Integration by parts) $$=\cos^{m-1}x\frac{sin^{n+1}x}{n+1}-\frac{m-1}{n+1}\int \sin^{n}x\cos^{m-2}x(1-\cos^2x) dx $$ Rearrangeing the terms. We get, $$\displaystyle\int \:\sin^n\left(x\right)\cos^m\left(x\right)\mathrm dx=\frac{\sin^{n+1}x\cos^{m-1}x}{m+n}+\frac{m-1}{m+n}\int \:\sin^nx\cos^{m-2}x\,\mathrm dx$$
To start, we rewrite:
$$I=\int\sin^m\left(x\right)\cos^n\left(x\right)dx=\frac{1}{m+1}\int\big[\sin^{m+1}(x)\big]'\cos^{n-1}(x)dx$$
Partial integrating:
\begin{align} I&=\frac{1}{m+1}\sin^{m+1}(x)\cos^{n-1}(x)-\frac{1}{m+1}\int\sin^{m+1}(x)\big[\cos^{n-1}(x)\big]'dx\\ &=\frac{1}{m+1}\sin^{m+1}(x)\cos^{n-1}(x)+\frac{n-1}{m+1}\int\sin^{m+2}(x)\cos^{n-2}(x)dx\\ \end{align}
Now we use $\sin^2(x)+\cos^2(x)=1$: \begin{align} I&=\frac{1}{m+1}\sin^{m+1}(x)\cos^{n-1}(x)+\frac{n-1}{m+1}\int\sin^m(x)\cos^{n-2}(x)dx\\ &\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad-\frac{n-1}{m+1}\int\sin^{m}(x)\cos^{n}(x)dx\\ &=\frac{1}{m+1}\sin^{m+1}(x)\cos^{n-1}(x)+\frac{n-1}{m+1}\int\sin^m(x)\cos^{n-2}(x)dx-\frac{n-1}{m+1}I\\ \end{align}
From this we get: \begin{align}\frac{m+n}{m+1}I=\frac{1}{m+1}\sin^{m+1}(x)\cos^{n-1}(x)+\frac{n-1}{m+1}\int\sin^m(x)\cos^{n-2}(x)dx \end{align}