Let $f\in L^1(0,1)$. I want to show that $ \left(\int_0^1 f(t) ~\text{d}t\right) ^2\leqslant \int_0^1f^2(t)~\text{d}t.$
This is my attempt: I want to apply Jensen's inequality: $\varphi\left(\int_0^1 f\right) \leqslant \int_0^1 \varphi(f).$
Let $\varphi(x)=x^2$. Then $\varphi$ is convex. Thus applying Jensen's inequality, gives the result.
Is what I've done right?