Suppose $f(x)$ is a continuous function on the interval $[a,b]$. Show that $$\int_{a}^{b}f(x)\cos(Nx)dx \rightarrow 0$$ as $N \rightarrow \infty$ by approximating $f$ by a polynomial.
Since $f$ isn't necessarily differentiable, we cannot simply integrate by parts and take the limit. This integral looks like the Fourier cosine series for $f$ if we divide out the constant part. Therefore, I was thinking of perhaps using Bessel's inequality to conclude that these coefficients will go to zero assuming $||f||^2$ is bounded. However, I am not sure why we need to approximate $f$ by a polynomial. Doesn't $f$ being continuous already imply that $||f||^2$ is bounded and thus our Fourier cosine coefficients will go to zero?
I do agree with you that Bessel’s inequality allows to get the conclusion.
However, you’re invited to use another route with Weierstrass approximation theorem, as the result stands for polynomials as can be shown by integration by part or using complex exponential.