Suppose you're given the operator $A$ on the space $X=L^2(0,1)$ defined by $$D(A)=C^\infty_c(0,1),\ \ \ Af=-f''+f$$ for all $f\in C^\infty_c(0,1)$. How do I proceed in order to find the Friedrichs extension $B$ of the operator?
This is what I have done for the moment. Note that $f$ is symmetric and densely defined. Define quadratic form $Q:D(A)\times D(A)\to \mathbb{C}$ by $$Q(f,g)=\int_0^1(Af)\overline{g}=\int_0^1(-f''+f)\overline{g}$$ I know by existence of a Friedrichs extension that $Q$ is closable. The domain of the closure $Q_1$ of $Q$ is given by all $L^2$-limits of $\|\cdot\|_Q$-Cauchy sequences in $D(Q)=D(A)$, where the norm $\|\cdot\|_Q$ is given by $\|f\|_Q=Q(f,f)^{1/2}$. Then for $f\in D(A)=C^\infty_c(0,1)$: $$\|f\|_Q^2=\int_0^1(-f''+f)\overline{f}=\int_0^1|f'|^2+|f|^2=\|f\|_{W^{1,2}}^2$$ so the $\|\cdot\|_Q$-Cauchy sequences in $D(A)=C^\infty_c(0,1)$ are exactly the $W^{1,2}$-Cauchy sequences in $C^\infty_c(0,1)$ and their $L^2$-limits are also $W^{1,2}$-limits, so I claim that the domain of the closure $Q_1$ of $Q$ is $\overline{C^\infty_c(0,1)}^{W^{1,2}}$ which is, by definition, $W^{1,2}_0(0,1)$. By Friedrichs Theorem this should be the domain $D(B^{1/2})$ of the positive square root $B^{1/2}$ of the Friedrichs extension $B$, and $D(B)\subset D(B^{1/2})$. However, the lecture notes claim that $h(t)=\sin t$ lies in $D(B)$, which is a problem as $\sin(t)$ is not in $W^{1,2}_0(0,1)$.
What am I doing wrong?