# The limit of the integrals $\int_0^{2 \pi} |\sin(nx)-f(x)| \, dx$

How to prove that if $f \in C[0,2 \pi]$, then $$2\pi \lim_{n \to \infty} \int_0^{2 \pi} |\sin(nx)-f(x)| \, dx = \int_0^{2 \pi} \int_0^{2 \pi} |\sin(y)-f(x)| \,dx \, dy\ ?$$ This is true for constant functions, by direct calculation.

-
What did you try? (Personally, I see no direct connectin between the two sides – but I would start by switching the order of the integrals on the right, then evaluating the inner integral explicitly. Perhaps as a warmup exercise, try to prove it when $f$ is a constant.) – Harald Hanche-Olsen Apr 24 '13 at 5:35
This statement is trivial for constant functions. – user64494 Apr 24 '13 at 5:46
Indeed. But what if $f$ is a constant times the characteristic function of an interval inside $[0,2\pi]$? (That's not continuous, but this should not matter.) Or a step function? We lack linearity here, so you have to be careful. But I still imagine you might get something out of these cases. – Harald Hanche-Olsen Apr 24 '13 at 10:05

Start writing \begin{align} \int_0^{2\pi}|\sin(nx)-f(x)|dx&=\frac 1n\int_0^{2n\pi}|\sin(t)-f(tn^{-1})|dt\\ &=\frac 1n\sum_{k=0}^{n-1}\int_{2k\pi}^{2(k+1)\pi}|\sin t-f(tn^{-1})|dt\\ &=\frac 1n\sum_{k=0}^{n-1}\int_0^{2\pi}\left|\sin t-f\left(\frac tn+\frac{2\pi}nk\right)\right|dt. \end{align} It's a Riemann sum and the terms $tn^{-1}$ doesn't matter by uniform continuity.