Suppose $U \subset \mathbb R^n$ is an open, bounded and connected set, with smooth boundary $\partial U$ consisting of two disjoint, closed sets $\Gamma 1$ and $\Gamma 2$. Define what it means for $u$ to be a weak solution of Poisson's equation with mixed Dirichlet-Neumann boundary conditions: \begin{cases} -\Delta u = f \ \ \ \text{in $U$} \\ u = 0 \ \ \ \text{on $\Gamma_1$} \\ \frac{\partial u}{\partial \nu} = 0 \ \ \text{on $\Gamma_2$}. \end{cases} Discuss the existence and uniqueness of weak solutions. [Source: Evans' PDE 2nd edition, page 366, problem 6]
My attempt: Let $u \in C^\infty(U)$ be a solution of the problem and let $H^1_{\Gamma_1}(U) = \{v \in H^1(U)\colon v = 0 \text{ on } \Gamma_1 \}$, which is a Hilbert space with respect to the inner product in $H^1$. To define a weak solution of the Poisson's equation multiply it by $v \in H^1_{\Gamma_1}(U)$ and integrate by parts \begin{align*} \int_U fv \,dx &= -\int_U \Delta u \cdot v \,dx \\ &= \int_U Du \cdot Dv \,dx - \int_{\partial U} \frac{\partial u}{\partial \nu} \cdot v \, dS \\ &= \int_U Du \cdot Dv \,dx - \int_{\Gamma_1} \frac{\partial u}{\partial \nu} \cdot v \, dS - \int_{\Gamma_2} \frac{\partial u}{\partial \nu} \cdot v \, dS \\ &= \int_U Du \cdot Dv \,dx \end{align*} where the second integral on RHS is zero since $v \in H^1_{\Gamma_1}(U)$ and the third integral is zero since $\frac{\partial u}{\partial \nu} = 0$ on $\Gamma_2$. Is it ok to take $v$ only in $H^1_{\Gamma_1}(U)$ or $v$ must be taken in $H^1(U)$?
Define the bilinear map $B:H^1(U)\times H^1_{\Gamma_1}(U) \to \mathbb R$ by $B[u,v] = \int_U Du \cdot Dv \, dx$. To prove the existence and uniqueness of weak solutions we have to prove that $B$ satisfies the hypotheses of Lax-Milgram, i.e. that $B$ is continuous (linear + bounded) and coercive.
For the boundness we can use Cauchy-Schwarz and the definition of Sobolev norm $||u||_{H^1} = ||u||_{L^2}+||Du||_{L^2}$, which implies $||u||_{H^1} \ge ||Du||_{L^2}$. So $$ |B[u,v]| \le \int_U |Du \cdot Dv| \, dx \le ||Du||_{L^2(U)}||Dv||_{L^2(U)} \le ||u||_{H^1(U)}||v||_{H^1(U)}. $$
Is all good until here? What about the proof that $B$ is coercive? I read something about the trace operator $T$, maybe is better to define $B$ through $T$?