Integration inequality from ISI Entrance Examination Let $f(x)$ be a continuous function, whose first and second derivatives are continuous on $[0,2\pi]$ and $f''(x)\ge 0$ for all $x\in [0,2\pi]$. Show that $$\int_0^{2\pi}f(x)\cos x dx\ge 0$$.

Let us complete your attempt.
According to the mean value theorems for definite integrals there is a $c\in (0,2\pi)$ such that
\begin{equation*}
 \int_{0}^{2\pi}f''(x)\cos x\, \mathrm{d}x = \cos(c)\cdot\int_{0}^{2\pi}f''(x)\, \mathrm{d}x = \cos(c)(f'(2\pi)-f'(0)).
\end{equation*}
Consequently
\begin{equation*}
 I= (f'(2\pi)-f'(0))(1-\cos(c))\ge 0.
\end{equation*}
