The following is a question from an exam i had a while ago, didn't manage to find any direction to solve it. I think it's supposed to be solved using the Riemann-Lebesgue lemma, where $\lim_{n\to \infty} a_n,b_n=0$, where $a_n,b_n$ is the cosine and sine coefficients of the Fourier series of some function.
Problem: let $f:\mathbb{R}\to\mathbb{R}$ be a continuous function over $\mathbb{R}$, and $\forall x\in \mathbb{R}:|f(x)|\le x^4$. Show that: $$\lim_{n\to \infty} \int_{0}^{\pi}\frac{f(x)}{x}\cos(nx)dx=0$$
The problem isn't supposed to have a lengthy solution, it was given relatively a small amount of points in the exam.
Any help will be appreciated.
You can use this version of the Riemann-Lebesgue lemma:
If $g$ is Riemann integrable on $[a,b]$, then $$\int\limits_a^b g(x)\cos (nx)\, dx\rightarrow 0$$ as $n\rightarrow\infty$. It is clear that $g(x)=f(x)/x$ is continuous on $[0,\pi]$ if we take $g(0)=0$ (the only problem area is zero, and the condition that $|f(x)|\leq x^4$ takes care of that). Since continuous functions on $[0,\pi]$ are integrable, we can just apply the above result directly.