I'm working with the following mixed inhomogeneous boundary value problem:
$\nabla(\kappa\nabla u)=f$ in $\Omega$
with $\partial\Omega = \Omega_1 \bigcup\Omega_2$ such that
$u=g$ on $\partial\Omega_1$
$\kappa\nabla u\cdot n = h$ on $\Omega_2$
Note 1:
If the entire boundary $\partial \Omega$ only consisted of the inhomogenous neumann boundary condition, I can clearly see that the weak formulation is:
$$ \int_\Omega \kappa\nabla u \nabla v = \int_\Omega fv + \int_{\partial\Omega} vh$$
Since there is no "essential" boundary condition and the weak formulation only consists of first derivatives, u and v can be elements of the sobolev space $H^1(\Omega)$.
Note 2:
I understand if the entire boundary $\partial \Omega$ only consisted of the inhomogeneous dirichlet condition, I can take test functions $v\in H_0^1$ but $u\notin H_0^1$. To correct for this, I can "homogenize" the boundary condition by proposing a new variable $w=u-G$ where G is some function in $H^1(\Omega)$ such that $G=g$ on $\partial\Omega$. Using $u=w+G$, I can see that the weak formulation becomes
$$ \int_\Omega \kappa\nabla w\cdot\nabla v=\int_\Omega fv -\int_{\partial\Omega}\kappa \nabla G\cdot\nabla v$$
Since $w=u-G$, the boundary values of $w$ must be zero. Hence, $w\in H_0^1(\Omega)$.
My question:
Following this pattern, I conjecture that for the mixed inhomogenous boundary value problem:
- The test function $v\in H_0^1(\Omega)$
- The neumann boundary condition on $\partial\Omega_2$ is naturally satisfied.
- The dirichlet boundary condition on $\partial\Omega_1$ can be satisfied by proposing a new variable $w$ such that $w=u-G$ for some $G\in H^1(\Omega)$ and leading to the weak formulation:
$$ \int_\Omega k\nabla w \nabla v = \int_\Omega fv + \int_{\partial \Omega_2} hv -\int_\Omega k\nabla G \nabla v$$
I'm almost completely sure that this is correct, but I just want to get some feedback on my conjectures. If I'm completely wrong, please let me know! :)