A Counterexample to the Mean Value Theorem for Integrals (Complex Case) The problem at hand is to prove the following "counterexample" to the Mean Value Theorem:
Let $f:\left[0, 2\pi\right] \to \mathbb{R}$ be Riemann-integrable, $f(x) \geq 0 \ \forall \, x \in \left[0,2\pi\right]$ and $\int_{0}^{2\pi} f(x) \text{d}x > 0$. Prove there exists a continuous function $g: \left[0, 2\pi\right] \to \mathbb{C}$, such that for all $\xi \in \left[0, 2\pi\right]$ it holds:
$$\int_{0}^{2\pi} f(x)g(x)\text{d}x \neq g(\xi)\int_{0}^{2\pi} f(x)\text{d}x$$.
Own thoughts and tries: Naturally, we notice that $g(x)\in \mathbb{C} \ \forall \, x \in \left[0,2\pi\right]$ and this already suggests an idea. For example, we know that $e^{ix} \neq 0$ for all $x \in \left[0, 2\pi\right]$ and still $\int_{0}^{2\pi} e^{ix} \text{d}x = 0$. Therefore, it would suffice to find $g : \left[0, 2\pi\right] \to \mathbb{C}$ such that $g(\xi) \neq 0 \ \forall \, \xi \in \left[0, 2\pi\right]$ and for which $\int_{0}^{2\pi} f(x)g(x)\text{d}x = 0$. So I imagine that multiplication by $g$ could result in $fg$ being shifted in a way such that "half of the integrand is below zero".
However, we still need to use the fact that $f(0)=f(2\pi)$ and I haven't got much of an idea how to utilize that. Also, there is no condition on the sign of $g$ and so boundedness claims from Riemann-integrability don't look like much help either.
Any enlightening hint or advice would be much appreciated. Ideally, it would guide towards the solution without revealing it completely (just to help get off the saddle point).
UPDATE: Actually, knowing $f(0)=f(2\pi)$ allows us to continue $f$ on $\mathbb{R}$ by means of $2\pi$-periodisation. Identifying the continuation of $f$ with $f$, write $\int_{0}^{2\pi} f(x)\text{d}x = \int_{-\pi}^{\pi} f(x)\text{d}x > 0$. Further, if we assume that g is $C_{2\pi}^{0}(\mathbb{R})$ (i.e. continuous and $2\pi$-periodic on $\mathbb{R}$) and even (i.e. $g(x)=g(-x)$ for all $x\in\left[0,2\pi\right]$), we can rewrite the integral as (since (fg) is also $2\pi$-periodic):
$$\int_{0}^{2\pi} f(x)g(x)\text{d}x = \int_{-\pi}^{\pi} f(x)g(x)\text{d}x = \int_{-\pi}^{\pi} f(x)g(-x)\text{d}x =(f * g)(0)$$
where $(f*g)$ denotes the convolution of the functions.
Following this reasoning, it suffices to find $g \in C_{2\pi}^{0}(\mathbb{R})$ - even, such that $(f*g)(0) = 0$ and $g(x) \neq 0$ for all $x \in \left[0,2\pi\right]$. Any ideas (perhaps using the Convolution theorem)?
 A: SOLUTION: It appears I went along the wrong track initially... The insightful result in the problem can be obtained by applying the Riemann-Lebesgue lemma.
First, identify $f \in L_{2\pi}^{1}(\mathbb{R})$ with its $2\pi$-periodisation (since $f$ is Riemann-integrable, it is in particular also Lebesgue-integrable). By the Riemann-Lebesgue lemma, for some $k \in \mathbb{Z}$:
$$
\left|\hat{f}(k)\right| < \frac{1}{2\pi}\left|\int\limits_{0}^{2\pi} f(x)\text{d}x\right|
$$
Set $g: \left[0,2\pi\right] \to \mathbb{C}$, $g(x) = e^{-ikx}$ for that choice of $k \in \mathbb{Z}$. Then $|g(x)|=1 \ \forall \, x \in \left[0,2\pi\right]$ and  for all $\xi \in \left[0,2\pi\right]$ we have
$$
\left|g(\xi)
\right|\left|\int\limits_{0}^{2\pi} f(x)\text{d}x\right| = \left|\int\limits_{0}^{2\pi} f(x)\text{d}x\right| > 2\pi\left|\hat{f}(k)\right|= 2\pi\left|\frac{1}{2\pi}\int\limits_{-\pi}^{\pi} f(x)e^{-ikx}\text{d}x\right| = \left|\int\limits_{0}^{2\pi}f(x)g(x)\text{d}x\right|.
$$
Thus we obtain the desired inequality.
