How can I show that this sequence of integrals goes to zero? $$\int_0^{2\pi} f(x)\cos(nx)dx$$
for $f(x)$ real valued and continuous on $[0,2\pi]$.
How can I show that the limit of the integrals, as n goes to infinity, is zero?
I have thought of and tried integration by parts, with not much insight gained.
I also thought that perhaps the Fourier transform is lurking in the background of this problem, but I'm not sure how to utilize it.
 A: As an alternative, I'll give you a proof that relies only on uniform continuity of $f$ and the Riemann integral.
For any $\epsilon > 0$ there exists $\delta > 0$ such that $|f(x)-f(y)|<\epsilon$ whenever $|x-y| < \delta$ and $x,y\in[0,2\pi]$. This can be done because $f$ is uniformly continuous on $[0,2\pi]$. Choose $N$ large enough that $2\pi/N < \delta$. Define $x_j=j\frac{2\pi}{N}$ for $j=0,1,2,\cdots,N$. Let
$$
              x_j^{\star}=\frac{1}{2}(x_{j-1}+x_j).
$$
Then
$$
              |f(x)-f(x_j^{\star})| < \epsilon/4\pi \mbox{ whenever } x \in [x_{j-1},x_j].
$$
Define $f_N(x)$ so that $f(x)=f(x_j^{\star})$ for $x \in [x_{j-1},x_j)$. This works fine for all of the intervals up to $j=N$. For $j=N$, let $f_N(x)=f(x_N^{\star})$ for $x \in [x_{j-1},x_j]$. Then
$$
                     |f(x)-f_N(x)| < \epsilon/4\pi, \;\;\; x \in [0,2\pi].
$$
Then
$$
   \left|\int_{0}^{2\pi}f(x)\cos(nx)dx-\int_{0}^{2\pi}f_N(x)\cos(nx)dx\right| < \frac{\epsilon}{2}.
$$
And
\begin{align}
      \int_{0}^{2\pi}f_N(x)\cos(nx)dx 
   & = \sum_{j=1}^{N}f(x_j^{\star})\int_{x_{j-1}}^{x_j}\cos(nx)dx \\
   & = \sum_{j=1}^{N}f(x_j^{\star})\frac{\sin(nx_{j})-\sin(nx_{j-1})}{n}.
\end{align}
Now you can choose $K$ large enough that the sum on the right is bounded by $\epsilon/2$ whenever $n > K$. It follows that
$$
         \left|\int_{0}^{2\pi}f(x)\cos(nx)dx\right| < \epsilon \mbox{ whenever } n > K.
$$
