Definite integral of $x\sin^n x$ from $0$ to $\pi/2$ How to find
\begin{equation*}
\int_0^{\pi/2} x\sin^n x dx
\end{equation*}
where $n$ is a positive integer? I tried $y=x-\pi/4$ and that gives
\begin{equation*}
\frac{1}{2^{n/2}}\frac{\pi}{4}\int_{-\pi/4}^{\pi/4} (\sin y+\cos y)^n dy+\frac{1}{2^{n/2}}\int_{-\pi/4}^{\pi/4} y(\sin y+\cos y)^n dy.
\end{equation*}
Although some terms may be canceled, the summation of the others seems terrible.
Another method is integration by parts. Here I found the recurrence formula for $\sin^n x$:
Integrating $\int \sin^n{x} \ dx$
So the first step is to have
\begin{equation*}
\left.\left(-\frac{1}{n}x\cos x\sin^{n-1} x+\frac{n-1}{n}x\int \sin^{n-2} xdx\right)\right|_0^{\pi/2}-\int_0^{\pi/2}\left(-\frac{1}{n}\cos x\sin^{n-1} x+\frac{n-1}{n}\int_0^x \sin^{n-2} t dt\right)dx
\end{equation*}
the evaluations at $0$ and $\pi/2$ and the integral of $\cos x\sin^{n-1}x$ seem OK, but what about the second term? Any better method for this problem?

Do the same thing: let the integral be $I_n$,
$$
\begin{align*}
&\phantom{=}\int_0^{\pi/2} x \sin(x)^n \mathrm dx = -\int_0^{\pi/2} x \sin(x)^{n-1}\mathrm d(\cos(x)) \\
&=\left. x \sin(x)^{n-1} \cos(x) \right|_{\pi/2}^0 - \int_{\pi/2}^0 \cos(x) (\sin(x)^{n-1} + (n-1)x \sin(x)^{n-2} \cos(x))\mathrm d x \\
&= 0 + \int_0^{\pi/2} \sin(x)^{n-1}\mathrm d (\sin(x)) +(n-1) \int_0^{\pi/2} x\sin(x)^{n-2}(1 - \sin(x)^2)\mathrm dx\\
&= \frac 1n + (n-1) I_{n-2} - (n-1)I_n ,
\end{align*}
$$
i.e. 
$$
\fbox{$nI_n =\dfrac 1n + (n-1)I_{n-2}, $}
$$
with 
$$
I_1 = 1,\quad  I_2 = \frac 14 + \frac {\pi^2} {16},
$$
since 
\begin{align*}
I_2&=\int_0^{\pi/2} x\sin(x)^2\mathrm dx \\
&= \left. x \sin(x) \cos(x)\right|_{\pi/2}^0 + \int_0^{\pi/2} \cos(x) (\sin(x)+ x\cos(x)) \mathrm dx \\
&= 0 + \frac 12 + \int_0^{\pi/2} x(1 - \sin(x)^2) \mathrm dx\\
&= \frac 12 + \frac {\pi^2} 8 - I_2\\
&\implies I_2 = \frac 14 + \frac {\pi^2}{16}.
\end{align*}
To go further, we are going to solve the recursive relation, but seems gruesome. So I let you take it from here. 
UPDATE
According to wiki, we have a systematic method to solve this. First consider the terms with even index,
Let $J_{n} = I_{2n}$, then
$$
J_n = \frac 1{4n^2} + \frac {2n-1}{2n}J_{n-1}, 
$$
then divide both side of the equation by $(2n-1)!!/(2n)!!$:
$$
\frac {J_n}{\dfrac {(2n-1)!!}{(2n)!!}} = \frac 1 {4n^2} \frac {(2n)!!}{(2n-1)!!}+ \frac {J_{n-1}}{\dfrac {(2n-3)!!}{(2n-2)!!}},
$$
now let $P_n = J_n (2n)!!/(2n-1)!!$, then 
$$
P_n = \frac 1{2n} \frac {(2n-2)!!}{(2n-1)!!} + P_{n-1},
$$
then 
$$
P_n = \sum_2^n \frac 1{2k}\frac {(2k-2)!!}{(2k-1)!!} + P_1,
$$
which is pretty much for deriving a concrete number of $I_n$. 
