$f \in L^{p}(\mathbb{R}^n),$where $p>1,\int{f\phi}=0$ for all $\phi\in C_c(\mathbb{R}^n)$ implies $f$ vanishes almost everywhere.

Suppose $f \in L^{p}(\mathbb{R}^n),$where $p>1,$and $\int_{\mathbb{R}^n}{f\phi}=0$ for all $\phi\in C_c(\mathbb{R}^n)$ ,then $f$ vanishes almost everywhere.
$C_c(\mathbb{R}^n)$ denotes the set of continuous functions $\phi:\mathbb{R}^n\to\overline{\mathbb{R}}$ with compact support.

The first idea came to my mind is to estimate $\int{f^2}$ using Holder's inequality:
\begin{align} \int_{\mathbb{R}^n}{f^2}=\int_{\mathbb{R}^n}{(f^2-f\phi)}\leq\|f\|_q\|f-\phi\|_p, \end{align} $q$ being the conjugate exponent of $p$.
$\|f-\phi\|_p$ can be arbitrarily small, so if $\|f\|_q<\infty$, the integral vanishes, so does $f$. But we don't know about $\|f\|_q$.

How to proceed? Or should I try another approach?


Solution 1:

For $f\in L^{p}$, $p>1$, we know that \begin{align*} \|f\|_{L^{p}}=\sup\left\{\left|\int f\phi\right|:\phi\in L^{q},\|\phi\|_{L^{q}}\leq 1\right\}. \end{align*} Now use the density of $C_{c}$ in $L^{q}$ to show that \begin{align*} \|f\|_{L^{p}}=\sup\left\{\left|\int f\phi\right|:\phi\in C_{c},\|\phi\|_{L^{q}}\leq 1\right\}. \end{align*}

Solution 2:

For a fixed $x\in\mathbb{R}^{n}$, we see that \begin{align*} \int_{\mathbb{R}^{n}}f(y)\phi(x-y)dy=0,\quad\phi\in C_{c}. \end{align*} Now fix a $\varphi\in C_{c}$ with $\int\varphi=1$, and consider its standard mollification, $\varphi_{\varepsilon}=\varepsilon^{-n}\varphi(\cdot/\varepsilon)$, it is a standard fact that $f\ast\varphi_{\varepsilon}\rightarrow f$ in $L^{p}$ as $\varepsilon\rightarrow 0$ and hence a.e. for a subsequence $\{\varepsilon_{n}\}_{n}$. Now we note that $f\ast\varphi_{\varepsilon}(x)=0$ for every $x\in\mathbb{R}^{n}$.