Prove that if $\int_E f \cdot g = 0$ then $ f=0 $

Let $E$ be a measurable set, $1\le p < \infty$, $q$ the conjugate of $p$, and $\mathcal S$ a dense subset of $L^q(E)$. show that if $f \in L^p(E)$ and $ \int_E f \cdot g = 0 \; \forall \; g \in \mathcal S $, then $ f=0 $

I previously did a similar problem where I showed that if this integral was $0$ for all $ g \in L^q(E) $ then $ f=0 $ and I used the fact that $ \|f\|_p = Max_{g \in L^q(E), \|g\|_q \le 1} \int_E f \cdot g $

Heres my attempt at this problem but I know there is a mistake:

Suppose that $ \int_E f \cdot g = 0 \; \forall \; g \in \mathcal S $ . Let $ h \in L^q(E) $ be such that $ \|f\|_p = Max_{g \in L^q(E), \|g\|_q \le 1} \int_E f \cdot g = \int_E f \cdot h \;$. Then $ |h| \in L^q(E) $

Then there exists nonnegative $ {g_n} \in \mathcal S $ such that $ \|g_n - |h|\|_q \rightarrow 0 $. So we get that $ \|f\|_p = Max_{g \in L^q(E), \|g\|_q \le 1} \int_E f \cdot g = \int_E f \cdot h \le \int_E |f| \cdot |h| \le \lim_{n \rightarrow \infty}\int_E |f| \cdot g_n =\lim_{n \rightarrow \infty}0 = 0 $. The last inequality comes from Fatou's and that each $ g_n \in \mathcal S $

I pretty sure this is incorrect because in order to use Fatou's lemma I am assuming that $ g_n \rightarrow |h| $ but we only know that $ \|g_n - |h|\|_q \rightarrow 0 $


Solution 1:

I don't think that your argumentation works. Not because of the missing pointwise convergence (that's something we could fix), but because the functions $g_n$ do, in general, not need to be non-negative (unless $\mathcal{S}$ has the additional property that $u \in \mathcal{S}$ implies $|u| \in \mathcal{S}$) ...

Hint: Use Hölder's inequality instead, i.e. that

$$\left| \int f \cdot g \right| = \left| \int f \cdot (g-g_n) \right| \leq \|f\|_p \|g-g_n\|_q$$

for any $g \in L^q(\mu)$ and $(g_n)_{n \in \mathbb{N}} \subseteq \mathcal{S}$.