$L^2(\mathbb{R})$ is separable

functional-analysislp-spacesmeasure-theoryreal-analysis

I would like to prove that $L^2(\mathbb{R})$ is separable. Using the hint provided in Reed & Simon's book, I was able to show that:

  1. the set of simple functions on $[a,b]$ is dense in $L^2([a,b])$
  2. the set of step functions on $[a,b]$ is dense in the set of simple functions on $[a,b]$.

Next, I would like to show that $C([a,b])$ is dense in the set of step functions on $[a,b]$, so that I can conclude that $C([a,b])$ is dense in $L^2([a,b])$. Then, using this fact, I would like to show that $L^2(\mathbb{R})$ is separable. This is where I am having some trouble.

To prove the denseness of $C([a,b])$ in the set of step functions on $[a,b]$, note that by definition a step function is defined on a disjoint union of open intervals. Consider two consecutive open intervals, $(a_l, a_r)$ and $(b_l, b_r)$. We can construct a continuous function that agrees with the simple function on $(a_l, a_r-\epsilon/2) \cup(b_l+\epsilon/2, b_r)$, and construct a linear function connecting the points at $a_r-\epsilon/2$ and $b_l+\epsilon/2$. Since the support of this line can be made arbitrarily small we will obtain the result.

Based on the above, to prove that $L^2(\mathbb{R})$ is separable it will suffice to prove that $C([a,b])$ has a countable dense subset. One approach I thought of was to use polynomials with rational coefficients. However, this would invoke the Stone-Weierstrass theorem, which does not appear until later in the book so I'm trying to avoid it. I will also have to extend the domain of $C([a,b])$ to $C(\mathbb{R})$, but I think this can be achieved by taking the countable union
$$\bigcup_{n=-\infty}^\infty [n, n+1].$$

Assuming my ideas are correct, I am have some trouble making these arguments rigorous.


EDIT: Upon thinking about it further and taking a look at a few other books, I came up with the following. Let $f$ be a step function on $[a,b]$ and $\epsilon > 0$. By Lusin's theorem there exists a continuous function $g$ that agrees with $f$ except on a set of measure $\epsilon$. Then
$$\|f – g\|_{L_2} = \int_{[a,b]}|f-g|^2d\mu = \int_{\{x \in [a,b]: f(x) \neq g(x)\}} |f-g|^2 d\mu \\\leq \epsilon \sup_{x \in [a,b]} |f|^2 \rightarrow 0$$
I am unsure of the above since Lusin's theorem only holds for functions with compact support, but what if our step function do not have compact support? This might be a problem when extending our domain from $[a,b]$ to all of $\mathbb{R}$. Also the above doesn't use anything about step functions, so couldn't it have been applied to any $f \in L^2([a,b])$?

However, if this is correct than I have shown that $C([a,b])$ is dense in $L^2([a,b])$. By the Stone-Weierstrass theorem, the polynomials are also dense in $L^2([a,b])$. Countability follows by considering polynomials with rational coefficients (since $\mathbb{Q}$ is dense in $\mathbb{R}$). Hence $L^2([a,b])$ is separable. The only thing remaining is to extent this result to $L^2(\mathbb{R})$. Notice that since
$$ \int_{\mathbb{R}} (\cdots) d\mu = \lim_{n\rightarrow \infty} \int_{[-n,n]} (\cdots) d\mu $$
all our previous results hold for $L^2(\mathbb{R})$ and so we are done. Does this last step need to be justified any further?

Best Answer

Your ideas are fine. And indeed you can apply your argument directly via Lusin and avoid simple and step functions.

When your domain is $\mathbb R$, you first show that the functions with finite-measure support are dense, and then apply your argument.

About separability, if you already know that step functions are dense, show that the step functions with rational coefficients and rational endpoints in their intervals are dense in the step functions.

Finally, from a more advanced point of view (maybe you don't know what the words mean, but some day you will): one can prove that $L^2[a,b]$ is separable rather directly by showing that it has a countable orthonormal basis (here we see $L^2$ as a Hilbert space).

Related Question