Proving $\lim_{n \to \infty} \int^1_0 f(x) |\sin(n \pi x)|\,dx = \frac{2}{\pi} \int^1_0 f(x)\,dx$ I thought when let $f(x) $ be a continuous function on $[0, 1]$,
$$\lim_{n \to \infty} \int^1_0 f(x) |\sin(n \pi x)|\,dx = \frac{2}{\pi} \int^1_0 f(x)\,dx$$
With my intuition, the formula above is followed from $$ \int^1_0 \sin(\pi x)\,dx = \frac{2}{\pi}$$
I tried to give a proof of this with mean value theorems for definite integrals but failed.
Are there rigorous proofs that $\displaystyle \lim_{n \to \infty} \int^1_0 f(x) |\sin(n \pi x)|\,dx = \frac{2}{\pi} \int^1_0 f(x)\,dx$?
 A: We may use the following result.

Lemma (Fejér):
Suppose $g$ is a bounded measurable $T$-periodic function on $\mathbb{R}$ ($T>0$). For any integrable function $f$ (denoted by $f\in\mathcal{L}_1(\mathbb{R})$) and numeric sequence $a_n\in\mathbb{R}$,
$$
\lim_n\int_\mathbb{R} f(x)g(nx+a_n)\,dx=\Big(\frac{1}{T}\int^T_0 g\Big)\int_\mathbb{R} f \tag{1}\label{one}
$$

The result is atributed to Fejér, I learned of it from a problem in a prelim when I was a student long time ago. A short proof of this result is here (based on basic facts of integration such as dominated convergence and density of step functions).
Edit: Similar problems to to OP have been posted in the past. Common to  their solutions are variant of the  result I presented above. One such variant (more restrictive, but simpler in the sense that only Riemann calculus is needed) is given  here.

Now, for the problem in the OP, set  $g(x)=\sin(\pi x)$,  $a_n=0$.  Function $g$ has period is $T=1$. By extending  $f$ to all of $\mathbb{R}$ by setting $f(x)=0$ if $x\notin [0,1]$,  we have all the ingredient of the Lemma which we can no ally directly:
\begin{align}
\lim_n\int^1_0f(x)|\sin(n\pi x)|\,dx&=\Big(\int^1_0\sin(\pi x)\,dx\Big)\int^1_0f\\
&=\Big(\frac{1}{\pi}\int^\pi_0\sin( x)\,dx\Big)\int^1_0f\
=\frac{2}{\pi}\int^1_0f
\end{align}
A: Since $f$ is continuous on $[0,1]$, it is uniformly continuous. That is, for any $\epsilon\gt0$, there is a $\delta\gt0$ so that if $|x-y|\le\delta$, then $|f(x)-f(y)|\le\epsilon$.
Pick an $\epsilon\gt0$ and let $\delta$ satisfy the requirements above. Choose $n$ so that $\frac1n\le\delta$.
For $1\le k\le n$, define $I_k=\left[\frac{k-1}{n},\frac{k}{n}\right]$ and
$$
f_k=n\int_{I_k}f(x)\,\mathrm{d}x\tag1
$$
Taking the mean over $I_k$ of $\inf\limits_{u\in I_k}f(u)-f_k\le f(x)-f_k\le\sup\limits_{u\in I_k}f(u)-f_k$, we get
$$
\inf_{u\in I_k}f(u)-f_k\le0\le\sup_{u\in I_k}f(u)-f_k\tag2
$$
By the choice of $n$, the difference between the left and right side of $(2)$ is less than or equal to $\epsilon$. Thus,
$$
\sup_{u\in I_k}|f(u)-f_k|\le\epsilon\tag3
$$
Therefore, $(3)$ and $\int_{I_k}|\sin(n\pi x)|\,\mathrm{d}x=\frac2{n\pi}$ ensure
$$
\int_{I_k}|f(x)-f_k|\,|\sin(n\pi x)|\,\mathrm{d}x\le\frac2{n\pi}\epsilon\tag4
$$
Thus, we get
$$
\begin{align}
&\left|\,\int_0^1f(x)\,|\sin(n\pi x)|\,\mathrm{d}x-\frac2\pi\int_0^1f(x)\,\mathrm{d}x\,\right|\tag{5a}\\
&=\left|\,\sum_{k=1}^n\left(\int_{I_k}f(x)\,|\sin(n\pi x)|\,\mathrm{d}x-\frac2\pi\int_{I_k}f(x)\,\mathrm{d}x\right)\right|\tag{5b}\\
&=\left|\,\sum_{k=1}^n\left(\int_{I_k}f(x)\,|\sin(n\pi x)|\,\mathrm{d}x-\frac2\pi\int_{I_k}f_k\,\mathrm{d}x\right)\right|\tag{5c}\\
&=\left|\,\sum_{k=1}^n\left(\int_{I_k}f(x)\,|\sin(n\pi x)|\,\mathrm{d}x-\int_{I_k}f_k|\sin(n\pi x)|\,\mathrm{d}x\right)\right|\tag{5d}\\
&\le\sum_{k=1}^n\int_{I_k}|f(x)-f_k|\,|\sin(n\pi x)|\,\mathrm{d}x\tag{5e}\\[3pt]
&\le\frac2\pi\epsilon\tag{5f}
\end{align}
$$
Explanation:
$\text{(5b)}$: $\bigcup\limits_{k=1}^nI_k=[0,1]$
$\text{(5c)}$: apply $(1)$
$\text{(5d)}$: $\int_{I_k}|\sin(n\pi x)|\,\mathrm{d}x=\frac2\pi\int_{I_k}\mathrm{d}x$
$\text{(5e)}$: triangle inequality
$\text{(5f)}$: apply $(4)$
Since $\epsilon\gt0$ was arbitrary, inequality $(5)$ says that
$$
\lim_{n\to\infty}\int_0^1f(x)\,|\sin(n\pi x)|\,\mathrm{d}x=\frac2\pi\int_0^1f(x)\,\mathrm{d}x\tag6
$$
A: Some thoughts
By the identity
$$\left|\sin x\right| = \frac{2}{\pi}-\sum_{k = 1}^\infty \frac{4}{\pi(4k^2-1)}\cos(2k x),$$
we have
$$\int_0^1 f(x) |\sin (n\pi x)| \mathrm{d} x
= \frac{2}{\pi}\int_0^1 f(x) \mathrm{d} x
- \sum_{k=1}^\infty I(k, n)$$
where
$$I(k, n) = \int_0^1 \frac{4 f(x)}{\pi(4k^2-1)}\cos(2k n\pi x) \mathrm{d} x.$$
By Riemann-Lebesgue Lemma, we have, for each fixed $k\ge 1$,
$$\lim_{n\to \infty} I(k, n) = 0.$$
By Tannery's theorem https://en.wikipedia.org/wiki/Tannery%27s_theorem,
we have
$$\lim_{n\to \infty} \sum_{k=1}^\infty I(k, n) = 0.$$
Tannery's theorem:
Let $S_n=\sum_{k=0}^\infty a_k(n)$ and $\lim_{n\to\infty}a_k(n)=b_k$. If $|a_k(n)|\le M_k$
and $\sum_{k=0}^\infty M_k < \infty$, then $\lim_{n\to\infty}S_n=\sum_{k=0}^\infty b_k$.
