# 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
{"ft_lang_label":"__label__en","ft_lang_prob":0.8206124,"math_prob":0.99999666,"size":2452,"snap":"2020-45-2020-50","text_gpt3_token_len":897,"char_repetition_ratio":0.11846405,"word_repetition_ratio":0.0,"special_character_ratio":0.4021207,"punctuation_ratio":0.1199262,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.000008,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-29T00:01:19Z\",\"WARC-Record-ID\":\"<urn:uuid:e8c7b9af-bb1d-4863-8878-a07a9fff250b>\",\"Content-Length\":\"151518\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5c949f7f-0004-4518-aa6c-564b9a6b8ad0>\",\"WARC-Concurrent-To\":\"<urn:uuid:99f99c3d-5a76-44d5-94de-5845f8f9e27f>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://scicomp.stackexchange.com/questions/25209/3-questions-on-fem-to-solve-elliptic-pde-with-homogeneous-and-mixed-boundary-con\",\"WARC-Payload-Digest\":\"sha1:XATCN5WWJVUZRELVMGXXUVRTURPOZK2X\",\"WARC-Block-Digest\":\"sha1:AYTBJGZTQIMFQHLZFRE4T7CK5GKUVPBR\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107902038.86_warc_CC-MAIN-20201028221148-20201029011148-00418.warc.gz\"}"}