Given that $I\_n=\int\_0^{\pi/2}x^n\cos x\,dx$, show that $I\_n=(\frac {\pi}{2})^n - n(n-1)I\_{n-2}$. 
I wrote $x^n$ as $xx^{n-1}$ and then used the by parts formula twice and then once again on one of the terms. I got $I\_{n-2}$ in the process but could not get the given result. Any help?