Assume that $f(x)$ is continuous on $[a,b]$. And for any continuous function $g$ if $\int_a^bg(x)dx=0$ then $\int_a^bf(x)g(x)dx=0$,
show that $f(x)$ is a constant.
I tried to convert this question to show$f'(x)\equiv0$ but this seems impossible by using the mean value theorem or the Rolle theorem.
Any ideas?
Best Answer
Take $g(x)=f(x)-\dfrac{1}{b-a}\int_a^b f(x) dx$. Certainly for this choice of $g$, we have that $g$ is continuous and $\int_a^b g(x) dx=0$
We then observe that if $\int_a^b f(x)\,g(x)\,dx=0$, then
$$\int_a^b f^2(x)dx=\dfrac{1}{b-a}\left(\int_a^b f(x) dx\right)^2$$
But by the Cauchy-Scwartz Inequality
$$\left(\int_a^b f(x) dx\right)^2\le \int_a^b f^2(x)\, dx\,\,\int_a^b (1)^2\,dx\implies\,\int_a^b f^2(x)\, dx\ge \dfrac{1}{b-a}\left(\int_a^b f(x) dx\right)^2$$
with equality holding only when $f(x)$ is a constant. And that is that!