Computing $\lim_{n \rightarrow\infty} \int_{a}^{b}\left ( f(x)\left | \sin(nx) \right | \right )$ with $f$ continuous on $[a,b]$
Solution 1:
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$$
Solution 2:
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.