The following hint is given: "Show first that it can not tend to a non $0$ limit. Use the Riemann-Lebesgue lemma". Riemann Lebesgue Lemma says that if f is integrable, then $\int_{R} f(x)cos(nx) dx \to 0 $ as $ n \to \infty$ and same for the sine.
My attempt: Let $ f_n(x)= [cos(nx) cos(a_n) - sin(nx) sin(a_n)]1_E (x), then |f_n(x)|\leq 2 (1_E(x))$ and since the indicator is integrable on R, we have by dominated convergence theorem that if $f_n(x) \to f(x)$ then $\int f_n(x) \to \int f(x).$ Now if $f_n(x)$ tends to a non $0$ limit, then $\int_R cos(a_n) 1_E(x) cos(nx) - \int_R sin(a_n) sin(nx) 1_E(x)dx \to c \neq 0$. But the problem is I don't see how this contradicts the lemma since $cos(a_n) 1_E(x)$ and $sin(a_n) 1_E(x)$ are not functions of x only, they depend on n as well.. Can anyone help me out with this?
Note: $a_n$ is a given sequence.
Note that $\cos(nx + a_n) = \cos(nx) \cos(a_n) - \sin(nx) \sin(a_n)$.
For any set $E$ of finite measure, $$ \int_E \cos(n x + a_n)\; dx = \cos(a_n) \int_{\mathbb R} 1_E(x) \cos(nx)\; dx - \sin(a_n) \int_{\mathbb R} 1_E(x) \sin(nx)\; dx$$ By Riemann-Lebesgue, $\int_{\mathbb R} 1_E(x) \cos(nx)\; dx$ and $\int_{\mathbb R} 1_E(x) \sin(nx)\; dx$ go to $0$, thus so does $\int_E \cos(nx + a_n)\; dx$. But if $\cos(nx + a_n) \to c \ne 0$ on $E$, we'd have $\int_E \cos(nx + a_n)\; dx \to c\; m(E)$. So this says you can't have a nonzero limit on any set of positive measure.
EDIT: For the second part, note that $\cos(2 n x + 2 a_n) =2 \cos^2(n x + a_n) - 1$.