$$\int \sin ^m\left(x\right)\cos ^n\left(x\right)$$ m,n are natural numbers and I'm asked to find the recurrent formula for this integral.
Now I know there are three cases to look at namely: $$ m>n$$ $$ m<n$$ $$ m=n$$
The last case I'm able to solve, but I'm not sure about the first two. I'm using integration by parts so for example if we take the first case: $$u=\sin ^m\left(x\right)\cos ^{n-1}\left(x\right)$$ $$dv\:=\:\int \cos \left(x\right)$$
Did I choose the wrong u and dv, because I am not able to solve it. At one point I get something like this: $\int \sin ^m\left(x\right)\cos ^{n-2}\left(x\right)$ in the expression and that's quite problematic.
Integration by parts yields:
$$\int\sin^m(x)\cos^n(x)dx=-\frac1{m+1}\sin^{m+1}(x)\cos^{n+1}(x)-\frac{n+1}{m+1}\int\sin^{m+2}(x)\cos^{n}(x)dx$$
Turning this around, you get:
$$\frac{n+1}{m+1}\int\sin^{m+2}(x)\cos^{n}(x)dx=-\left(\frac1{m+1}\sin^{m+1}(x)\cos^{n+1}(x)+\int\sin^m(x)\cos^n(x)dx\right)$$
$$\int\sin^{m+2}(x)\cos^{n}(x)dx=-\left(\frac1{n+1}\sin^{m+1}(x)\cos^{n+1}(x)+\frac{m+1}{n+1}\int\sin^m(x)\cos^n(x)dx\right)$$
And so, if $m$ is even, the solution will eventually be found. If $m$ is odd, you could use $\int\sin(x)\cos^n(x)dx=-\cos^{n+1}(x)$
I shall attempt at the general solution, but it will be messy.
$$\int\sin^{m+2}(x)\cos^{n}(x)dx=-\frac1{n+1}\sin^{m+1}(x)\cos^{n+1}(x)+\frac{m+1}{(n+1)^2}\sin^{m-1}(x)\cos^{n+1}(x)-\frac{(m+1)(m-1)}{(n+1)^3}\sin^{m-3}(x)\cos^{m+1}(x)\dots$$
$$\int\sin^{m+2}(x)\cos^{n}(x)dx=\cos^{m+1}(x)\sum_{i=0}^{\infty}\frac{(-1)^{i+1}(m+i)!}{m!(n+1)^{i+1}}\sin^{m-2i+1}(x)$$
Only use the summation until $m-2i+1=0,1$, then evaluate the last remaining integral. I don't believe the summation converges.