Application to Fourier series I have seen the following problem in a test, and there are some elementary solutions to it. I am curious if there is a solution involving Fourier series.
Here it is:

Let $(a_n),(b_n)$ be two sequences of reals such that $$ \lim_{n \to \infty} a_n \cos(nx)+b_n \sin(nx)=0,\ \forall x \in (c,d) $$ where $c<d$ are two real numbers. Prove that $ a_n,b_n \to 0$.

I am interested in a solution using Fourier series. Thank you.
 A: I think it's going to be hard to find a Fourier series proof that isn't totally artificial since there aren't any series in the problem. But I can think of a real analysis proof that isn't elementary.
Let $f_n(x) = a_n\cos(nx) + b_n\sin(nx)$. Then there is some $\alpha_n$ such that 
$f_n(x) = (a_n^2 + b_n^2)\cos(nx - \alpha_n)$. If $n$ is large enough, an entire period of $f_n(x)$ will be contained in $(c,d)$. So the measure of the set of $x$ in $(c,d)$ for which $|f_n(x)| > {1 \over 100}(a_n^2 + b_n^2)$ will be at least ${1 \over 2}(d - c)$ if $n$ is large enough.
But a sequence of functions that converges pointwise on an interval converges in measure to the same limit. So given $\epsilon > 0$, for large enough $n$ you'd also have to have the measure of $\{x \in (c,d): |f_n(x)| > \epsilon\}$ would have to be less than ${1 \over 2}(d - c)$. The only way this is compatible with the above is that for large enough $n$, you have ${1 \over 100}(a_n^2 + b_n^2) < \epsilon$. And this is the same as saying that $\lim_{n \rightarrow \infty} a_n = \lim_{n \rightarrow \infty} b_n = 0$.
A: After my wrong attempt yesterday here is a (hopefully correct) proof that avoids measure theory.
Let $A_n:=\sqrt{a_n^2+b_n^2}$ be the amplitude of $f_n(x):=a_n\cos(nx)+b_n\sin(nx)$. We have to prove that $\lim_{n\to\infty} A_n=0$.
If this is not the case then there is an $\epsilon>0$ such that $A_n\geq 2\epsilon$ for infinitely many $n$. We are going to construct a selection sequence $n_j \to\ \infty$ $(j\to\infty)$ and a sequence of nested closed intervals $I_j\subset\  ]c,d[\ $ $\ (j\geq1)$ of positive length $|I_j|$, such that
$$f_{n_j}(x)\ \geq\ \epsilon\quad(x\in I_j)\qquad\qquad(*)$$
for all $j\geq1$. Given these sequences there is a point $\xi$ which belongs to every $I_j$, and for this point $\xi$ we have $f_{n_j}(\xi)\geq\epsilon$ for all $j\geq1$. This would violate the assumption $\lim_{n\to\infty}f_n(\xi)=0$.
To initialize the two sequences $(n_j)_{j\geq1}$ and $(I_j)_{j\geq1}$ we put $n_0:=0$ and $I_0:=\ ]c,d[\ $. Now the recursion step: Given $n_{j-1}$ and $I_{j-1}$ (of positive length) for some $j\geq1$, there is a $n_j>n_{j-1}$ such that $${\rm (a)}\quad  {2\pi\over n_j}<|I_{j-1}|\ ,\qquad{\rm (b)}\quad A_{n_j}\geq2\epsilon\ .$$
It follows that $I_{j-1}$ contains a full period of $f_{n_j}$; therefore there exists a closed interval $I_j\subset I_{j-1}$ of positive length such that $(*)$ holds.
A: This argument uses Fourier series, but with the assumption that $(a_n,b_n)$ is bounded (I can't found a way to prove this without somehow proving that it converges to $0$. Anyone is free to suggest a solution).
It is harmless to suppose that $(c,d)=\mathbb{R}$. Since $(f_n)$ converges pointwise to zero and is bounded, the Dominated Convergence Theorem shows that it converges in $L^1(S^1)$-norm. Since the Fourier transform $L^1(S^1) \rightarrow L^\infty(\mathbb{Z})$ is continuous, its Fourier coefficients go to $0$.
A: Tying to prove that the sequences $a_n$ and $b_n$ are bounded (to fill in the gap in user10676's approach), the following argument - using Baire category - turned up:
Let $\epsilon > 0$ be given. Define $F_N = \{x\in (c,d)\;|\;|f_n(x)|\le\epsilon \quad \forall n \ge N \}$. We have 
$$(c,d)=\bigcup_{N \in \mathbb N} F_N$$
 by pointwise convergence and furthermore the sets $F_N$ are closed by continuity of the functions $f_n$. 
By the Baire category theorem there must be $N_0$ such that $F_{N_0}$ has nonempty interior. Choose two points $s,t$ such that $(s,t)\subset F_{N_0}$. Note that then in particular we have that $(s,t) \subset F_N$ for all $N>N_0$.
Supposing $N_0$ to be large enough (making it bigger will do no harm), the congruences 
\begin{eqnarray*}
Nx &\equiv& 0 \pmod{2\pi}\\
Ny &\equiv& \frac\pi 2 \pmod{2\pi}
\end{eqnarray*}
have solutions in $(s,t)$ for all $N>N_0$. 
But then for any $N>N_0$, choosing $x,y$ as above
\begin{eqnarray*}
|a_N| &=& |a_N\cos(Nx) + b_N\sin(Nx)| \le \epsilon \\
|b_N| &=& |a_N\cos(Ny) + b_N\sin(Ny)| \le \epsilon
\end{eqnarray*}
because $x,y\in (s,t)\subset F_{N_0}$.
This proves that the sequences $a_n$ and $b_n$ converge.
