If $f \in L^p$ with $1 \leq p 0$ there is a function $g$ with compact support such that $||f-g||_p < \epsilon$

lebesgue-measuremeasure-theory

If $f \in L^p$ with $1 \leq p < \infty$, then for any $\epsilon > 0$ there is a function $g$ with compact support such that $||f-g||_p < \epsilon$

I am not sure how to prove the above. By considering the positive and negative portion of $f$ we may assume $f$ is nonnegative. Certainly, a standard result in measure theory is that there are sequence of simple functions that approach $f$ from below. However, we don't have that such simple functions have compact support.

Best Answer

Just take $g=fI_{|x| \leq N}$ with $N$ sufficiently large. Use DCT to show that $\|f-g\|_p \to 0$ as $N \to \infty$.