Consider a continuous function $f:[0,1]\to\mathbb{R}^{+}$. Show that
$$\int_0^1 f(x)dx-\exp\left(\int_0^1 \log(f(x)) dx\right)\le \max_{0\le x,y\le 1}\left(\sqrt{f(x)}-\sqrt{f(y)}\right)^2$$
I tried first to discretize the problem and found that LHS is equal to
$$\int_0^1 f(x)dx-\exp\left(\int_0^1 \log(f(x))dx\right)=\lim_{n\to\infty}\left(\frac{1}{n}\sum_{i=1}^{n}f\left(\frac{i}{n}\right)-\frac{1}{n^n}\prod_{i=1}^{n}f\left(\frac{i}{n}\right)\right)$$ which looks like AM-GM inequality. Now I need to do the same thing for the RHS.