Let $f$ be Lebesgue measurable function on $[0,1]$. Prove that $f\in L^2[0,1]$ iff $f\in L^1[0,1]$ and there is a monotone increasing function $g$ such that for all closed intervals $[a,b]\subset[0,1]$, $$\left| \int_{a}^b f(x)dx \right|^2 \le (g(b)-g(a))(b-a)$$
My attempt: Since $[0, 1]$ is a finite measure space, it is clear that $L^2\subset L^1$. But how should I prove that there is a monotone increasing function $g$ satisfying the above inequality? Also I have to prove the converse too, but I have no idea for proving the converse, either.
Any hints or advices will help a lot!
For the converse: You can approximate $f \in L^1$ in $L^1$-norm by functions of the form $\sum_{k=1}^n c_k 1_{[a_k,b_k)}$ with disjunct intervals $[a_k,b_k)$. This convergence is also uniformly in the total-variation norm, i.e. $|\int_a^b f_n \, \rm{d}x - \int_a^b f \, \rm{d}x| \rightarrow 0$ uniformly for all $0 \leq a < b \leq 1$.
Now, use the given property for the intervals $[a_k,b_k)$, that is $$c_k^2 = \left|\int_{a_k}^{b_k} f_n \rm{d} x \right|^2 \leq 2\varepsilon_k^2+2(b_k-a_k)(g(b_k)-g(a_k)),$$ where $$\varepsilon_k := \int_{a_k}^{b_k} |f_n-f| \, \rm{d} x$$ and sum it $$\int_0^1 f_n^2 \, \rm{d} x = \sum_{k=1}^n c_k^2 \leq 2\sum_{k=1}^n \varepsilon_k^2+ 2\sum_{k=1}^n(b_k-a_k) (g(b_k)-g(a_k)) $$ Using a Telescoping Sum argument and the monotonicity of $g$, the last term can be bounded by $2(b-a) (g(b)-g(a))$. Since $\varepsilon_k \leq \int_0^1 |f-f_n| \, \rm{d} x$, we can choose $n \geq N$ such that $\varepsilon_k \leq 1$. Thus $\varepsilon_k^2 \leq \varepsilon_k$ and $$\sum_{k=1}^n \varepsilon_k^2 \leq \sum_{k=1}^n \varepsilon_k \leq \int_0^1 |f-f_n| \, \rm{d} x.$$ Chosing a $\lambda$-a.s. convergent subsequence, one can apply the Fatou-Lemma in order to get $$\int_0^1 f^2 \rm{d} x \leq 2(b-a)(g(b)-g(a))$$
$\Rightarrow$: To construct $g$ you may just use the Hölder-inequality: $$\left| \int_a^b f(x) \, \rm{d} x \right|^2 \leq (b-a) \int_a^b f(x)^2 \, \rm{d} x,$$ i.e. one can define $$g(y) := \int_0^x f(x)^2 \, \rm{d} x.$$