Prove \begin{align} & \int_0^{\pi/2}\sin^mx \cos^nx\,dx \\[12pt] = {} & \begin{cases}\dfrac{[(m-1)(m-3)\cdots][(n-1)(n-3)\cdots]}{(m+n)(m+n-2)\cdots}\cdot\dfrac{\pi}{2} & m,n\text{ even integers}\\[10pt] \dfrac{[(m-1)(m-3)\cdots][(n-1)(n-3)\cdots]}{(m+n)(m+n-2)\cdots} & \text{elsewhere} \end{cases} \end{align}
My Attempt $$ I_{m,n}=\int_0^{\pi/2}\sin^mx\cdot\cos^n x\,dx=\int_0^{\pi/2}\sin^{m-1}x \cos^nx \sin x \, dx\\ \int\cos^nx\cdot \sin x\,dx=\dfrac{-\cos^{n+1}x}{n+1}+K\\ I_{m,n}=\bigg[\sin^{m-1}x\cdot \dfrac{-\cos^{n+1}x}{n+1}\bigg]_0^{\pi/2}-(m-1)\int_0^{\pi/2}\sin^{m-2}x\cdot \cos x\cdot \dfrac{-\cos^{n+1}x}{n+1}\,dx\\ =0+\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m-2}x(1-\sin^2x)\cdot dx\\ =\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m-2}x\,dx-\frac{m-1}{n+1}\int_0^{\pi/2}\cos^nx\cdot\sin^{m}x\,dx\\ I_{m,n}=\frac{m-1}{n+1}\cdot I_{m-2,n}-\frac{m-1}{n+1}\cdot I_{m,n}\implies \color{blue}{\boxed{I_{m,n}=\frac{m-1}{m+n}\cdot I_{m-2,n}}} $$ case 1: $m,n$ even: $$ I_{m,n}=\frac{(m-1)(m-3)\cdots 1}{(m+n)(m+n-2)\cdots 2}\cdot I_{0,n}\\ I_{0,n}=\int_0^{\pi/2}\cos^nx.dx=\frac{(n-1)(n-3)...1}{n(n-2)...2}.\frac{\pi}{2}\quad;\text{ since $n$ is even}\\ I_{m,n}=\frac{(m-1)(m-3)\cdots 1}{(m+n)(m+n-2)\cdots 2} \cdot \frac{(n-1)(n-3)...2}{n(n-2)...2}.\frac{\pi}{2}\\ =\frac{[(m-1)(m-3)\cdots 1][(n-1)(n-3)...2]}{[(m+n)(m+n-2)\cdots 2]\color{red}{[n(n-2)...2]}}.\frac{\pi}{2} $$
Why am I not getting the solution given in my reference, more precisely, why do I get the additional term, marked in red, in the final solution ?
How do I reach the final solution from the recurrence relation ?
Similar question is asked before in Reduction formula for integral $\sin^m x \cos^n x$ with limits $0$ to $\pi/2$, but it does not seem to get the same recurrence relation as in my attempt.
Note: I am having trouble proceeding from the recurrence relation, post mentioned below are attempts to derive the recurrence relation, which does not address the problem, that i have already derived it in my attempt.