Let $(X,\mathcal{A},\mu)$ be a $\sigma$-finite measure space and let $\phi$ be a measurable function that is not an element of $L^\infty(\mu)$, i.e. $\phi\not\in L^\infty(\mu)$. I am trying to construct a function $g\in L^2(\mu)$ such that $\phi\cdot g\not\in L^2(\mu)$.
I tried partitioning $X$ in the sets $A_k=\{k\leq|\phi|<k+1\}$ so i could somehow control the behavior of $g$ on those sets relative to $\phi$, but I needed something more. I considered a partition of $X$ in disjoint sets of finite measure say $(X_n)$ and then I tried to take their co-partition. The problem arising is that I cannot determine which of the sets $A_k\cap X_n$ are of non-zero measure. I am really stuck here. Any ideas?
Replacing $g$ with $\frac{g\phi}{|\phi|}$ on $X$, which doesn't change the $L^2$ norm of $g$ we can first treat the case $\phi=|\phi| \ge 0$ and then use the above to complete the general case; writing $a_k=\mu(A_k)$, the hypothesis gives $a_k$ non zero for infinitely many $k$; for any $a_k= \infty$, we replace $A_k$ with a subset of finite positive measure $b_k$ which exists by sigma finitness, and make $g$ zero outside that on $A_k$, so we can actually assume $a_k$ finite to start with.
Then for all $k>0$ with $a_k \ne 0$, let $g= \frac{1}{k\sqrt{a_k}}$ on the corresponding $A_k$ and zero everywhere else.
It is obvious that the integral of $g^2$ is finite, being dominated by $\zeta(2)$, while the integral of $(\phi g)^2$ is at least an infinite sum of $1$'s, so infinite.