<s>[INST] Evaluating $\lim_{n\to\infty}\sum_{k=1}^n \frac{\pi k}{2n}\int_0^1 x^{2n}\sin\frac{\pi x}{2}dx$ Hello I am trying to compute $$\lim_{n\to\infty}\sum_{k=1}^n \frac{\pi k}{2n}\int_0^1 x^{2n}\sin\frac{\pi x}{2}dx$$ I have rewrited it as: $$\lim_{n\to\infty}\frac1n\sum_{k=1}^n \frac{k}{n}\int_0^1\frac{n\pi}{2} x^{2n}\sin\frac{\pi x}{2}dx$$ Now the first part is just a Riemann integral $\int_0^1 x \,dx=\frac{1}{2}\,$ however I dont know if I am allowed to use it in this case. Now for the second part using $\frac{\pi x}{2}=t$ we have:$$\int_0^1\frac{n\pi}{2} x^{2n}\sin\frac{\pi x}{2}dx=\left(\frac{\pi}{2}\right)^nn\int_0^\frac{\pi}{2}t^{2n}\sin t\,dt=\left(\frac{\pi}{2}\right)^n\frac{n}{2n+1}\int_0^\frac{\pi}{2}\left(t^{2n+1}\right)'\sin t\, dt$$ So integrating by parts two times gives: $$I(2n)=\frac{1}{2n+1}\left(\left(\frac{\pi}{2}\right)^{2n+1}-\frac{1}{2n+2}I(2n+2)\right)$$ or rewritten as:$$I(2n)=2n\left(\left(\frac{\pi}{2}\right)^{2n-1}-(2n-1)I(2n-2)\right)$$ But how do I use the relation? Could you give me some help with this? 
EDIT:Originally was:$$\lim_{n\to\infty}\sum_{k=1}^n \sin \frac{\pi k}{2n}\int_0^1 x^{2n}\sin\frac{\pi x}{2}dx$$
 [/INST] Method 1 (Laplace's method).
We use the asumptotics of $$\int^1_0 x^{2n} \sin\left( \frac{\pi x}{2}\right)\,dx=\int^1_0 e^{2n(\log(x))} \sin\left( \frac{\pi x}{2}\right)\,dx $$
Via Laplace's method one gets as $n\to\infty$: $$ \int^1_0 x^{2n} \sin\left( \frac{\pi x}{2}\right)\,dx \sim  \frac{1}{2n }  $$ The required limit is thus:
\begin{align}
\lim_{n\to\infty} \sum_{k=1}^n \frac{\pi k}{2n}  \int^1_0 x^{2n} \sin\left( \frac{\pi x}{2}\right)\,dx = \lim_{n\to\infty} \frac{\pi}{2n} \cdot \frac{(n+1)n}{2} \cdot \frac{1}{2n} = \frac{\pi}{8}
\end{align}
where we have used the well known result $\sum_{k=1}^n k = \frac{n(n+1)}{2}$.

Method 2 (Elementary).
So let me derive this more elementary. Set $t=1-x$ to get: $$\int^1_0 x^{2n}\sin\left( \frac{\pi x}{2}\right)\,dx = \int^1_0 (1-t)^{2n} \cos\left( \frac{\pi t}{2}\right)\,dt $$ Recall the inequality $1-\frac{x^2}{2} \leq \cos(x) \leq 1$. Hence:
\begin{align}
\int^1_0 (1-t)^{2n}\left(1- \frac{\pi^2}{8}t^2\right)\,dt \leq \int^1_0 (1-t)^{2n} \cos\left( \frac{\pi t}{2}\right)\,dt\leq \int^1_0 (1-t)^{2n}\,dt
\end{align}
In other words: 
\begin{align}
\frac{1}{2n+1} - \frac{\pi^2}{8}\int^1_0 (1-t)^{2n}t^2\,dt \leq \int^1_0 (1-t)^{2n} \cos\left( \frac{\pi t}{2}\right)\,dt\leq \frac{1}{2n+1}
\end{align}
Moreover
$$\int^1_0 (1-t)^{2n}t^2\,dt = \frac{1}{(2n+1)(2n+3)(n+1)} = O(n^{-3})$$
which can be easily gotten by integration by parts (or through Beta function). All in all we conclude:
\begin{align}
\frac{(n+1)\pi}{4}  \frac{1}{(2n+1)}+O(n^{-2})\leq \sum_{k=1}^n \frac{\pi k}{2n}  \int^1_0 x^{2n} \sin\left( \frac{\pi x}{2}\right)\,dx  \leq \frac{(n+1)\pi}{4}  \frac{1}{(2n+1)}
\end{align}
where we (again) have used the formula for $\sum_{k=1}^n k$. With the Squeeze Theorem we conclude the same as in method 1.

Method 3 (DCT).
This method is inspired by Mark Viola's excellent answer. Integrate by parts once to get:
$$\int_0^1 x^{2n}\sin\left(\frac{\pi x}{2}\right)\,dx=\frac1{2n+1}-\frac{\pi}{2(2n+1)}\int_0^1 x^{2n+1}\cos\left(\frac{\pi x}{2}\right)\,dx$$
So: $$\sum_{k=1}^n \frac{\pi k}{2n}  \int^1_0 x^{2n} \sin\left( \frac{\pi x}{2}\right)\,dx = \frac{(n+1)\pi}{4}  \frac{1}{(2n+1)}-\frac{(n+1)\pi}{4}\frac{\pi}{2(2n+1)}\int_0^1 x^{2n+1}\cos\left(\frac{\pi x}{2}\right)\,dx $$
Taking the limits as $n\to\infty$ together with DCT ( $|x^{2n+1}\cos\left(\frac{\pi x}{2}\right)|\leq 1$ and it converges a.e. to $0$) yields the same result.
</s>