Computing $\lim_{n \rightarrow\infty} \int_{a}^{b}\left ( f(x)\left | \sin(nx) \right | \right )$ with $f$ continuous on $[a,b]$ Let $a,b \in \mathbb{R}$ and $\textit{f} :[a,b] \rightarrow \mathbb{R}$ continuous on $[a,b]$.
Does the sequence $\left (\int_{a}^{b} f(x)\left |\sin(nx) \right |dx \right )$ converge? If it does, what is its limit ?
I know how to solve this for $\left(\int_{a}^{b} f(x)\sin(nx)dx \right )$ with integration by parts when $f$ is a class $C^1$ function.
Here, I don't know how to deal with the absolute value and the non-differentiability of $\textit{f}$.
Any help is appreciated, thanks in advance.
 A: I got it:


*

*Let $I_n=\int_{a}^{b} f(x)\left |\sin(nx) \right |dx $

*Let $p_n$ be the root of $sin(nx)$ that is closest to $a$ and $q_{n}$ the root of $sin(nx)$ that is closest to $b$ with $a<p_n$ and $ q_n<b$, then  $p_n$ and $q_n$ are both multiples of $\frac{\pi}{n}$

*Let's define a partition of $[a,b]$ $a=t_0<t_1=p_n<\ldots<t_{B_n-1}=q_n<t_{B_n}=b$ where the other $t_i$ are all the multiples of $\frac{\pi}{n}$ $\in ]p_n,q_n[$
then $$I_n=\int_{a}^{p_n} f(x)\left |\sin(nx) \right |dx + \int_{p_n}^{q_n} f(x)\left |\sin(nx) \right |dx+\int_{q_n}^{b} f(x)\left |\sin(nx) \right |dx$$


*

*Let's deal with $\int_{p_n}^{q_n} f(x)\left |\sin(nx) \right |dx$


It can be rewritten as $$\sum _{ k=1 }^{  B_n -1 }{ \int _{ t_k }^{ t_{k+1} }{ f(x)\left |\sin(nx) \right |dx }  } $$
According to the mean value theorem, For every $[t_k,t_{k+1}]$, there exists an $x_k$ such that $ \int _{ t_k }^{ t_{k+1} }{ f(x)\left |\sin(nx) \right |dx } = f(x_k)\int _{ t_k }^{ t_{k+1} }{\left |\sin(nx) \right |dx }$
It can be easily proven that $\int _{ t_k }^{ t_{k+1} }{\left |\sin(nx) \right |dx } = 2/n$
Then $$\int_{p_n}^{q_n} f(x)\left |\sin(nx) \right |dx = \sum _{ k=1 }^{ B_n -1 }{ f(x_k)2/n} = \sum _{ k=1 }^{ B_n -1 }{ (t_{k+1}-t_k)f(x_k)\frac{2}{\pi}}$$
$\sum _{ k=0 }^{ B_n }{ (t_{k+1}-t_k)f(x_k)}$ is a Riemann sum which converges to $\int_{a}^{b} f(x) dx$ since the norm of the partition is $\pi/n$
Then $$ \sum _{ k=1 }^{ B_n -1 }{ (t_{k+1}-t_k)f(x_k)} $$ converges to $\int_{a}^{b} f(x) dx$ as n goes to infinity
Hence $$\frac{\pi}{2}\int_{p_n}^{q_n} f(x)\left |\sin(nx) \right |dx$$ converges to $\int_{a}^{b} f(x) dx$


*

*Let's deal with the remaining integrals.


Since $f$ is continuous on $[a,b]$, it is bounded by say $M$.
$| \int_{a}^{p_n} f(x)\left |\sin(nx) \right |dx | \leq M|\int_{a}^{p_n} \left |\sin(nx) \right |dx \leq M(p_n -a) \leq Mπ/n$
Therefore both remaining terms go to 0.


*

*Conclusion: $I_n$ converges to $$\frac{2}{\pi}\int_{a}^{b} f(x) dx$$

A: We should perhaps try to explain that $f(x)$ and $\sin(nx)$ are "asymptotically independent" as $n \to \infty$, so
$$
\lim_{n\to\infty}\frac{1}{b-a}\int_a^b f(x)\,|\sin(nx)|\,dx = \frac{1}{b-a}\int_a^b f(x)\,dx \cdot \frac{1}{\pi}\int_0^\pi \sin(x)\, dx
$$
which agrees with Gabriel's answer.
A: A hint: For a given $n\gg 1$ consider partitions 
$$a=t_0<t_1<\ldots<t_N=b$$ of $[a,b]$ such that the $t_k$ with $1\leq k\leq N-1$ are the zeros of $x\mapsto \sin (n x)$ on $[a,b]$. Consider besides $f$  a step function $\tilde f$ assuming in each subinterval $[t_{k-1},t_k]$ a suitable constant value, see the edit below. Compare the integrals, and in the end use the uniform continuity of $f$ on $[a,b]$.
Edit. You may use the following version of the mean value theorem of integral calculus: When $f$ is continuous on $[u,v]$ and $g(x)\geq0$ on $[u,v]$ then there is a $\xi\in[u,v]$ such that
$$\int_u^v f(x)g(x)\ dx= f(\xi) \int_u^v g(x)\ dx\ .$$
