TITLE: prove $f\in L^2([0,1])$
QUESTION [6 upvotes]: Assume $f:[0,1]\to R$ is a measurable function such that $fg\in L^1([0,1])$ for all $g\in L^2([0,1])$.prove that $f\in L^2([0,1])$.
My opinion: if I can find a function g such that f+g is in $L^2([0,1])$, then use $$\int(f+g)^2-\int2fg+g^2$$to get $\int f^2$, then we can prove f is in $L^2([0,1])$. Is it right?

REPLY [5 votes]: We may assume $f\geq 0$. We need to show that 
$$ \Lambda_f : g\in L^2 \mapsto \int f g \; dx $$
is a bounded linear functional on $L^2$. If this is the case then
by Riesz there is $h\in L^2$ so that $\Lambda_f(g)=\int hg \; dx$ and one sees that $f=h$ a.s.
So assume that $\Lambda_f$ is not bounded and let $g_n\geq 0$ be a sequence with $\|g_n\|_{L^2}=1$ so that $\Lambda_f(g_n) \rightarrow \infty$. Extracting a subsequence we may assume that $\Lambda_f(g_n) \geq 4^n$. Then
$$ g= \sum_{n\geq 0} \frac{1}{2^n} g_n$$ has $L^2$ norm not greater than $2$ but by monotone convergence $\Lambda_f(g)=+\infty$.