Prove that $G=\{f\in L_p(\mu): \int_\mathbb{R} f(t) dt = 0\}$ is a dense subset of $L_p(\mu)$, where $\mu$ is the lebesgue measure on $\mathbb{R}$. Here $1<p<\infty$, prove that $G=\{f\in L_p(\mu): \int_\mathbb{R} f(t) dt = 0\}$  is a dense subset of $L_p(\mu)$, where $\mu$ is the Lebesgue measure on $\mathbb{R}$.
How to prive this? I have no idea, can anyone give me a hint?
 A: Consider the linear operator $$\Lambda: (L^p \cap L^1,\|\cdot\|_p) \to (\mathbb{R},|\cdot|), f \mapsto \int f \, d\mu.$$
Since $L^p \cap L^1$ is dense in $L^p$ (with respect to $\|\cdot\|_p)$, we are done if we can show that the kernel of $\Lambda$ is dense in $(L^p \cap L^1,\|\cdot\|_p)$. To this end, we use the following general statement, which can be, for instance, found in the Functional Analysis book by Rudin (Theorem 1.18)

Let $X$ be a normed space and $\Lambda:X \to \mathbb{R}$ a non-zero linear functional. $\Lambda$ is not continuous if and only if its kernel $$\text{ker}(\Lambda) = \{x \in X\::\: \Lambda(x)=0\}$$ is dense in $X$.

Consequently, it is enough to show that $\Lambda$ is not continuous. Take
$$f_n(x) := \frac{1}{n^{1/p}} 1_{[0,n]}(x),$$
then $(f_n)_{n \in \mathbb{N}} \subseteq L^1 \cap L^p$ and the sequence is $L^p$-bounded since
$$\|f_n\|_p = n \frac{1}{n}=1, \qquad n \in \mathbb{N}.$$
On the other hand,
$$\Lambda(f_n) = \frac{1}{n^{1/p}} n \xrightarrow[p>1]{n \to \infty} \infty.$$
This shows that the operator $\Lambda$ is not bounded, hence not continuous.
A: Hints:
$1).\ $ There is a compactly-supported continuous $g$ such that $\|f-g\|<\epsilon/2.$
$2).\ $ Define $g_n(x)=g(x)-\left(\frac{\int g}{2n}\right)\cdot1_{[-n,n]}(x).$
$3).\ $ Prove that $g_n$ is compactly-supported and $\int g_n=0.$
$4).\ $ Prove that $\|f-g_n\|<\epsilon$  if $n$ is large enough.
