Evaluate the limit $\lim\limits_{n\rightarrow \infty}\int_{0}^{\pi}\left|\sin(x)-\sin(2nx)\right|\text{ d}x$ 
$$\lim_{n\rightarrow \infty}\int_{0}^{\pi}\left|\sin(x)-\sin(2nx)\right|\mathrm d x$$

Heading
I put proper big numbers to $n$ using calculator to estimate the answer.
And then I figured out that the answer seems like $\frac{8}{\pi}$, but
unfortunately I dont have any clues.
Please help.
 A: First off, I will leave it as an exercise to the reader to calculate that for a constant $a \in [-1, 1]$, we have
$$\int_0^{2\pi} |a - \sin x| \, dx = 4 \sqrt{1-a^2} + 4a \arcsin a.$$
(As a hint, first consider the case $a \ge 0$.  Using periodicity you can replace the interval of integration with $[\arcsin a, 2\pi + \arcsin a]$.  Now split this interval into $[\arcsin a, \pi - \arcsin a]$ where $a - \sin x \le 0$ and $[\pi - \arcsin a, 2\pi + \arcsin a]$ where $a - \sin x \ge 0$.)
Now, in the original integral, suppose we split it into intervals $[0, 2\pi/n], [2\pi/n, 4\pi/n], \ldots, [2k\pi/n, 2(k+1)\pi/n], \ldots, [2\pi - 2\pi/n, 2\pi]$; and in each interval, choose some $x_k^* \in [2\pi(k-1)/n, 2\pi k/n]$.  Then the $\sin x$ term is almost a constant, and if we replace $\sin x$ with the constant $\sin x_k^*$, we have
$$\int_{2(k-1)\pi/n}^{2k\pi/n} |\sin x_k^* - \sin (2nx)| \, dx = \frac{1}{2n} \int_{2(k-1)\pi}^{2k\pi} |\sin x_k^* - \sin t| \, dt = \\ \frac{1}{2n} \int_0^{2\pi} |\sin x_k^* - \sin t| \, dt = \frac{2}{n} \left(\sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*)\right).$$
The error in this approximation is at most $\int_{2(k-1)\pi/n}^{2k\pi/n} |\sin x - \sin x_k^*| \, dx$.  Fix $\varepsilon > 0$; then since the sine function is uniformly continuous, if $n$ is sufficiently large then we can bound $|\sin x - \sin x_k^*|$ by $\frac{\varepsilon}{2\pi}$.  Thus, the total error over all intervals is bounded above by $\int_0^{2\pi} \frac{\varepsilon}{2\pi} \,dx = \varepsilon$.
The upshot from the error bounds above: we see that $\int_0^{2\pi} |\sin x - \sin(2nx)|\,dx$ has the same limit as
$$\sum_{k=1}^n \frac{2}{n} \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) = \\
\frac{1}{\pi} \sum_{k=1}^n \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) \cdot \frac{2\pi}{n} = \\
\frac{1}{\pi} \sum_{k=1}^n \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) \Delta x_k$$
which has limit
$$\frac{1}{\pi} \int_0^{2\pi} \left( \sqrt{1 - \sin^2 x} + \sin x \arcsin(\sin x) \right) dx.$$
In this final integral, by symmetry, we can reduce to evaluating the integral over $[0, \pi/2]$ and multiplying by 4.  On this interval, the function being integrated is equal to $\cos x + x \sin x$.  Therefore, the final result is equal to
$$\frac{4}{\pi} \int_0^{\pi/2} (\cos x + x \sin x) dx = \frac{8}{\pi}.$$
A: \begin{align}
\int_0^\pi \left|\sin x - \sin(2nx)\right|\mathrm d x &= \frac1{2n}\int_{0}^{2n\pi} \left|\sin\left(\frac{x}{2n}\right) - \sin(x)\right|\mathrm dx\\
&= \frac{1}{2n} \sum_{k=0}^{n-1}\int_{2k\pi}^{2(k+1)\pi}\left|\sin\left(\frac{x}{2n}\right) - \sin(x)\right|\mathrm dx\\
&= \frac{1}{2n}\sum_{k=0}^{n-1}\int_0^{2\pi}\left|\sin(x) - \sin\left(\frac{x+2k\pi}{n}\right)\right|\mathrm d x\\
&\underset {n\to \infty} \to \frac1{4\pi} \int_0^{2\pi}\int_{0}^{2\pi}\left|\sin x - \sin y\right|\mathrm dx\,\mathrm dy\\
&= \frac1{2\pi} \int_0^{\pi}\int_{0}^{\pi}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\
&= \frac2{\pi} \int_0^{\frac\pi2}\int_{0}^{\frac\pi2}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\
&= \frac2\pi  \int_0^{\frac\pi2}\int_{0}^{\frac\pi2}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\
&= \frac4{\pi} \int_0^{\frac\pi2}\left(\int_{0}^{y}\sin y\,\mathrm dx + \int_{y}^{\frac\pi 2}\sin x\,\mathrm d x\right)\mathrm dy\\
&= \frac4\pi\int_0^{\frac\pi2} \left(y\sin y + \cos y\right)\mathrm d y\\
&= \frac4\pi \left[-y\cos y + 2\sin y\right]_{0}^{\frac\pi2}\\
&= \frac8\pi
\end{align}
A: Hint:
Split the interval $I = [0,\pi]$ to:
$$I = \bigcup\limits_{k=0}^{2n-1} I_k$$
where $I_k = \left[\dfrac{\pi k}{2n}, \dfrac{\pi (k+1)}{2n}\right).$ You should be easily able to calculate a closed formula for:
$$J_k = \int_{I_k}|\sin x - \sin 2nx|dx$$
because the choice of $I_k$ restricts $2nx\in [\pi k, \pi (k+1)).$ For instance, if you have an odd $k$, the absolute value can be forgotten because $\sin x\geq 0$ while $\sin 2nx\leq 0.$ For even $k$, you just need to do a little more work.
