Let $f:[a,b]\to\mathbb R$. Evaluate $\lim_{n\to\infty}\int_a^bf(x)\sin(nx)\,dx$ 
Let $f:[a,b]\to\mathbb R$. Evaluate $\lim_{n\to\infty}\int_a^bf(x)\sin(nx)\,dx$.

$f$ is continuously differentiable.
I'm told this can be done using basic calculus. It's difficult for me to see where I should begin. I'd like some hints.
 A: If the function $f$ is continuous the limit is $0$. Just notice that $f$ is uniformly continuous, and that on every small interval $[2k\pi/n,(2k+2)\pi/n]$ the function $sin(nx)$ has integral $0$ while $f$ is close to a constant. So the integral will be close to $0$.
In general consider the piecewise constant function obtained replacing $f$ with its mean value on every such small intervals... and prove that the integral of the difference (between $f$ and the piecewise constant function) goes to zero. In practice you want to find $f_n$ such that 
$$
  \left\vert \int_a^b f(x) \sin(nx)\right\vert \le \left\vert \int_a^b (f(x)-f_n(x)) \sin(nx)\right\vert + \left\vert \int_a^b f_n(x) \sin(nx)\right\vert = \int_a^b \lvert f(x)-f_n(x)\rvert < \varepsilon.
$$
A: This (classical) result goes by the name of Riemann-Lebesgue lemma. In the comment above I cited an exposition of proof for $f$ that is Riemann integrable. Here I consider the general case of $f\in L^1(\mathbb{R^d})$ and its Fourier transform
$$\widehat{f}(\xi) = \int_{\mathbb{R^d}} f(x)e^{-2\pi ix\xi} dx. $$
The  claim is that $\widehat{f}(\xi)\rightarrow 0$ as $|\xi|\rightarrow\infty$.
Let $\xi' = \frac{1}{2}\frac{\xi}{|\xi|^2}$ so that $|\xi'|\rightarrow 0$ as $|\xi|\rightarrow\infty$. Next, by translation invariance of the integral
\begin{align}
\widehat{f}(\xi) &= \int_{\mathbb{R^d}} f(x-\xi')e^{-2\pi i(x-\xi')\xi} dx\\
&= \int_{\mathbb{R^d}} f(x-\xi')e^{-2\pi ix\xi} e^{2\pi i\xi'\xi} dx
=\int_{\mathbb{R^d}} -f(x-\xi')e^{-2\pi ix\xi}  dx
\end{align}
since $e^{2\pi i\xi'\xi} = e^{\pi i} =-1$. We can now write
\begin{align}
\widehat{f}(\xi) &= \frac{1}{2}\int_{\mathbb{R^d}} [f(x)-f(x-\xi')]e^{-2\pi i(x-\xi')\xi} dx
\end{align}
so that $|
\widehat{f}(\xi)|\le ||f-f_{\xi'}||_{L^1}$ where $f_{\xi'}(x)=f(x-\xi')$ is the translation of $f$ by $\xi'$. We are done because translations are continuous with respect to the norm. Let's make this statement precise.
For $f\in L^1(\mathbb{R^d})$, $||f-f_{h}||_{L^1}\rightarrow 0$ as $h\rightarrow 0$. We use the fact that continuous functions with compact support are dense in $L^1$. Let $g\in C_0(\mathbb{R}^d)$ such that $||f-g||\le\epsilon$, then $||f_h-g_h||\le \epsilon$. By (uniform) continuity of $g$, we have that $||g-g_h||\rightarrow 0$ as $h\rightarrow 0$. claim follows by triangle inequality.
A: $\lim_{n\to\infty}\int_a^bf(x)\sin(nx)\,dx=-\frac{1}{n}\cos (nx)f(x)|_{a}^{b}+\int_{a}^{b}{\frac{1}{n}\cos (nx)f'(x)}$ $$=-\frac{1}{n}\cos (nx)f(x)+\frac{1}{n^2}\sin(nx)f'(x)|_{a}^b-\int_{a}^b\frac{1}{n^2}\sin(nx)f''(x) dx$$ $$\cdots$$ Let us determine the value of the expression outside of the integration sign. Obviously $\displaystyle{\frac{1}{n}\cos (na)f(a)-\frac{1}{n}\cos (nb)f(b)=0}$ (as $n\to 0$). A similar calculation follows for the other expressions which are not integrands. 
If the function $f(x)$ is $k$-differentiable, after $k$ steps, it will become a constant. If it it is infinitely differentiable, then too, it will be divided by a very huge power of $n$ in every step. As $n\to\infty$, after some point, all the terms in this representation will$\to 0$. 
