On $I = [0, 2π]$ consider the function $f : I → \mathbb{R}$ to be convex. Define:
$$a_k\pi := \int_0^{2\pi}f(x) \cos(kx)\,dx$$
Show that the convexity of $f$ implies that $a_k ≥ 0$ when $k ≥ 1$.
Integrating by parts:
$$\left\lbrace\frac{f(x)\sin(kx)}{k}\right\rbrace_0^{2\pi} - \frac{1}{k} \int_0^{2\pi} f'(x) \sin(kx)\,dx$$ Now I have two problems:
(i) I do not know whether $f$ is continuous at the boundaries
(ii) I do not know whether $f'$ exists
For (i) and (ii) I have the following hints that I must use and cannot make any regularity assumption on $f$:
Solve (i) by proving that : $$\lim_{\epsilon\rightarrow 0}\frac{f(2\pi-\epsilon)\sin(2\pi-\epsilon)}{k}=0 \ \ \ \ \ \lim_{\epsilon\rightarrow 0}\frac{f(\epsilon)\sin(\epsilon)}{k}=0$$ but it is not clear to me how.
For solving (ii), substitute $f'$ with the left-derivative $$f'_{-}(x):=\lim_{h\rightarrow 0}\frac{f(x+h)-f(x)}{h}$$ which should always exist (??) and by convexity, be non-decreasing.
Now to prove:
$$\int_0^{2\pi}f'_{-}(x) \sin(kx)\,dx\leq 0 \tag{$*$}$$ $$\int_0^{2\pi}f'_{-}(x) \sin(kx)\,dx =\sum_{j=0}^{y-1}\int_{\frac{2\pi j}{y}}^{\frac{2\pi (j+1)}{y}}f'_{-}(x) \sin(kx)\,dx= \sum_{j=0}^{y-1} \int_{\frac{2\pi j}{yk}}^{\frac{2\pi (j+1)}{ky}}f'_{-}(\frac{z}{k}) \frac{\sin(z)}{k}dz$$ where the last equality comes from changing variable: $z=kx$.
Now I guess that in order to prove $(*)$ I should prove that each term in the last sum is non-positive, using the fact that $f'_{-}$ is non-decreasing, but I do not see how.
Any help?