Showing $\int\limits_a^b h(x)\sin(nx) dx \rightarrow 0$ Let $h\in C_0([a,b])$ arbitrary, that is $h$ is continuous and vanishes on the boundary.
I want to show that
$\int\limits_a^b h(x)\sin(nx)dx \rightarrow 0$.
If $h\in C^1$, integration by parts immediately yields the claim, since $h'$ is continuous and thence bounded on the compact interval, using also the zero boundary condition.
However, I believe the statement is also true for all $h\in C_0([a,b])$. My idea is to approximate $h$ by functions $h_m \in C_0^1([a,b])$. Then for all $m$,
$$\begin{equation*}
\lim_{n \to \infty} \int h_m(x) \sin(nx) dx = 0.
\end{equation*}$$
$$\begin{align*}
\Rightarrow ~~~ \lim_{n \to \infty} \int h(x)\sin(nx) dx &= \lim_{n \to \infty} \int \lim_{m \to \infty} h_m(x)\sin(nx) dx\\ &= \lim_{m \to \infty}(\lim_{n \to \infty} \int h_m(x)\sin(nx) dx)\\ &= \lim 0 = 0.
\end{align*}$$
This is fine iff the second equality is. In fact, this is two different steps, as three limiting processes are involved. Hence the questions:
First, can I make sure that I can interchange the $m$-limit with the integral sign? (Can I assume that $h_m$ converges uniformly? Or use some sort of Dominated Convergence Theorem?)
And second, may I swap the $n$-limit for the $m$-limit? (The $n$-limit is in fact $C/n \to 0$)
I hope it's not too messy. Many thanks for any kind of help!
 A: I think this is from Apostol. It is an informal approach to the following Lemma, if I'm not recalling wrongly:
Let $f$ be integrable in $[a,b]$. Then
$$\lim \limits_{\lambda  \to \infty } \int\limits_a^b  f\left( x \right)\sin \lambda xdx = 0$$
$(1)$ Let $f$ be constant. Then 
$$\lim \limits_{\lambda  \to \infty } \int\limits_a^b  k\sin \lambda xdx = \left.-k\frac{\cos \lambda x}{\lambda}\right]_a^b=0$$
$(2)$ Let $f$ be a step function over $[a,b]$, viz
$$f(x) = \begin{cases} k:a< x\leq a_1  \cr k_1: a_1<x \leq a_2 &\cr \cdots \cr k_n :a_n<x\leq b \end{cases}$$
Then by the last result,
$$\lim \limits_{\lambda  \to \infty } \int\limits_a^b  f\left( x \right)\sin \lambda xdx = 0$$
$(3)$ Since for an integrable $f$ there exist two step functions such that $$\int_a^b |f(x)-s(x)|dx<\epsilon$$
$$\int_a^b |s_1(x)-f(x)|dx<\epsilon$$
we can "conclude".
IMPORTANT: If anyone can make this more detailed, precise and formal, please, do so. 
A: We can apply Stone-Weierstrass: polynomial are dense in $C_0([a,b])$ endowed with the supremum norm. We can also choose such a sequence vanishing at the boundary. Indeed, if $\{P_n\}$ is a sequence of polynomial converging uniformly to $h$, then $Q_n(x)=P_n(x)-P_n(a)-\frac{x-a}{b-a}(P_n(b)-P_n(a))$, we have $Q_n(a)=0=Q_n(b)$ and 
$$\sup_{a\leq x\leq b}|Q_n(x)-h(x)|\leq \sup_{a\leq x\leq b}|P_n(x)-h(x)|+2|P_n(a)|+|P_n(b)|.
$$
Now, fix $\{P_m\}$ a sequence of polynomials such that $\sup_{a\leq x\leq b}|P_m(x)-h(x)|\leq \frac 1m$ and $P_m$ vanishes at the boundary. We have for a fixed $m$ that 
\begin{align}\left|\int_a^bh(x)\sin(nx)dx\right|&\leq \int_a^b|h(x)-h_m(x)||\sin(nx)|dx+
\left|\int_a^bh_m(x)\sin(nx)dx\right|\\
&\leq \frac{b-a}m+\left|\int_a^bh_m(x)\sin(nx)dx\right|
\end{align}
hence by the $C^1$ case, for each $m$ 
$$\limsup_{n\to +\infty}\left|\int_a^bh
(x)\sin(nx)dx\right|\leq \frac{b-a}m$$
and we can conclude. 
