Let $\Omega $ open, smooth and bounded. Why $$K=\{u\in H^1(\Omega )\mid u|_{\partial \Omega }=g\}$$ is a hilbert space ? I recall that $H^1(\Omega )=W^{1,2}(\Omega )$.
Indeed, it's even not stable for the addition. Let $u,v\in K$, then $$(u+v)|_{\partial \Omega }=u|_{\partial \Omega }+v|_{\partial \Omega }=g+g=2g.$$ What's the problem here ?
Edit
Let $g\in H^{1/2}(\partial \Omega )$ and $f\in L^2(\Omega )$. Prove that there is a unique weak solution of $$\begin{cases} -\Delta u-u=f&\Omega \\ u=g&\partial \Omega \end{cases}.$$
The solution goes like :
We have to solve it in $$H=\{u\in H^1(\Omega )\mid u|_{\partial \Omega }=g\}.$$
The variational equation is given by $$\int_\Omega \nabla \varphi\cdot \nabla u-\int_\Omega u\varphi=\int_{\partial \Omega }g\varphi+\int f\varphi,\quad \varphi\in H.$$
We set $$a(u,\varphi)=\int_\Omega \nabla \varphi\cdot \nabla u-\int_\Omega u\varphi,$$ and $$T(\varphi)=\int_{\partial \Omega }g\varphi+\int f\varphi.$$ It's easy to prove that $a$ is continuous and coercive and $T$ is continuous. Lax-Milgram allow us to conclude.
Question : Since $H$ it's not a Hilbert space, the argument is wrong ? But it's an official solution of my course, so it should be a correct argument. By the way I also see this argument here (page 51-52 for people who read french). So I guess this argument is true... So how can it be true since $H$ is even not an Hilbert space ?
$K$ is infact not a hilbert space.Actually you do not use lax milagram directly for this problem. First you have to convert this to an equivalent homogeneous problem in $H_0^1$ and then you use lax milgram. This can be done by substracting off a function in $H^1$ with a trace equal to g. This is always possible due to trace theorem.