The Riemann-Lebesgue lemma states that if $f$ is integrable on $\mathbb{R}$, then $\lim_{n\to\infty}\int{f(x)e^{inx}dx}=0 $.
It is easy to prove the case when $f$ is an indicator function on an interval, but I stuck to prove that the same thing holds when $f=\chi_E$ where $E$ is any Lebesgue measurable set.
Of course this trivially holds when $E$ has measure zero, but how about the remaining case?
Any hints or advices will help a lot! Thanks!
Since $f$ is integrable, the set $\{x: |f(x)|>a\}$ cannot have infinite measure unless $a=0$. Therefore, we may assume that $E$ has finite Lebesgue measure.
For any $\epsilon>0$, choose an open set $O\supset E$ such that $m(O\backslash E)<\epsilon/2$. Since $E$ has finite measure, $O$ must have finite measure, too.
Since $O = \cup_{i=1} ^\infty (a_i,b_i)$ where $(a_i, b_i)$'s are disjoint and $\sum_{i=1}^\infty (b_i -a_i)<\infty$, we can choose $n\in \mathbb{N}$ such that $m(E\cap O_n)>m(E)-\epsilon/2$, where $O_n=\cup_{i=1}^n (a_i,b_i)$. This yields $m(E\backslash O_n)<\epsilon/2$.
Therefore, $\int|\chi_{O_n}-\chi_E| = m(O_n \backslash E)+m(E \backslash O_n )<\epsilon $, and proceed as the given link.