# 3 questions on FEM to solve elliptic PDE with homogeneous and mixed boundary conditions

Assume we use FEM with piecewise linear finite elements to discretize the BVP over $\omega = (0,1)$: $-u''+ bu' + u = 2x$, $u(0) = u(1) = 0$ for parameter $b\in R$. Given a mesh $T = \left\{x_i\right\}_{i=0}^{N}$ where $x_i = 1 - (1-\frac{i}{N})^{\beta}$ for some $\beta > 1$. Using principle of error equilibration, find a value of $\beta$.

My attempt: I tried to look up the literature for the mathematical definition of "error equilibrium in FEM," but I failed to find it. Could someone please help with a useful reference?

On the other hand, I have a question on my discretization method: as we know, multiplying both sides of the PDE by a test function $v\in H_{0}^{1}(w)$. Then we would have the following variational formulation:

$\int_{0}^{1} (u'v' - buv' + uv) = \int_{0}^{1} 2xv$ for every $v\in H_{0}^{1}(w)$

Now, define $B[u,v] = \int_{0}^{1} (u'v' - buv' + uv)$ and $F(v) = 2xv$. Let $\left\{\phi_{i}\right\}_{i=0}^{N-2}$ be the basis of the finite-dimensional subspace $V_h\subset H_{0}^{1}(w)$ over the given mesh $T$. Now, we can express $u(x) = \sum_{i=0}^{N-2} \phi_{i}(x)u_i$ where $\phi_{i}(x)$ are piecewise linear functions defined over the mesh $T$.

My questions:

(1) Due to the boundary conditions: $u(0) = u(1) = 0$, would the first basis function (i.e, $\phi_0(x)$) be a piecewise hat function with vertices $(x_0, 0), (x_1, 1)$ and $(x_2,0)$, and the last basis function (i.e, $\phi_N(x)$) are piecewise hat functions with vertices $(x_{N-2}, 0), (x_{N-1}, 1)$ and $(x_N,0)$? Usually, for Dirichlet condition, $\phi_0(x)$ are with vertices $(x_0, 1), (x_1,0)$ and $(x_0, 0)$, but then in that case, $u(x) = \sum_{i=1}^{N} \phi_{i}(x)u_i + \alpha \phi_{0}(x)$ where $\alpha = u(0)$, and $u(1) = 0$.

(2) Is working with $v\in H_{0}^{1}(w)$ the right setting in this case? Usually, for one-dimensional problem like this, we are only allowed to let either $v(0) = 0$ or $v(1) = 0$, but in this case as I could see that the information from the given data at $x=1$ and $x=0$ are "useless," I decided to set $v(1) = v(0) = 0$. This resulted in the slight change in the set of basis functions $\left\{\phi_{i}\right\}_{i=0}^{N}$.

(3) Assume the BCs now are $u'(0) = 1$ and $u(1) = 1$, could I use the same set of test function as described in (1) above, but adding two elements: $\phi_{0}(x) =$ linear function between 2 points $(0,1)$ and $(x_1, 0)$, while $\phi_{N}(x) =$ linear function connecting $(x_{N-1},0)$ and $(x_N, 1).$

• Why are you integrating in the left-hand side and not in the right-hand side? – nicoguaro Oct 16 '16 at 23:37
• Also, the solution is not $u(x)=\sum \phi_i(x) u_i(x)$ but just $u(x)=\sum \phi_i(x) u_i$. The $u_i$ are expansion coefficients, and consequently numbers, not functions of $x$. – Wolfgang Bangerth Oct 17 '16 at 17:47
• @WolfgangBangerth: thanks a lot. I edited it. – user177196 Oct 18 '16 at 5:32