Let $\Omega$ and open bounded set in $R^n$ with smooth boundary. Suppose that $\overline{B(0,1)} \subset \Omega$.
Let $h_1 \in H^{1}(B(0,1) - B(0,1/2))$ such that $\Delta h_1 = 0 $ in $B(0,1) - B(0,1/2)$ and $h_1 - u \in H^{1}_{0}(B(0,1) - B(0,1/2)) $.
Let $h_2 \in H^{1}(B(0,1/2))$ such that $\Delta h_2 = 0 $ in $ B(0,1/2)$ and $h_2 - u \in H^{1}_{0}( B(0,1/2)) $.
I can define a function $h_3 (x)$ in $B(0,1)$ such that $h_3(x) = h_1(x)$ if $x \in B(0,1) - B(0,1/2), h_3(x) = h_2(x)$ if $x \in B(0,1/2)$ and $h_3(x) = 0 $ if $x \in \partial B(0,1/2) $.
The function $h_3$ is in $H^1(B(0,1))$ ? The function $h_3 $ satisfies :
$\Delta h_3 = 0 $ in $B(0,1)$ and $h_3 - u \in H^{1}_{0}(B(0,1/2))$ in the weak sense ?
Someone could point me a reference that answer these questions?
Thanks in advance
Here is a simple exercise you can try. The proof only uses the definition of weak derivative and some calculus:
On to your question. Let $\Omega_1 = B(0,1) \setminus \overline{B(0,1/2)}$ and let $\Omega_2 = B(0,1/2)$.
Your hypotheses state that
The extensions $\widetilde{h_1 - u}$ and $\widetilde{h_2 - u}$ both belong to $H^1(\mathbb R^n)$, and in particular when restricted to $B(0,1)$ both belong to $H^1(B(0,1))$. So does their sum $h$, given by $$ h(x) = \left\{ \begin{array}{cl} h_1(x) - u(x) & x \in \Omega_1 \\ h_2(x) - u(x) & x \in \Omega_2. \end{array} \right.$$ The function you are looking for is $h_3 = h + u$. It belongs to $H^1(B(0,1))$ and satisfies $h_3(x) = h_i(x)$ if $x \in \Omega_i$, $i = 1,2$.