Let $\phi \in C^\infty(\mathbb R)$ be a function such that $\phi(x), \phi'(x) \to 0$ as $x \to \infty$.
I want to show that $$\lim_{n \to \infty} \int_\mathbb R \cos(nx) \phi(x) \ dx = 0$$
Doing it by parts, I get $\int_\mathbb R \cos(nx) \phi(x) \ dx = - \int_\mathbb R \frac 1n \sin (nx) \phi'(x) \ dx$
It is easy to see that $\frac 1n \sin (nx) \phi'(x)$ converges pointwise to $0$. It is difficult though to find a function that dominates it, so I can't apply the lebesgue dominated convergence theorem.
But $$\sup \left|\frac 1n \sin (nx) \phi'(x)\right| \le \frac{\sup | \phi'(x)| } n \to 0$$ so the functions converges uniformily to $0$ and I can bring the limit inside the integral sign and it is proven
Is it a correct proof of this fact?
P.S. Actually $\phi(x)$ are supposed to be in the Schwartz space $\mathcal S$, but I believe that the it is still true with the limited assumptions. Also it is easier to understand this way
The proof is not correct. It would work if $\phi'$ were integrable.