Ngô Quốc Anh

January 22, 2010

Finite element method: A brief introduction via an 2-point boundary value problem of laplacian equation in 1D

Filed under: Các Bài Tập Nhỏ, Giải tích 9 (MA5265), Nghiên Cứu Khoa Học — Ngô Quốc Anh @ 17:05

Followed by this topic where I discussed how to use Finite Difference Method in numerical analysis. Today, we will study a so-called Finite Element Method, an improved Finite Difference Method. We first consider the following problem

-u''(x)=f(x) where 0 \leq x \leq 1 with boundary conditions u(0)=0=u(1).

The above problem is usually called 2-point boundary value problem of laplacian equation in 1D.

We first consider such problem by using Finite Difference Method. The idea of using the Finite Difference Method is to split equally the interval [0,1] into n pieces by x_i=\frac{i}{n} where i=\overline{0,n}. We then approximate u'' by using the following

\displaystyle u''({x_i}) = \frac{{{u_{i - 1}} - 2{u_i} + {u_{i + 1}}}}{{{h^2}}}, \quad i=\overline{1,n-1}

where h:=\frac{1}{n}. Therefore, we have the following system of linear equations

\displaystyle\frac{{ - 1}}{{{h^2}}}\left( {\begin{array}{*{20}{c}} { - 2} & 1 & {} & {} & {}\\ 1 & { - 2} & 1 & {} & {} \\ {} & {} & {} & {} & {}\\ {} & {} & {} &\ddots& 1\\ {} & {} & {} & 1 & 2 \\ \end{array} } \right) = \left( {\begin{array}{*{20}{c}} {f({x_1})}\\ {f({x_1})}\\ \vdots \\ {f({x_{n - 1}})}\\ \end{array} } \right).

The idea of the Finite Element Method is to split the interval [0,1] into n pieces by x_i where i=\overline{0,n} but not necessarily equality. In order to deal with the problem, we shall look for weak solutions. In the sense of the distribution, u is called a weak solution if

\displaystyle\int_0^1 {\nabla u\nabla vdx} = \int_0^1 {f(x)vdx} ,\quad\forall v \in H_0^1([0,1]).

Under some conditions, for example, if f \in L^2([0,1]), the existence of weak solution is well-understood via the Lax-Milgram lemma.

Let V_h be a collection of piecewise linear map g in [0,1] so that g is linear on every intervals [x_{i-1},x_i] where i=\overline{1,n}. We also suppose that g is such that g(0)=g(1)=0. Clearly the space V_h is finite dimension with a basis \{\phi_i\}_{i=1}^{n-1} constructed as follows

\displaystyle {\phi _i}(x) = \left\{ \begin{gathered}1,\quad x = {x_i}, \hfill \\ 0 , \quad x \ne {x_i}. \hfill \\ \end{gathered}\right.

It is easy to see that \phi_i \in H_0^1([0,1]).

We will find u as a linear combination of these functions \phi_i denoted by u_h, to be exact, we will approximate u by u_h such that at u(x_i)=u_h(x_i) for every i=\overline{1,n-1}. Precisely, let

\displaystyle {u_h}(x) = \sum\limits_{i = 1}^{n - 1} {{\xi _i}{\phi _i}(x)}

we then have

{\xi _i}=\displaystyle u({x_i}), \quad i = \overline {1,n - 1} .

From the equation defining the notion of weak solution we replace v by \phi _i and u by u_h, we now get

\displaystyle\int_0^1 {\left( {\sum\limits_{j= 1}^{n - 1} {u({x_j}){{\phi '}_j}(x)} } \right){{\phi '}_i}(x)dx} = \int_0^1 {f(x){\phi _i}(x)dx}

which yields

\displaystyle\sum\limits_{j = 1}^{n - 1} {u({x_j})\int_0^1 {{{\phi '}_j}(x){{\phi '}_i}(x)dx} } = \int_0^1 {f(x){\phi _i}(x)dx}.

The above identity can be rewritten as a linear system Ax=b as the following

\displaystyle\left( {\begin{array}{*{20}{c}} {({\phi' _1},{\phi' _1})} & {({\phi '_2},{\phi '_1})} &\cdots& {} & {} &\cdots& {({\phi' _{n - 1}},{\phi' _1})}\\{({\phi '_1},{\phi' _2})} & {({\phi' _2},{\phi' _2})} & \cdots & {} & {} & {} & \vdots\\ \vdots&\vdots&\ddots& {} & {} & {} & {}\\{} & {} & {} & {} & {} & {} & {}\\{} & {} & {} & {} & {} & {} & {}\\ \vdots&\vdots& {} & {} & {} &\ddots&\vdots \\{({\phi '_1},{\phi' _{n - 1}})} & {({\phi' _2},{\phi' _{n - 1}})} &\cdots& {} & {} &\cdots& {({\phi' _{n - 1}},{\phi' _{n - 1}})}\\ \end{array} } \right)\left( {\begin{array}{*{20}{c}} {u({x_1})}\\{u({x_2})}\\ \vdots \\ \vdots \\ \vdots \\{u({x_{n - 2}})}\\{u({x_{n - 1}})}\\ \end{array} } \right) = \left( {\begin{array}{*{20}{c}} {(f,{\phi _1})}\\{(f,{\phi _2})}\\ \vdots \\ \vdots \\ \vdots \\{(f,{\phi _{n - 2}})}\\{(f,{\phi _{n - 1}})}\\ \end{array} } \right)

where we use the following notation

\displaystyle (f,g) = \int_0^1 {f(x)g(x)dx}.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: