TITLE: Is the space of piecewise continuous functions on $[0,1]$ complete in $L^2[0,1]$?
QUESTION [5 upvotes]: If we consider $PC[0,1]$ as a subset of $L^2[0,1]$, is it complete when equipped with the $L^2$ norm? I have been trying to prove this for some time but did not get very far. The search for a counterexample has also proved fruitless. I would therefore be grateful for some help.
Thank you.

REPLY [2 votes]: If $P[0,1]$ were not dense in $L^2[0,1]$, then there would exist $f\in L^2[0,1]$, $f\ne 0$, such that $\langle f, \chi_{[0,a]}\rangle = 0$ for all $0 \le a \le 1$. But that would imply that $\int_0^a f(t)dt=0$ for all $a$. By the Lebesgue Differentiation Theorem, $\frac{d}{da}\int_0^1 f(t)dt=f(a)$ a.e., which would imply that $f=0$ in $L^2[0,1]$ and give a contradiction. Therefore $P[0,1]$ is dense in $L^2$.