Prove that $ \int_a^x f\,dx=0$ for all $x\in [a,b]$ implies $ \int_a^b fg\,dx=0$ for any integrable $g$.

integrationreal-analysisriemann-integration

Let $f$ be a (Riemann) integrable function such that $\displaystyle \int_a^x f\,dx=0$ for all $x\in [a,b]$.
Prove that $\displaystyle \int_a^b fg\,dx=0$ for any integrable $g$.

The question will be easy if we assume that $f$ is continuous, since the given condition will imply $f=0$ everywhere.
However, when $f$ is only required to be integrable, it can be some strange function, like the popcorn function. In this case, I have no idea how to start with, and I can only hope that the given condition will imply $\displaystyle \int_a^b f^2\,dx = 0$.
Then we can use the Cauchy inequality
$$\left(\int_a^b fg \,dx\right)^2\leq \left(\int_a^b f^2 \,dx \right) \left( \int_a^b g^2 \,dx\right)=0$$

Best Answer

If $g$ is integrable in the Riemannian sense, then $g$ is bounded. Say $$ m \leq g(x) \leq M $$ for all $x \in [a,b]$. Then by monotonicity of the integral we have that

$$ m \int_a^b f(x) dx \leq \int_{a}^b f(x) g(x) dx \leq M \int_{a}^{b} f(x) dx. $$

Yet $$ \int_a^b f(x) dx = 0 $$ therefore $$ 0 \leq \int_a^b f(x) g(x) dx \leq 0. $$

As was pointed out in the comment below, this works for $f \geq 0$. To fix this write observe that $$ \int_a^b f(x) dx = 0 \Rightarrow \int_a^b f^2(x) dx = 0. $$ A proof of this fact is done below. Then run the above argument with $f^2(x)$ instead of just $f$.