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).$

  • 2
    $\begingroup$ Why are you integrating in the left-hand side and not in the right-hand side? $\endgroup$
    – nicoguaro
    Commented Oct 16, 2016 at 23:37
  • 1
    $\begingroup$ 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$. $\endgroup$ Commented Oct 17, 2016 at 17:47
  • $\begingroup$ @nicoguaro: I edited it. Please help address my question. $\endgroup$
    – user177196
    Commented Oct 18, 2016 at 5:32
  • $\begingroup$ @WolfgangBangerth: thanks a lot. I edited it. $\endgroup$
    – user177196
    Commented Oct 18, 2016 at 5:32

1 Answer 1


You need to look at this a bit more systematically. In essence, you're not wrong in your approach, but it gets more complicated if you want to do this in 2d/3d, or if you have nonzero boundary values. My take on these issues is in lectures 21.5 and following here: http://www.math.colostate.edu/~bangerth/videos.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.