Let $Y$ be a $\sigma$-finite measure space and $f$ be a $L^2$ function on $Y$. Then does the following formula always hold?
$$\left| \int_{Y} f\right|^2 \leq \int_{Y} |f|^2$$
I know that if $Y$ is a finite measure space, I can apply the Jensen's formula. But how about arbitrary cases? Could anyone please help me?
Not true even for finite measures. Let $f(x)=1$ for $ 0 \leq x \leq 2$ and $0$ for all other $x$ (Lebesgue measure).
The inequality is true for probability measures. This follows by Jensen's inequality applied ti the function $x \to x^{2}$.