Operator corresponding to the form $\int_a^b f'(x)\overline{g'(x)}dx$ with $f,g \in H^1(a,b)$ There's a theorem that states if $s$ is a densely defined, semi-bounded, closed, symmetric sesquilinear form then there exists a unique self-adjoint operator $T$ such that $s(f,g)=\langle Tf, g\rangle$. The form $s[f,g]=\int_a^b f'(x)\overline{g'(x)}dx$ satisfy all those requirements with $f,g \in H^1(a,b)$. The corresponding operator is $Tf = -f''$, but my question is what's the domain? 
Intuitively, $f$ should be in in $H^2(a,b)$. The problem is with the boundaries, since the partial integration term can vanish in several different ways for this operator (for example $f(a)=0=f(b)$ and the theorem states that there exists a UNIQUE Self-adjoint operator. Any thoughts? 
 A: The following computation shows that if we don't impose any boundary data then $s$ does not correspond to the operator $-\frac{d^2}{dx^2}$. For ease of typsetting I consider real-valued $f$ and $g$ and for ease of discussion I assume $f$ and $g$ are smooth. 
\begin{eqnarray*}
s[f,g]
& = & 
-\int_a^b f''(x) g(x)\; {\rm d} x + f'(x) g(x)\bigg|_a^b
\\
& = & 
\int_a^b\left(-f''(x) + \mathscr B(f)\right)g(x)\; {\rm d}x, 
\end{eqnarray*}
where $\mathscr B(f)$ is the boundary operator whose action on $g$ is 
\begin{equation*}
\int_a^b \mathscr B(f)(x) g(x)\; {\rm d}x 
= 
f'(x) g(x)\bigg|_a^b. 
\end{equation*}
According to this computation, for all smooth,  $\mathbb R$-valued functions $f$ and $g$ we have $s[f,g] = \langle Tf, g\rangle$, where $T= -\frac{d^2}{dx^2} + \mathscr B$. 
If you want to have $T = -\frac{d^2}{dx^2}$ then you first restrict the domain of $s$ to some subspace $\mathscr H\subset H(a,b)$ on which $\mathcal B = 0$ (in the sense that $\langle \mathscr B(f), g\rangle = 0$ for all $f, g\in \mathscr H$). Once you've chosen $\mathscr H$, your theorem guarantees that $T$ is unique. The point here is that $T$ depends on your choice of $\mathscr H$. Common choices of $\mathscr H$ are $\mathscr H = H_0^1(a,b) = \{f\in H(a,b): f(a) = 0 = f(b)\}$ and $\mathscr H = \{f\in H(a,b): f'(a) = 0 = f'(b)\}$. 
