Let $(a_n)$ be the cosine Fourier coefficients of a piecewise smooth and continuous function $f$ on $[0,\pi].$ Prove that the series $\displaystyle \sum_{n=0}^{\infty}|a_n|$ converges.
Attempt.
For $n>0$, since $a_n=\frac{2}{\pi}\int\limits_0^\pi f(x)\cos (nx)\,dx$, we get: $$a_n=\frac{2}{n\pi}\bigg[f(x)\sin (nx)\Big|_0^\pi-\int\limits_0^\pi f'(x)\sin (nx)\,dx\bigg]=-\frac{2}{n\pi}\int\limits_0^\pi f'(x)\sin (nx)\,dx$$
and $$|a_n|\leq \frac{2}{n\pi}\int\limits_0^\pi |f'(x)|\,|\sin (nx)|\,dx\leq \frac{2M}{n\pi},$$ where $|f'|\leq M$ on $[0,\pi].$ But since the series $\displaystyle \sum\frac{1}{n}$ diverges we can not use the comparison test for series.
Thanks in advance.
I think smooth here means all derivatives exist, not just first derivative. If you do another integration by parts using second derivative you will get $|a_n| \leq \frac C {n^{2}}$ for some $C$.