$f(x)$ is continuous on $[0,\pi]$.Prove that the following limit is $\frac{2}{\pi}\int_{0}^{\pi}f(x)$ $f(x)$ is continuous on $[0,\pi]$.Prove that
$$\lim_{n\to\infty}\int_0^\pi |\sin(nx)|f(x)\ dx = \frac 2\pi \int_0^\pi f(x) dx$$
I made the substitution $x=\frac{u}{n} \implies \text{dx}=\frac{1}{n} \text{du}$.
So, we have $\lim_{n \rightarrow \infty} \int_{0}^{\frac{\pi}{n}} \sin u f(\frac{u}{n}) du$
Now i have no idea how to proceed.
 A: Hint: For large $n$ and $\frac{k-1}{n}\pi<x<\frac{k}{n}\pi$, $f$ is approximately constant, so one has
$$\int_{\frac{k-1}{n}\pi}^{\frac{k}{n}\pi}\lvert\sin nx\rvert f(x)dx\approx f\left(\frac{k}{n}\pi\right)\int_{\frac{k-1}{n}\pi}^{\frac{k}{n}\pi}\lvert\sin nx\rvert dx=\frac{2}{n}f\left(\frac{k}{n}\pi\right)$$
Of course, one still need to properly fit some epsilons in the Riemann sum and use uniform continuity in order to be rigorous, but the idea is clear.
EDIT: Simplification at Dr. MV's suggestion to use MVT (second formula with $f$ and $g$):
$$\int_{\frac{k-1}{n}\pi}^{\frac{k}{n}\pi}\lvert\sin nx\rvert f(x)dx=f(\xi_k)\int_{\frac{k-1}{n}\pi}^{\frac{k}{n}\pi}\lvert\sin nx\rvert dx=\frac{2}{n}f(\xi_k)$$ for some $\xi_k\in\left(\frac{k-1}{n}\pi,\frac{k}{n}\pi\right)$
Then sum for $k=1,2,\ldots,n$ and on the RHS you have a Riemann sum which converges to $\frac 2\pi \int_0^\pi f(x) dx$ for $n\rightarrow\infty$
A: Let $\{0,\dfrac{\pi}{n},\dfrac{2\pi}{n},\dfrac{3\pi}{n},\cdots,\dfrac{n\pi}{n}=\pi\}$ be a partition for $[0,\pi]$, and 
$$I_k=\int_{\frac{k\pi}{n}}^{\frac{(k+1)\pi}{n}}|\sin{nx}|f(x)dx=\frac1n\int_{k\pi}^{(k+1)\pi}|\sin y|f(\frac{y}{n})dy$$
with $y=u+k\pi\,$:
$$nI_k=\int_{0}^{\pi}|\sin(k\pi+u)|f(\frac{k\pi+u}{n})du=\int_{0}^{\pi}|\sin(u)|f(\frac{k\pi+u}{n})du$$
For 
$$J=\int_{0}^{\pi}|\sin(u)|f(\dfrac{u}{n})du$$
by continuity of on $[0,\pi]$ we see $\displaystyle\lim_{n\to\infty}nI_k\to J$ because
$$|nI_k-J|\leq\int_{0}^{\pi}|\sin(u)|\Big|f(\frac{k\pi+u}{n})-f(\dfrac{u}{n})\Big|du\leq2\varepsilon$$
then
$$I=\lim_{n\to\infty}\sum_{k=0}^{n-1}I_k\to\lim_{n\to\infty}\sum_{k=0}^{n-1}\frac{1}{n}J=\lim_{n\to\infty}\sum_{k=0}^{n-1}\frac{1}{n}\int_{0}^{\pi}|\sin x|f(\dfrac{x}{n})dx=\int_{0}^{\pi}|\sin x|\lim_{n\to\infty}\sum_{k=0}^{n-1}\frac{1}{n}f(\dfrac{x}{n})dx=2\int_{0}^{\pi}f(x)dx$$
