I am looking to solve this integral problem.
Find all functions such that:$$ \int_0^1 g(x)f(x)~dx =\int_0^1f^2(x)~dx$$
I found a trivial space of solutions and that is $g(x)=f(x).$ Are there any other solutions? Looking for different kinds of examples of $f$ and $g$ for which it's true.
I would use a Fourier type approach.
Let $\Omega$ be a measurable set. Given $f\in L^2(\Omega)$ such that $\|f\|_\Omega \neq 0$ (otherwise the problem is trivial) consider any $g_*\in L^2(\Omega)$ not orthogonal to $f$, i.e., such that $(f,g_*)_\Omega\neq 0$.
Then take $$ g=\frac{\|f\|_\Omega^2}{(f,g_*)_\Omega} g_* $$