How does it follow that $\int_{\mathbb{R}} |f(t)g(t)|\,dt< K\| g\|$ for all $g\in L^2$ implies $f\in L^2$? As in title, does it follow that $\int_{\mathbb{R}} |f(t)g(t)|\,dt< K\| g\|$ for all $g\in L^2$ implies $f\in L^2$, where $K$ is a constant?
I've thought about it a little while, but I cannot come up with anything. I'm rather unfamiliar with integrals, so that might be the reason why;
I think it has to be something about completeness. The condition given ensures that $\langle f,g\rangle$ is bounded, but since we do not know if $f$ lies in $L^2$ I don't think that means a lot.
If anyone could help, I' appreciate it.
 A: Let $\phi_n \ge 0$ be a sequence of simple functions that increases to $|f|$.  Then $$\int_{\mathbb R} \phi_n^2 \, dx \nearrow \int_{\mathbb R} |f|^2 \, dx.$$
Since
$$ \|\phi_n\|_{L^2}^2 = \int_{\mathbb R} \phi_n^2 \, dx \le \int_{\mathbb R} |f| \phi_n \, dx < K \|\phi_n\|_{L^2}$$ and $\|\phi_n\|_{L^2} < \infty$ for all $n$ you can divide to get $$\int_{\mathbb R} |\phi_n|^2 \, dx < K^2.$$ Now let $n \to \infty$.
A: $f$ must be measurable and locally integrable for the Lebesgue integral to make sense with respect to all characteristic functions of finite intervals.
Because $g \mapsto \int fg \, dt$ is a bounded linear functional, then the Riesz representation theorem gives a unique $\tilde{f}\in L^2$ such that
$$
               \int_{\mathbb{R}} (f-\tilde{f})g \, dt = 0,\;\;\; g \in L^2.
$$
Let $g=\chi_{[a,b]}$ in order to conclude that
$$
            \int_a^b f-\tilde{f} \, dt =0,\;\; -\infty < a \le b < \infty.
$$
Now apply the Lebesgue differentiation theorem to conclude that $f-\tilde{f}=0$ a.e.
