A Computational Study With Finite Element Method A
A Computational Study With Finite Element Method A
Abstract
In this paper, we consider two methods, the Second order Central Difference Method (SCDM) and
the Finite Element Method (FEM) with P1 triangular elements, for solving two dimensional general
linear Elliptic Partial Differential Equations (PDE) with mixed derivatives along with Dirichlet and
Neumann boundary conditions. These two methods have almost the same accuracy from theoret-
ical aspect with regular boundaries, but generally Finite Element Method produces better ap-
proximations when the boundaries are irregular. In order to investigate which method produces
better results from numerical aspect, we apply these methods into specific examples with regular
boundaries with constant step-size for both of them. The results which obtained confirm, in most
of the cases, the theoretical results.
Keywords
Finite Element Method, Finite Difference Method, Gauss Numerical Quadrature, Dirichlet
Boundary Conditions, Neumann Boundary Conditions
1. Introduction
Finite Difference schemes and Finite Element Methods are widely used for solving partial differential equations
[1]. Finite Element Methods are time consuming compared to finite difference schemes and are used mostly in
problems where the boundaries are irregular. In particularly, it is difficult to approximate derivatives with finite
difference methods when the boundaries are irregular. Moreover, Finite Element methods are more complicated
than Finite Difference schemes because they use various numerical methods such as interpolation, numerical in-
tegration and numerical methods for solving large linear systems (see [2]-[6]). Also the mathematically deriva-
How to cite this paper: Papanikos, G. and Gousidou-Koutita, M.Ch. (2015) A Computational Study with Finite Element Me-
thod and Finite Difference Method for 2D Elliptic Partial Differential Equations. Applied Mathematics, 6, 2104-2124.
http://dx.doi.org/10.4236/am.2015.612185
G. Papanikos, M. Ch. Gousidou-Koutita
tion of Finite Element Methods come from the theory of Hilbert Space, and Sobolev Spaces as well as from var-
iational principles and the weighted residual method (see [5]-[12]).
In this paper, we will describe the Second order Central Difference Scheme and the Finite Element Method
for solving general second order elliptic partial differential equations with regular boundary conditions on a rec-
tangular domain. In addition, for both of these methods, we consider the Dirichlet and Neumann Boundary con-
ditions, along the four sides of the rectangular area. Also, we make a brief error analysis for Finite element me-
thod. Moreover, for the finite element method, we site two other important numerical methods which are impor-
tant in order that the algorithm can be performed.
These methods are the bilinear interpolation over a linear Lagrange element, Gauss quadrature and contour
Gauss Quadrature on a triangular area. Furthermore, these two schemes lead to a linear system which we have to
solve. For the purpose of this paper, we solve the outcome systems with Gauss-Seidel method which is briefly
discussed. In the last section, we contacted a numerical study with Matlab R2015a. We apply these methods into
specific elliptical problems, in order to test which of these methods produce better approximations when the Di-
richlet and Neumann boundary conditions are imposed. Our results show us that the accuracy of these two me-
thods depends on the kind of the elliptical problem and the type of boundary conditions. In Section 2, we study
the Second order Central Difference Scheme. In Section 3, we give the Finite Element Method, bilinear interpo-
lation in P1, Gauss Quadrature, Finite Element algorithm and error analysis. In Section 4, we give some numeri-
cal results, in Section 5, we give the conclusions and finally in Section 6 we give the relevant references.
p, q, s, b1 , b2 , r , f ∈ C1 ( Ω ) and u ∈ C ( Ω ) C 2 ( Ω )
Moreover in this paper two types of boundary conditions are considered:
u ( x, y ) g ( x, y ) on Γ1 (Dirichlet Boundary Conditions).
=
∂u
= g1 ( x ) on Γ 2 (Neumann Boundary Conditions).
∂n
The boundary ∂Ω = Γ1 Γ 2 and n is the normal vector along the boundaries.
We divide the rectangular domain Ω in a uniform Cartesian grid
( x , y ) =−
i j ( ( i 1) h, ( j − 1) k ) : i =
1, 2, , N , j=
1, 2, , M
∂ 2 u ui , j +1 − 2ui , j + ui , j −1
=
∂y 2 k2
+ O k2 ( ) (4)
2105
G. Papanikos, M. Ch. Gousidou-Koutita
∂u ui+1, j − ui−1, j
=
∂x 2h
+ O h2 ( ) (5)
∂u ui , j +1 − ui , j −1
=
∂y 2k
+ O k2 ( ) (6)
( ) ( ) ( )
where O h 2 , O k 2 and O k 2 + h 2 are the truncation errors.
We now approximate the PDE (1) using the relations (2), (3), (4), (5), (6) and we obtain the second order cen-
tral difference scheme:
=u0, j g= (
a, y j u N , j g a, y j= )
for each j 0,1, , M ( )
= ( xi , c ) ui , M g ( xi , d )=
ui ,0 g= for each i 0,1, , N
2106
G. Papanikos, M. Ch. Gousidou-Koutita
then the dimensions of the matrix A, u and b are: ( N − 1)( M − 1) ×1 for the vectors u, b and
( N − 1)( M − 1) × ( N − 1)( M − 1)
for the matrix A. Moreover, the form of matrix A and the vector u are given by:
B1 D1 O O O O O O
G B2 D2 O O O O O
2
O G3 B3 D3 O O O O
A=
O O O O CM − 3 BM − 2 DM −3 O
O O O O CM − 2 BM − 2 DM − 2
O O O O O GM −1 BM −1
and
u = u1,1 , u2,1 , u3,1 , , u N −1,1 , u1,2 , u2,2 , u3,2 , , u N −1,2 , , u1,M −1 , , u N −1,M −1
As we can see the matrix A is tri-diagonal block Matrix. These block matrices
Bk ,=
k 1, 2, , M − 1; Gl ,=
l 2,3, , M − 1; Dm , m
= 1, 2, , M − 2
are tri-diagonal as well of order ( N − 1)( N − 1)
Neumann Boundary Conditions
∂u ∂u
= ( x, d ) g=
1 ( x) ( x, c ) g 3 ( x )
∂y ∂y
∂u ∂u
= 2 ( y)
( b, y ) g= ( a, y ) g 4 ( y )
∂x ∂x
We approximate the Neumann boundary conditions in every side of the rectangular domain as follows
1st side (North side of the rectangular area)
∂u u −u
( x, d ) =g1 ( x ) ⇒ i ,M +1 i ,M −1 =g1i ⇒ ui ,M +1 =
ui ,M −1 + 2kg1i for j =
M,i =
1, 2, , N − 1 (9)
∂y 2k
2nd side (East side of the rectangular area)
∂u u −u
( b, y ) = g 2 ( y ) ⇒ N +1, j N −1, j = g 2 j ⇒ u N +1, j = u N −1, j + 2hg 2 j for j = 1, 2, , M − 1, i = N (10)
∂x 2h
3rd side (South side of the rectangular area)
∂u u −u
( x, c ) =g3 ( x ) ⇒ i ,1 i ,−1 =g3i ⇒ ui ,−1 =ui ,1 − 2kg3i for j =0, i =1, 2, , N − 1 (11)
∂y 2k
4th side (West side of the rectangular area)
∂u u −u
( a, y ) = g 4 ( y ) ⇒ 1, j −1, j = g 4 j ⇒ u−1, j = u1, j − 2hg 4 j for j = 1, 2, , M − 1, i = 0 (12)
∂x 2h
Using the relations (9), (10), (11), (12) the values ui , M +1 , u N +1, j , ui , −1 and u−1, j which lies outside the rectangular
domain can be eliminated when appeared in the linear system.
Thus the block tri-diagonal matrix A has dimensions ( N + 1)( M + 1) × ( N + 1)( M + 1) and the vectors u, b are
of ( N + 1)( M + 1) × 1 order. The matrix A and the vector u are given below:
2107
G. Papanikos, M. Ch. Gousidou-Koutita
B0 L0 O O O O O O O
C K1 D1 O O O O O O
1
O C2 K2 D2 O O O O O
O O C3 K3 D3 O O O O
A=
O O O O O CM − 2 K M −2 DM − 2 O
O O O O O O CM −1 K M −1 DM −1
O O O O O O O LM BM
and
u = u0,0 , u1,0 , u2,0 , , u N ,0 , u0,1 , u1,1 , u2,1 , , u N ,1 , , u0, M , , u N −1, M , u N , M
{u ( ) }
∞
If A is strictly diagonally dominant, then for any choice of u( 0 ) , Gauss-Seidel method give sequence
k
k =0
that converge to the unique solution of Au = b .
The proof of theorem 1 can be found in [2] [3].
where p ∈ C1 ( Ω ) , q ∈ C1 ( Ω ) , s ∈ C1 ( Ω ) , c ∈ C1 ( Ω ) , d ∈ C1 ( Ω ) , r ∈ C ( Ω ) , f ∈ C ( Ω ) and u ∈ C 2 ( Ω ) C ( Ω ) .
With boundary conditions
u ( x, y ) g ( x, y ) on Γ1 (Dirichlet Boundary Conditions).
=
∂u
= g1 ( x ) on Γ 2 (Neumann Boundary Conditions).
∂n
And the boundary ∂Ω = Γ1 Γ 2
In order to approximate the solution of (13) with FEM algorithm we must transform the PDE into its weak
form and solve the following problem.
Find u ∈ H Γ11 ( Ω )
a ( u, v ) = l ( v ) ∀v ∈ H Γ11 ( Ω ) (14)
where
∂u ∂v ∂u ∂v s ∂u ∂v s ∂u ∂v ∂u ∂u
a ( u=
, v) ∫∫ p ∂x ∂x + q ∂y ∂y + 2 ∂y ∂x + 2 ∂x ∂y − c ∂x v − d ∂y v − ruv dxdy
Ω
and
l (v) =
− ∫∫ fvdxdy + ∫ g1vds
Ω Γ2
2108
G. Papanikos, M. Ch. Gousidou-Koutita
p, q, s, c, d , r ∈ L∞ ( Ω ) , f ∈ L2 ( Ω ) and g1 ∈ L2 ( Γ 2 )
when the Neumann boundary Conditions are applied ∫ g1vds ≠ 0 , else if we have only Dirichlet Boundary
Γ2
where H Γ11 ( Ω=
) {u ∈ Η ( Ω ) u=
1
g on Γ1 } and Η1 ( Ω ) ={u ∈ L2 ( Ω ) : Du ∈ L2 ( Ω )} . Also with D we denote
the weak derivatives of u. The spaces Η1 ( Ω ) , H Γ11 are Sobolev function spaces which also considered to be
Hilbert spaces(see [7]-[9]).
The uniqueness of the solution of weak form (14) depends on Lax-Milgram theorem along with trace theo-
rem (see [7]). In addition according to Rayleigh-Ritz theorem the solution of the problem (14) are reduced to
minimization of the linear functional J : H Γ11 ( Ω ) → , (see [7]).
The first step in order the FEM algorithm to be performed is the discretization of the rectangular domain
=Ω [ a, b ] × [ c, d ] ⊂ R 2 by using Lagrange linear triangular elements.
We denote with Pk the set of all polynomials of degree ≤ k in two variables [7]. For k = 1 we have the linear
Lagrange triangle and
{
1 = ϕ ∈ C ( Ω ) , ϕ ( x, y ) =a + bx + cy , dim ( 1 ) =3 }
Also the triangulation of the rectangular area should have the below properties:
We assume that the triangular elements Ti ,1 ≤ i ≤ κ , κ = κ ( h ) , are open and disjoint, where h is the maxi-
mum diameter of the triangle element.
The vertices of the triangles all call nodes, we use the letter V for vertices and E for nodes.
We also assume that there are no nodes in the interior sides of triangles.
j (xj , yj ) ( x j , y j ) , j 1, 2,3
(i )
ϕ= u=
( )
in every vertex V j = x(ji ) , y (ji ) of a triangular element.
Thus it creates the below linear system with unknown coefficients a, b, c.
ϕ1( i ) ( x1 , y1 ) 1 x1( i ) y1( ) a
i
(i )
ϕ2 ( x2 , y2 ) = 1 x2( i ) y2( ) b
i
(i ) i
ϕ3 ( x3 , y3 ) 1 x3
(i )
y3( ) c
Solving the system we find the approximate polynomial of u
ϕ ( i ) ( x, y ) = N1( i ) ( x, y ) ϕ1( i ) ( x1 , y1 ) + N 2( i ) ( x, y ) ϕ2( i ) ( x2 , y2 ) + N 3( i ) ( x, y ) ϕ3( i ) ( x3 , y3 )
= ∑N (j ) ( x, y ) ϕ (j ) ( x j , y j )
3
i i
j =1
where
2109
G. Papanikos, M. Ch. Gousidou-Koutita
=a1 (i ) ( x( ) y( )=
2
i
− x( ) y ( ) )
3
i
3
i
, b () (2
=
y( ) − y( ) )
i
i
, c
i
()
2 ( x( ) − x( ) )
3
i
i 3
i
2
i
1 1
2A 2A 2A
=a2 (i ) (x 3
(i ) (i )
y1 − x1 y3
=
(i ) (i )
, b2( )
i ) (=
y −y )
(i )
3
(i )
, c( )
1 (x i
(i )
1 − x3( )
i
)
2
2A 2A 2A
=a3( )
i (x 1
(i ) (i )
y2 − x2 y1
=
(i ) (i )
, b3( )
i ) (=
y −y )
(i )
1
(i )
, c( )
2 (x i
(i )
2 − x1( )
i
)
3
2A 2A 2A
(i ) (i ) (i ) (i )
The function N j ( x, y ) =a1 + b1 x + c1 y is the interpolation function or shape function and it has the fol-
lowing property:
1 Αν j =k
N (j ) ( xk , yk ) =
=
i
, k 1, 2,3
0 Αν j ≠ k
Where ng is the number of Gauss integration points, wi are the weights and ( xi , yi ) are the Gauss integration
points.
The linear space Pκ is the space of all linear polynomial of two variables of order k
The following Table 1 gives the number of quadrature points for degrees 1 to 4 as given in Ref. [10]. It should
be mentioned that for some N, the corresponding ng is not necessarily unique. (see [10] and references therein).
Gauss quadrature in general triangular element
Initially we transform the general triangle Τ into a canonical triangle using the linear basis functions:
Ν1 (ξ ,η ) =1 − ξ − η
Ν 2 (ξ ,η ) =
ξ
Ν 3 (ξ ,η ) =
η
1 3 1
2 6 3
3 10 4
4 15 5
2110
G. Papanikos, M. Ch. Gousidou-Koutita
The variables x, y for the random triangle can be written as affine map of basis functions:
3
x = r1 (ξ ,η ) = ∑Ν i (ξ ,η ) xi = Ν1 (ξ ,η ) x1 + Ν 2 (ξ ,η ) x2 + Ν 3 (ξ ,η ) x3
i =1
3
y = r2 (ξ ,η ) = ∑Ν i (ξ ,η ) yi = Ν1 (ξ ,η ) y1 + Ν 2 (ξ ,η ) y2 + Ν 3 (ξ ,η ) y3
i =1
with
x1 ( y2 − y3 ) + x2 ( y3 − y1 ) + x3 ( y1 − y2 )
Ak =
2
is the area of the triangle.
Contour quadrature rule
In the Finite Element Method when the Neumann boundary conditions are imposed it is essential to compute
numerically the below Contour integral in general triangular area.
Pj
=I g ( x, y ) ds
∫= ∫ g ( x, y ) ds
Pi
The basic idea is to transform the straight contour PiPj to an interval l = [ a, b ] , and then the Gaussian qua-
drature for single variable function.
Using the basis functions we have the following relations in every side of the triangle
Along side 1 (P1P2):
P2 1
∫ g ( x, y ) ds = ( x2 − x1 ) + ( y2 − y1 ) ∫g ( x1 + ( x2 − x1 ) ξ , y1 + ( y2 − y1 ) ξ ) dξ
2 2
P1 0
( x2 − x1 ) + ( y2 − y1 ) ( x2 − x1 )(1 + ξ ) ( y2 − y1 )(1 + ξ )
2 2
1
= ∫ g x1 + , y1 + dξ
2 −1 2 2
( x2 − x1 ) + ( y2 − y1 ) ( x2 − x1 ) (1 + ξi ) ( y2 − y1 ) (1 + ξi )
2 2
N
≈ ∑ci g x1 + , y1 +
2 i =1 2 2
Along side 3: (P3P1):
P1 1
∫ g ( x, y ) ds = ( x3 − x1 ) + ( y3 − y1 ) ∫g ( x1 + ( x3 − x1 )η , y1 + ( y3 − y1 )η ) dη
2 2
P3 0
( x3 − x1 ) + ( y3 − y1 ) ( x3 − x1 ) (1 + η ) ( y3 − y1 ) (1 + η )
2 2
1
= ∫ g x1 + , y1 + dη
2 −1 2 2
( x3 − x1 ) + ( y3 − y1 ) ( x3 − x1 )(1 + ηi ) ( y3 − y1 )(1 + ηi )
2 2
N
≈ ∑ci g x1 + , y1 +
2 i =1 2 2
2111
G. Papanikos, M. Ch. Gousidou-Koutita
∫ g ( x, y ) ds = ( x3 − x2 ) + ( y3 − y2 ) ∫g ( x2 + ( x3 − x2 )η , y2 + ( y3 − y2 )η ) dη
2 2
P2 0
( x3 − x2 ) + ( y3 − y2 ) ( x3 − x2 ) (1 + η ) ( y3 − y2 ) (1 + η )
2 2
1
= ∫ g x2 + , y2 + dη
2 −1 2 2
( x3 − x2 ) + ( y3 − y2 ) ( x3 − x2 )(1 + ηi ) ( y3 − y2 )(1 + ηi )
2 2
N
≈ ∑ci g x2 + , y2 +
2 i =1 2 2
The error of the bilinear interpolation Gauss quadrature depend on the dimension of the polynomial subspace
(see [11]).
ϕ ( i ) ( x, y ) =a + bx + cy
The index i represents the number of triangular elements which exist in the rectangular domain. The polyno-
mials must be piecewise because the linear combination of them must form a continuous and integrable function
with continuous first and second derivatives.
The existence and uniqueness of the approximate solution is ensured by the Lax-Milgram-Galerkin and Rayleight-
Ritz theorems (see [1] [7] [8]).
Firstly as we describe in a previous section, we have to triangulate the domain before the algorithm evaluated.
After that the algorithm seeks approximation of the solution of the form:
m
uh ( x, y ) = ∑γ iϕi ( x, y )
i =1
where ϕi , i = 1, 2, , m is the linear combination of independent piecewise linear polynomials and γ i , i = 1, 2, , m
are constants with m is the number of nodes. Actually, the polynomials ϕi corresponds to shape functions
Νj, j = 1, 2,3 in every vertex of the triangles. Thus the approximate solution is the linear combination of all the
independent interpolation functions multiplied with some constant γ i . Some of these constants for example,
γ n +1 , γ n + 2 , , γ m are used to ensure that the Dirichlet boundary conditions if there are exist
u h ( x, y ) = g ( x, y )
are satisfied on Γ1 and the remaining constants γ 1 , γ 2 , , γ n are used to minimize the functional J ( uh ) .
Inserting the approximate solution uh ( x, y ) = ∑γ iϕi ( x, y ) for v into the functional J ( v ) and we have:
m
i =1
m 1 m ∂ϕ 2 m ∂ϕi
2
m ∂ϕi m ∂ϕi m ∂ϕi m
J ∑γ iϕi =
∫∫ p ∑γ i
i
+ q ∑γ i + s ∑γ i ∑γ i − c ∑γ i ∑γ iϕi
= i 1 Ω= i 1
2 ∂x= i 1 ∂y= i 1= ∂y i 1 = ∂x i 1= ∂x i 1
(16)
m ∂ϕ m
2
m m m
−d ∑γ i i ∑γ iϕi − r ∑γ iϕi + f ∑γ iϕi dxdy − ∫ g1 ∑γ iϕi ds
i 1=∂y i 1 = = i 1
= i 1=
Γ2 i 1
2112
G. Papanikos, M. Ch. Gousidou-Koutita
c ∂ϕ ∂ϕ j d ∂ϕi ∂ϕ j
− i ϕj + ϕi − ϕj + ϕi − rϕiϕ j dxdy γ i
2 ∂x ∂x 2 ∂y ∂y
m ∂ϕi ∂ϕk s ∂ϕi ∂ϕk s ∂ϕi ∂ϕk
− ∫∫ f ϕ j dxdy + ∫ g1ϕ j ds −
= ∑ ∫∫ p + +
∂x ∂x 2 ∂y ∂x 2 ∂x ∂y
Ω Γ2 k = n +1 Ω
∂ϕi ∂ϕk c ∂ϕi ∂ϕ d ∂ϕ ∂ϕ
+q − ϕk + k ϕi − i ϕk + k ϕi − rϕiϕk dxdy γ k
∂y ∂y 2 ∂x ∂x 2 ∂y ∂y
for each j = 1, 2, , n .This set of equations can be written as a linear system:
Ac = b (17)
where c = ( γ 1 , γ 2 , , γ n ) , A = ( aij ) and b = ( β1 , β 2 , , β n ) are defined by
t t
c ∂ϕ ∂ϕ j d ∂ϕi ∂ϕ j
− i ϕj + ϕi − ϕj + ϕi − rϕiϕ j dxdy
2 ∂x ∂x 2 ∂y ∂y
=
for each i 1,=
2, , n, j 1, 2, , m .
m ∂ϕi ∂ϕk s ∂ϕi ∂ϕk s ∂ϕi ∂ϕk
− ∫∫ f ϕ j dxdy + ∫ g1ϕ j ds −
βi = ∑ ∫∫ p + +
∂x ∂x 2 ∂y ∂x 2 ∂x ∂y
Ω Γ2 k = n +1 Ω
∂ϕi ∂ϕk c ∂ϕi ∂ϕ d ∂ϕ ∂ϕ
+q − ϕk + k ϕi − i ϕk + k ϕi − rϕiϕk dxdy γ k
∂y ∂y 2 ∂x ∂x 2 ∂y ∂y
The choice of subspace 1 for our approximation is important because can ensure us that the matrix A will be
positive definite and band( [2]-[4]). According to the previous analysis leads again to a linear system, which can
be solved as we described in a previous section with Gauss-Seidel Method (see [2]-[4]).
a ( u=
, v) l (v) ∀v ∈ H Γ11 ( Ω ) (18)
The error analysis of finite element method depend on the Cea’s lemma for elliptic boundary value problems.
The proof can be found in [1] [7].
2113
G. Papanikos, M. Ch. Gousidou-Koutita
where C ( u ) is positive constant dependent on the smoothness of the function u, h is the mesh size parameter and
s is a positive real number, dependent on the smoothness of u and the degree of the piecewise polynomials com-
prising in 1 . In our case we have the Lagrange linear elements so the degree of the piecewise polynomials is one.
Combining, relations Cea’s lemma we shall be able to deduce that:
c1
u − uh H Γ1 ( Ω )
≤ C (u ) h (21)
1 c0
The relation (21) gives a bound of the global error e= u − uh in terms of the size mesh parameter h. Such a
bound on the global error is called priori error bound.
L2-norm
For proving an error estimate in L2-norm the regularity of the solution of (13) plays an essential role. By the
Aubin-Nitsche duality argument the error estimate in L2 norm between u and its finite element approximation uh
( )
is O ( h ) . However this bound can be improved to O h 2 , (see [1] [7]).
4. Numerical Study
In this section we contact a numerical study using Matlab R2015a. For the purpose of this paper we cite repre-
sentative examples of second order general elliptic partial differential equations in order to make comparisons
between these two methods with various step-sizes and the mesh size parameters of finite element method. Thus
in each example we present results for the absolute and relevant absolute errors in L2 norm along with their
graphs. Also we make graphical representations of the exact and approximate solution of the specific problem as
well.
The problems of the examples can be found in [13] [14].
Example 1
Find the approximate solution of the partial differential equation
∂ 2u ∂ 2u
+ = 0, 0 ≤ x ≤ 4, 0 ≤ y ≤ 4
∂x 2 ∂y 2
with Dirichlet boundary conditions along the rectangular domain
( x, y ) e y cos x − e x cos y, ( x, y ) ∈ ∂Ω
u=
and exact solution
u (=
x, y ) e x cosx − e y cosy
Results (Table 2 and Table 3)
In Figure 2 and Figure 3 we have the graphs for SCDM and in Figure 4 and Figure 5 for FEM.
Example 2
Find the approximate solution of the partial differential equation
∂ 2 u ∂ 2 u 1 ∂u
− 2 − 2 += f ( x, y ) , 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
∂x ∂y 10 ∂y
with Dirichlet boundary conditions along the rectangular domain
u = 0 on three lower side of ∂Ω and Neumann boundary condition
∂u
( x,1) = 0
∂y
and exact solution
πy
u ( x, y ) = sin ( πx ) sin
2
2114
G. Papanikos, M. Ch. Gousidou-Koutita
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.1, k 0.1 h = 0.1
x y
Relevant error % Relevant error %
Absolute error u − uaprox L
Absolute error u − uaprox L
u − uaprox L 100%
2
u − uaprox L 2
100%
2
uL 2
uL
2 2
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.05, k 0.05 h = 0.05
x y
Relevant error % Relevant error %
Absolute error u − uaprox L
Absolute error u − uaprox L
u − uaprox L 100%
2
u − uaprox L 2
100%
2
uL 2
2
uL2
2115
G. Papanikos, M. Ch. Gousidou-Koutita
2116
G. Papanikos, M. Ch. Gousidou-Koutita
2117
G. Papanikos, M. Ch. Gousidou-Koutita
u ( x, 0 =
) 0.1350e x u ( x,1= (
) 0.1350 e x +1 + log ( 2 ) x − x 2 ( )
2
)
and exact solution
( (
( x, y ) 0.1350 e x + y + log y 2 + 1 x − x 2
u= )( )
2
)
Table 4. Numerical results.
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.1, k 0.1 h = 0.1
2
uL 2
2
uL
2
0 0.1 0 0 0 0
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.05, k 0.05 h = 0.05
2
uL 2
2
uL
2
0 0.1 0 0 0 0
2118
G. Papanikos, M. Ch. Gousidou-Koutita
2119
G. Papanikos, M. Ch. Gousidou-Koutita
2120
G. Papanikos, M. Ch. Gousidou-Koutita
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.1, k 0.1 h = 0.1
2
uL 2
uL
2 2
0 0.1 0 0 0 0
Second order central difference scheme with steps Finite element method with mesh size
= =
h 0.05, k 0.05 h = 0.05
2
uL2
2
uL
2
0 0.1 0 0 0 0
2121
G. Papanikos, M. Ch. Gousidou-Koutita
2122
G. Papanikos, M. Ch. Gousidou-Koutita
2123
G. Papanikos, M. Ch. Gousidou-Koutita
5. Conclusion
Finally, we can say that the data which we obtained from these examples show that both of these methods pro-
duce quite sufficient approximations for our problems. Also the results prove that the accuracy of them depends
on the kind of the elliptical problem and the type of boundary conditions. For further research, the approxima-
tions of these methods can be improved. This improvement can be made if in the second order difference
scheme we keep more taylor series terms in order to approximate the derivatives and in finite element method if
we use higher order elements such as quadratic Lagrange triangular elements or cubic Hermite triangular ele-
ments.
References
[1] McDonough, J.M. (2008) Lectures on Computational Numerical Analysis of Partial Differential Equations.
http://www.engr.uky.edu/~acfd/me690-lctr-nts.pdf
[2] Gousidou-Koutita, M.C. (2014) Computational Mathematics. Tziolas, Ed.
[3] Gousidou-Koutita, M.C. (2009) Numerical Methods with Applications to Ordinary and Partial Differential Equations.
Notes, Department of Mathematics, Aristotle University of Thessaloniki, Thessaloniki.
[4] Gousidou-Koutita, M.C. (2004) Numerical Analysis. Christodoulidis, K., Ed.
[5] Dunavant, D.A. (1985) High Degree Efficient Symmetrical Gaussian Quadrature Rules for the Triangle. International
Journal for Numerical Methods in Engineering, 21, 1129-1148. http://dx.doi.org/10.1002/nme.1620210612
[6] Reynolds, A.C., Burden, R.L. and Faires, J.D. (1981) Numerical Analysis. Second Edition. Youngstown State Univer-
sity, Youngstown.
[7] Dougalis, V.A. (2013) Finite Element Method for the Numerical Solution of Partial Differential Equations. Revised
Edition, Department of Mathematics, University of Athens, Zografou and Institute of Applied Mathematics and Com-
putational Mathematics, FORTH, Heraklion.
[8] Suli, E. (2012) Lecture Notes on Finite Element Method for Partial Differential Equations. Mathematical Institute,
University of Oxford, Oxford.
[9] Everstine, G.C. (2010) Numerical Solution of Partial Differential Equations. George Washington University, Wash-
ington DC.
[10] Szabó, B. and Babuska, I. (1991) Finite Element Analysis. Wiley, New York.
[11] Isaacson, E. and Keller, H.B. (1996) Analysis of Numerical Methods. John Wiley and Sons, New York.
[12] Papanikos, G. (2015) Numerical Study with Methods of Characteristic Curves and Finite Element for Solving Partial
Differential Equations with Matlab. Master’s Thesis.
[13] Yang, W.Y., Cao, W., Chung, T.S. and Morri, J. (2005) Applied Numerical Methods Using MATLAB. John Wiley &
Sons, Hoboken.
[14] Gropp, W.D. and Keyest, D.E. (1989) Domain Decomposition with Local Refinement. Research Report YALEU/DCS/
RR-726.
2124