Inequality concerning functions quadratic decay of distribution $m(|f|>\lambda)\leq C\lambda^{-2}$ This was a problem in a prelim that I was not able to solve back in the day.
Let $m$ denote the Lebesgue measure on $\mathbb{R}^n$. Suppose $f:\mathbb{R}^n\rightarrow\mathbb{R}$ is a Lebesgue measurable function such that
$$
m\big[ |f|>\lambda\big]\leq C\lambda^{-2}
$$ for all $\lambda>0$.  Show that there is a constant $C_1>0$ such that
$$
\int_E|f|\,dm \leq C_1\sqrt{m(E)}
$$
I've tried to use Holder's inequality but I don't get very far. Does any body have a better idea?
 A: I think I came across this problem in a test before. It is a nice one, but  there is a slight trick to solve it.
It is enough to consider Lebesgue measurable set $E$ such that $0<m(E)<\infty$.  Applying Fubini's theorem with the measure  $m(\cdot\cap E)$ one gets that for any $t>0$
$$
\begin{align}
\int_E|f(x)|\,dx&=\int^\infty_0 m\big(E\cap\{|f|>\lambda\}\big)\,d\lambda\\
&=\int^t_0 m\big(E\cap\{|f|>\lambda\}\big) d\lambda + \int^\infty_t m\big(E\cap\{|f|>\lambda\}\big)\,d\lambda\\
&\leq t m(E) + C\int^\infty_t\frac{1}{\lambda^2}\,d\lambda\\
&= t m(E) + \frac{C}{t}=: \phi(t)
\end{align}
$$
The key now is to choose the best value for $t$, that the one that hopefully minimizes $\phi(t)= t m(E)+\frac{C}{t}$.
Solving for $\phi'(t)= m(E)-\frac{C}{t^2}=0$, one gets $t_E=\sqrt{\frac{C}{m(E)}}$. Furthermore,  $\phi''(t)=\frac{2C}{t^3}>0$ on $(0,\infty)$ and  $\lim_{t\rightarrow0}\phi(t)=\lim_{t\rightarrow\infty}\phi(t)=\infty$. Thus  $\phi$ attains its minimum value at $t_E$ and $$\phi(t_E)=2\sqrt{C}\sqrt{m(E)}$$
Putting things together one gets
$$\int_E|f(x)|\,dx\leq  2\sqrt{C}\sqrt{m(E)}$$
