Define $D(T)=\{f \in L^2[0,1] : f \text{ is absolutely continuous},\ f\ '\in L^2[0,1],\ f(0)=f(1)=0\}$.
I want to show that $D(T)$ is dense in $L^2[0,1]$.
My argument is as follows:
$\{0,1\} $ is a measure zero set so it suffices to show that absolutely continuous function with derivative in $L^2[0,1]$ is dense in $L^2$. But polynomials on $[0,1]$ are clearly dense (in uniform convergence hence also in $L^2$) by Stone-Weierstrass theorem and are abs. conti. with $L^2$ derivative. Thus, $D(T)$ is dense in $L^2[0,1]$.
Is this a sound argument? Any help is appreciated.
Suppose that there exists $f\in L^2$ such that $$ \int f(t)g(t)dt = 0 $$ for all $g$ in your set of functions. By a limiting argument, you can easily show that $$ \int f(t)\chi_{[a,b]}(t)dt = 0, \;\;\; 0 < a < b \\ \int_a^b f(t)dt = 0,\;\;\; 0 < a < b $$ By the Lebesgue differentiation theorem, it follows that $f=0$ a.e.. Hence, the orthogonal complement of your set is $\{0\}$, which means that your set is dense in $L^2[0,1]$.