# $\int_0^1f(x)g(x) dx=\int_0^1f(x)dx \int_0^1g(x)dx$ implies $f$ constant

Let $$f:[0,1] \to \mathbb R$$ be a continuous function s.t. $$\int_0^1f(x)g(x) dx=\int_0^1f(x)dx \int_0^1g(x)dx,$$ for all $$g:[0,1]\to \mathbb R$$ continuous and not differentiable. Prove that $$f$$ is constant.

I've found that choosing $$h(x)=f(x)-\int_0^1f(t)dt$$ gives $$\int_0^1h(x)g(x)dx=0.$$ I don't know how to proceed. Can somebody give me some tips, please?

• Proof by contradiction may be easier. – Yadati Kiran Mar 10 at 17:46
• What happens if you plug in $g:= h$ ? – Max Mar 10 at 17:46
• Are we sure about this formulation? Maybe you mean $g$ continuous but not per se differentiable? – Shashi Mar 10 at 17:50
• if you plug g=h then integral of $h^2$ =0 – Gaboru Mar 10 at 17:52
• And that means that $h(x)=0$ – Andrei Mar 10 at 17:54

As Max et al have noted, the special case $$g=h$$, if valid, gives $$\int_0^1 h^2(x) dx=0$$. But $$h$$ is real-valued, so $$h^2(x)\ge 0$$ with equality iff $$h(x)=0$$. For $$h^2$$ to integrate to $$0$$, the fact that $$h$$ is continuous implies $$h$$ is identically zero, so $$f(x)=\int_0^1 f(t) dt$$ is constant.
You seem insistent all we know about $$f$$ is that each non-differentiable continuous choice of $$g$$ obtains $$\int_0^1f(x)g(x)dx=\int_0^1f(x)dx\int_0^1g(x)dx$$. But it doesn't matter: we can choose such $$g$$ arbitrarily close to $$h$$, by adding to $$h$$ a non-differentiable continuous noise $$\eta$$ times an arbitrarily small coefficient, viz. $$g=h+\epsilon\eta$$. Then $$\int_0^1 h^2(x)dx=lim_{\epsilon\to 0}\int_0^1 h(x)(h(x)+\epsilon\eta(x))dx=\lim_{\epsilon\to 0}0=0.$$
• why is the last $lim 0$? – Gaboru Mar 10 at 20:25
• @Gaboru Because we're taking $g=h+\epsilon\eta$. – J.G. Mar 10 at 20:26