# The Lax-Milgram Lemma in FEM with non-homogenous Dirichlet BC

How can show that the prerequisites for the Lax-Milgram Lemma holds if I have different test and trial spaces (which I think is the natural thing to have if at least part of the boundary is non-homogenously Dirichlet)?

To take a simple example (in my actual case I have a non-homogenous Neumann part as well, but that is unproblematic), let's say that I have the Poisson equation, \begin{align} -\nabla^2 u &= f &u&\in\Omega \\ u &= u_D &u&\in\partial\Omega \end{align}

and write the weak form as: find $u\in H_D^1(\Omega)$ such that for all $v\in H_0^1(\Omega)$ it holds that $a(u,v) = l(v)$ where \begin{align} a(u,v) &= (\nabla u, \nabla v)_{L^2(\Omega)}\\ l(v) &= (f,v)_{L^2(\Omega)}. \end{align}

Now, how can I show that $a(u,v)$ is coercive and bounded? If $u_D$ had been $0$ everywhere, then I would have had $a(u,v):H_0^1\times H_0^1\rightarrow \mathbf{R}$ so it would have been possible to show coercivity and continuity and then LM would guarantee a unique solution. But I have $a(u,v):H_D^1\times H_0^1\rightarrow \mathbf{R}$. Can I still show continuity and coercivity in the exact same way as usual and then Lax-Milgram (is it still called Lax-Milgram if it isn't from $X\times X$?) will hold? Or what should I do?

Typically, you would decompose your solution into $u = u_D + u_0$, where $u_D$ satisfies inhomogeneous Dirichlet conditions. You can then solve for $u_0 \in H^1_0$ subject to $$\Delta u_0 = f-\Delta u_D.$$ You would then recover a variational formulation over $H^1_0$ again.
Note that $u_D$ is non-unique. To remedy this in proofs, $u_D$ is often taken to be the minimum-energy extension of the trace satisfying boundary conditions.
• So as weak form I should have: find $u_0\in H_0^1(\Omega)$ such that for all $v\in H_0^1(\Omega)$ it holds that $a(u_0, v) = l(v)$ where \begin{align} a(u_0, v) &= (\nabla u_0, \nabla v)_{L^2(\Omega)} &u_0&\in\Omega \\ l(v) &= (f, v)_{L^2(\Omega)} - (\nabla u_D, \nabla v)_{L^2(\Omega)} &u&\in\partial\Omega. \end{align} This is essentially what I do when I go to the finite element form, there I take $u_{h, D}$ to be zero inside $\Omega$. Is it problematic to let $u_D$ and $u_{h, D}$ be completely different? And what is the minimum-energy extension of the trace satisfying boundary conditions? – Christian Dec 3 '13 at 16:53
• $u_{h,D}$ shouldn't be zero inside $\Omega$; it may help to think about the 1D Laplace's equation with linear elements. The hat functions at the ends of the domain are $u_{h,D}$; the equations corresponding to them are moved to the RHS to become load/data, and we are left with hat functions that are zero on the boundary. They are zero over most of the boundary, but they do extend inside. – Jesse Chan Dec 3 '13 at 20:43
• The minimum-energy extension of $u_D$ is defined to be $u\in H^1$ such that $u=u_D$ on the boundary and $\|u\|_H^1$ is minimized. The nice thing about this minimum energy extension is that it can be used to define norms over trace/boundary spaces in finite elements as well. – Jesse Chan Dec 3 '13 at 21:13
• Yes, I was unclear, I meant that $u_{h,D}$ are zero except close to and on the boundary. As for which $u_D$ to take (in the weak formulation), can't I take $u_D = u_{h, D}$? It's certainly feels backwards to (in a sense) go from the finite element formulation to the weak one, but except for that: will it very difficult to show that $l(v)$ is bounded? As for the method you're suggesting... it doesn't lead to Galerkin orthogonality, does it? Because the linear forms in the weak/finite element formulations would be different. – Christian Dec 3 '13 at 21:47
• The minimum energy extension is definitely not $u_{h,D}$ because it needs to solve a Laplace equation (with zero right hand side). But the point you seem to miss is that in order to prove existence and well-posedness, it doesn't actually matter how you choose $u_D$. You choose anything as long as it has the correct boundary values, and you can show that a solution $u_0$ exists and is unique. That's all you need. Of course, if you want, you can choose $u_D=u_{h,D}$ because that function is in $H^1$ but that's only one possible choice, not a necessary one. – Wolfgang Bangerth Dec 4 '13 at 2:19