Equivalent inequalities

Let us consider $f,g,h:[0,1]\rightarrow \mathbb{R}$, integrable non-negative functions. Prove that the following statements are equivalent:

1). $\left(f(x)\right)^2\leq g(x)h(x)$ for almost every $x\in [0,1]$;

2). $\left(\int_E f(x)dx\right)^2\leq \int_Eg(x)dx\int_E h(x) dx$ for every measurable set $E\subset[0,1]$.

I have tried by applying the Hölder inequality but I couldn't solve it.

• I think 1)$\Rightarrow$ 2) follows from Cauchy-Schwarz inequality. – Seewoo Lee Aug 10 '16 at 20:35
• @See-WooLee: indeed $$\left(\int_E f dx\right)^2\leq \left(\int_E\sqrt{g}\cdot\sqrt{h}dx\right)^2\leq\int_Egdx\cdot\int_Eh dx$$ – b00n heT Aug 10 '16 at 20:39

For 1)$\Rightarrow$2), as I and b00n heT mentioned in the comment, it follows from Cauchy-Schwarz inequality. For 2)$\Rightarrow$ 1), use Lebesgue differentiation theorem. For $[y-r, y+r]\subset [0,1]$, we have
\begin{align} \left( \frac{1}{2r}\int_{y-r}^{y+r}f(x)dx\right)^{2}\leq \left(\frac{1}{2r} \int_{y-r}^{y+r}g(x)dx\right)\left(\frac{1}{2r}\int_{y-r}^{y+r}h(x)dx\right) \end{align} Let $r\to 0$, then for a.e. $y\in [0, 1]$, we have $f(y)^{2}\leq g(y)h(y)$.