$\int_{0}^{1}f(x)\cdot g(x)dx=\int_{0}^{1}f(x)dx\cdot \int_{0}^{1}g(x)dx$ Let $f:[0,1]\rightarrow \mathbb{R} $ be a continuous function so that $\int_{0}^{1}f(x)\cdot g(x)dx=\int_{0}^{1}f(x)dx\cdot \int_{0}^{1}g(x)dx$, for any $g:[0,1]\rightarrow \mathbb{R}$, continuous and not differentiable.
Prove that $f$ is constant.
I have no idea on what to do.
 A: Suppose $\{g(x)\}$ is a sequence of functions $g_n(x)=\frac{1}{n\sqrt {2\pi}} e^{-\frac {\mu}{2n^2}x^2}$
The sequence converges to the Dirac delta function $\delta(x-\mu)$
$\int_0^1 f(x)g(x) = f(\mu)$ if $\mu \in [0,1]$
$\int_0^1 f(x)\int_0^1 g(x) = \int_0^1 f(x) = f(\mu)$
and if we consider all $g.$
$f(\mu) = \int_0^1 f(x)$ for all $\mu \in [0,1]$
$f(\mu)$ is constant over the interval.
A: As @RobertIsrael pointed out, the non-differentiable continuous functions are dense in $C[0,1]$ with respect to the uniform norm, and therefore
$$\int_0^1 f(x) g(x) \, dx = \int_0^1 f(x) \, dx \int_0^1 g(x) \, dx$$
holds for any continuous function $g$. If we choose $f=g$, then we find
$$\int_0^1 f(x)^2 \, dx = \left( \int_0^1 f(x) \, dx \right)^2.$$
This means that
$$\int_0^1 ( f(x) - a)^2 \, dx = 0$$
for $a:= \int_0^1 f(y) \, dy$. Since the integrand $x \mapsto (f(x)-a)^2$ is continuous and non-negative, this implies
$$f(x)-a=0 \qquad \text{for all $x \in [0,1]$},$$
i.e.
$$f(x) = a = \int_0^1 f(y) \, dy \qquad \text{for all $x \in [0,1]$}.$$
Remark: More generally, if $f$ is a continuous function and $V$ strictly convex, then $$\int_0^1 V(f(x)) \, dx = V \left( \int_0^1 f(x) \, dx \right)$$ if and only if $f$ is constant, see this question; here, we have proved this statement for $V(x) = x^2$.
A: Fro the first mean value theorem for definite integrals follows that the exists $c \in (0, 1)$ such that
$$\int_{0}^{1}f(x)dx = f(c)$$
With the assumption above
$$\int_{0}^{1}(f(x)-f(c))^2dx = \int_{0}^{1}f^2(x)dx - \int_{0}^{1}f^2(c)dx = (\int_{0}^{1}f(x)dx)^2 - \int_{0}^{1}f^2(c)dx = 0$$
follows $f(x)-f(c) = 0$ on $(0,1)$.
