# equivalence between problem and his variational formulation

let $\Omega$ an open bounded and regular in $\mathbb{R}^n$, and let $\overline{\Omega}_1$ and $\overline{\Omega}_2$ and partition to $\Omega:$ $\Omega = \overline{\Omega_1} \cup \overline{\Omega_2}.$ We put $\Gamma=\partial \Omega_1 \cap \partial \Omega_2$ the interface between $\Omega_1$ and $\Omega_2$ ($\Gamma \subset \Omega$), and we put $u_i=u/\Omega_i$ Let the problem: $$\begin{cases} &-k_i\Delta u_i=f,x\in \Omega_i, i=1,2\\ &u_i=0, x\in \partial \Omega\\ & u_1=u_2, x \in \Gamma\\ &k_1 \nabla u_1 \cdot n = k_2 \nabla u_2 \cdot n, x \in \Gamma \end{cases}$$ where $k_i$ is an constant piecewise function , $i=1,2,$ $k(x)=k_i>0$ and $f\in L^2(\Omega).$

I found that, the variatioanal formulation of this problem is: found $u\in H^1_0(\Omega)$ such that $$\int_{\Omega} k\nabla u \cdot \nabla v dx = \int_{\Omega} fvdx,\quad \forall v \in H^1_0(\Omega)$$ My question is: how we prouve that the solution of this variational formulation, is the solution of the problem?

Once you are sure your weak formulation is right, suppose your weak solution is regular enough that you can integrate by parts, then do it and choose your test functions $v$ in spaces of smooth functions. You'll probably need to do this several times, once for each boundary condition.
For example you may first try with functions such that $supp (v) \subset \Gamma$. See what cancels out in the integral equation and you'll get some equality of integrals for every $v$ in this space. Because of the choice of space for the test functions, this will imply one of the boundary conditions. And so on. Note that you might have to do some manipulations using what you just found out in previous steps.