Find the recurrence relation for the integral $\int_0^{\pi/2} x^n \cos(x)\,dx$ and evalutate. Given $$I_n=\int_0^{\pi/2} x^n \cos(x) \, dx$$
find a reccurence relation for integral and evaluate for the given limits. 

I've tried tabular integration and I'm getting lost in finding a recurrence relation. 
 A: What is tabular integration? Anyway, we have $I_0=1$ and $I_1=\frac{\pi-2}{2}$ by direct computation.
Integration by parts gives:
$$\begin{eqnarray*} I_n &=& x^n \sin(x)\Big|_0^{\pi/2}-n\int_0^1 x^{n-1} \sin(x)\,dx\\
&=&\left(\frac{\pi}{2}\right)^n-n(n-1)\int_0^{\pi/2}x^{n-2} \cos(x)\,dx\\&=&\left(\frac{\pi}{2}\right)^n-n(n-1) I_{n-2}\tag{1} \end{eqnarray*}$$
hence it follows that
$$ I_{2n} = \sum_{k=0}^n \left(\frac{\pi}{2}\right)^{2n-2k}(-1)^k(2n)_{2k} = \color{red}{\sum_{k=0}^n \left(\frac{\pi}{2}\right)^{2n-2k}(-1)^k\binom{2n}{2k}(2k)!}\tag{2}$$
I leave to you to deduce the closed formula for $I_{2n+1}$, always from $(1)$.
A: \begin{align}
I_n = {} & \int_0^{\pi/2} x^n \Big(\cos x\,dx\Big) \\[10pt]
= {} &  \int u\,dv = uv - \int v\,du \\[10pt]
= {} & \left. x^n\sin x \vphantom{\int}\, \right|_0^{\pi/2} - \int_0^{\pi/2} nx^{n-1} \sin x\,dx \\[10pt]
= {} & \left( \frac \pi 2 \right)^n - n \int_0^{\pi/2} x^{n-1} \Big( \sin x \,dx\Big) \\[10pt]
= {} & \left( \frac \pi 2 \right)^n - n \int s\,dt = \left( \frac \pi 2 \right)^n - n \left( st - \int t\,ds \right) \\[10pt]
= {} & \left( \frac \pi 2 \right)^n - n \left( \left. x^{n-1} (-\cos x) \vphantom{\int} \, \right|_0^{\pi/2} - \int_0^{\pi/2} (-\cos x)\,(n-1)x^{n-2}\,dx \right) \\[10pt]
= {} & \left( \frac \pi 2 \right)^n - n \left( 0 + (n-1)\int_0^{\pi/2} x^{n-2} (\cos x) \,dx \right) \\[10pt]
= {} & \left( \frac \pi 2 \right)^n - n(n-1) I_{n-2}.
\end{align}
