Lemma by Riemann-Lebesgue The purpose of this problem is that I want to prove that for any $\lambda$ integrable function $f$ on a bounded closed interval $[a, b]$ holds
$$
\lim _{n \rightarrow \infty} \int_{[a, b]} f(x) \sin (n x) d \lambda=0.
$$
I have submitted a proof below.
 A: Let $G$ denote the set of all $\lambda$-integrable functions $f$ on $[a, b]$ that satisfy this condition.
We prove this Lemma in 3 steps.
(a) We prove that a finite linear combination of functions from $G$ is also in $G$.
(b) We prove: if $\left\{f_{k}\right\}$ is a sequence of functions from $G$ and holds
$$
\lim _{k \rightarrow \infty} \int_{[a, b]}\left|f_{k}-f\right| d \lambda=0 .
$$
for a $\lambda$-integrable function $f$, then $f \in G$ holds.
(c) We show that the following functions $f$ are in $G$:
i. $f=\mathbf{1}_{I}$ for an interval $I \subset[a, b]$;
ii. $f=\mathbf{1}_{A}$ for a Lebesgue measurable set $A \subset[a, b]$;
iii. $f$ is an elementary function;
iv. $f$ is a $\lambda$-integrable function.

(a) If $\left\{f_{k}\right\}_{k=1}^{N}$ is a finite sequence of $G$, we obtain for its linear combination
$$
f=\sum_{k=1}^{N} \alpha_{k} f_{k} .
$$
Then follows
$$
\lim _{n \rightarrow \infty} \int_{J} \sum_{k=1}^{N} \alpha_{k} f_{k}(x) \sin (n x) d \lambda=0 .
$$
And since the linear combination is finite, it is interchangeable with the integral, so we obtain
$$
\lim _{n \rightarrow \infty} \sum_{k=1}^{N} \alpha_{k} \int_{J} f_{k}(x) \sin (n x) d \lambda=0 .
$$
and for $n \rightarrow \infty$ the value of the integral goes towards 0, so the linear combination is again in $G$.

(b) We have
$$
\left|\int_{J} f(x) \sin (n x) d \lambda\right| \leq \int_{J}\left|f(x)-f_{k}(x)\right||\sin (n x)| d \lambda+\left|\int_{J} f_{k}(x) \sin (n x) d \lambda\right|
$$
from which it follows for $n \rightarrow \infty$ that
$$
\limsup _{n \rightarrow \infty}\left|\int_{J} f(x) \sin (n x) d \lambda\right| \leq \int_{J}\left|f(x)-f_{k}(x)\right| d \lambda .
$$
Then for $k \rightarrow \infty$ we get
$$
\lim _{n \rightarrow \infty} \int_{J} f(x) \sin (n x) d \lambda=0
$$
and therefore $f \in G$.

(c)
i. Let $I \subset J$ be an interval, e.g. $I=[a, \beta] .$ Then for the function $f=1_{I}$ holds.
$$
\int_{J} f(x) \sin (n x) d \lambda=\int_{\alpha}^{\beta} \sin (n x) d x=\frac{\cos (n \alpha)-\cos (n \beta)}{n} \rightarrow 0 \text { for } n \rightarrow \infty 
$$
such that $1_{I} \in G$. It follows that the function $1_{A}$ is also in $G$ if $A$ is a finite disjoint union of intervals.
ii. Let $A \subset J$ be a Lebesgue measurable set. By definition of measurable sets, for each $k$ there exists a set $A_{k}$ which is a finite disjoint union of intervals with
$$
\mu\left(A \vartriangle A_{k}\right)<\frac{1}{k} .
$$
Then
$$
\int_{J}\left|\mathbf{1}_{A}-\mathbf{1}_{A_{k}}\right| d \lambda=\mu\left(A \vartriangle A_{k}\right)<\frac{1}{k}
$$
from which follows
$$
\int_{J}\left|\mathbf{1}_{A}-\mathbf{1}_{A_{k}}\right| d \lambda \rightarrow 0 \text { for } k \rightarrow \infty .
$$
Since all $1_{A_{k}} \in G$ then $1_{A} \in G$.
iii. Every elementary function on $[a, b]$ is also in $G$ as a linear combination of indicator functions.
iv. For any non-negative $\lambda$-integrable function $f$, there is a sequence $\left\{\varphi_{k}\right\}$ of elementary functions with $\varphi_{k} \leq f, \varphi_{k} \rightarrow f$ which converges pointwise and it also holds that
$$
\int_{J} \varphi_{k} d \lambda \rightarrow \int_{J} f d \lambda .
$$
Since $f-\varphi_{k} \geq 0$, it follows that.
$$
\int_{J}\left|f-\varphi_{k}\right| d \lambda \rightarrow 0
$$
Since $\varphi_{k} \in G$, we obtain that $f \in G$ as well. Any (signed) $\lambda$-integrable function $f$ lies in $G$ as the difference $f_{+}-f_{-}$of two functions $f_{+}$and $f_{-}$from $G$.
$\quad \blacksquare$
A: Another is aproach of Riemann-Lebesgue Lemma.
The smooth functions with compact suppport $\mathcal{C}_0^{\infty}([a,b])$ functions are dense over the Lebesgue integral functions $L^1[a,b]$. Then for every $f$ there is a sequence $(f_{k})_k \subset \mathcal{C}_0^{\infty}([a,b]) $ such that $\|f-f_k\|_1 \xrightarrow{k\to \infty}{0}$. We observe that
\begin{align} 
\left | \int_a^b f_k(x)\sin(nx)dx \right|= \left| -\frac{1}{n} \int_a^b f_k'(x)\cos(nx)dx \right| = \frac{1}{n^2} \left| \int_a^b f_k''(x)\sin(nx)dx \right| \leq \frac{M_k}{n^2} \xrightarrow{n\to \infty}{0} 
\end{align}
Where $M_k = \sup_{x\in[a,b]} |f''_k(x)|(b-a) < \infty$. Now
\begin{align}
\left | \int_a^b f(x)\sin(nx)dx  \right| &\leq \left | \int_a^b f_k(x)\sin(nx)dx  \right|  + \left | \int_a^b (f(x)-f_k(x))\sin(nx)dx  \right|
\\
& \leq \frac{M_k}{n^2} + \|f_k-f\|_1 \xrightarrow{n\to \infty} \|f_k-f\|_1 \xrightarrow{k \to \infty} 0. 
\end{align}
