numerical integrations over an arbitrary quadrilateral region

10
Numerical integrations over an arbitrary quadrilateral region Md. Shafiqul Islam * , M. Alamgir Hossain Department of Mathematics, University of Dhaka, Dhaka 1000, Bangladesh article info Keywords: Double integral Numerical integration Quadrilateral and triangular finite element Gaussian quadrature abstract In this paper, double integrals over an arbitrary quadrilateral are evaluated exploiting finite element method. The physical region is transformed into a standard quadrilateral finite element using the basis functions in local space. Then the standard quadrilateral is subdi- vided into two triangles, and each triangle is further discretized into 4 n 2 right isosceles triangles, with area 1 2n 2 , and thus composite numerical integration is employed. In addition, the affine transformation over each discretized triangle and the use of linearity property of integrals are applied. Finally, each isosceles triangle is transformed into a 2-square finite element to compute new n 2 extended symmetric Gauss points and corresponding weight coefficients, where n is the lower order conventional Gauss Legendre quadratures. These new Gauss points and weights are used to compute the double integral. Examples are con- sidered over an arbitrary domain, and rational and irrational integrals which can not be evaluated analytically. Ó 2009 Elsevier Inc. All rights reserved. 1. Introduction Numerical simulation in engineering science and in applied mathematics has become a powerful tool to model the physical phenomena, particularly when analytical solutions are not available and/or are very difficult to obtain. The integrals arising in practical problems are not always simple or polynomial but rational and irrational expressions, in which the quad- rature scheme cannot evaluate exactly [12]. Even there is no order of Gauss quadrature that will evaluate these integrals exactly [9,10]. The integration points have to be increased in order to improve the integration accuracy and it is desirable to make these evaluations by using as few Gauss points as possible, from the point of view of the computational efficiency. Among various numerical techniques, the finite element method (FEM) is probably one of the most widely accepted even for the complex geometries. This advantage is supported by the element wise coordinate transformation from one space to the other space. From the literature review we may realize that a lot of works of numerical integration using Gauss quadrature over tri- angular region has been done [1–8,13], but a limited work is attempted over the quadrilateral region, such as [12]. Rathod [11] presented some analytical formulas for rational integrals over quadrilateral element but it was confined with monomi- als as numerators. For this, a little work has been done in this study to carry out the development of a good numerical inte- gration technique over the arbitrary convex quadrilateral region with the advent of FEM. Very recently, a rigorous and elaborate survey has been reported in the literature [13] by Rathod et al., and they have derived various orders of extended numerical quadrature rules based on classical Gauss Legendre formula. In their work, a transformation has been used from standard triangular surface to a standard 2-square. All the formulations are derived, and all the examples are tested for certain triangular region. In contrast to this study, we use an arbitrary quadrilateral region with convex and straight sides, which is transformed into a standard square finite element by coordinate transformations. 0096-3003/$ - see front matter Ó 2009 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2009.01.030 * Corresponding author. E-mail address: mdshafi[email protected] (Md. Shafiqul Islam). Applied Mathematics and Computation 210 (2009) 515–524 Contents lists available at ScienceDirect Applied Mathematics and Computation journal homepage: www.elsevier.com/locate/amc

Upload: md-shafiqul-islam

Post on 26-Jun-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Applied Mathematics and Computation 210 (2009) 515–524

Contents lists available at ScienceDirect

Applied Mathematics and Computation

journal homepage: www.elsevier .com/ locate/amc

Numerical integrations over an arbitrary quadrilateral region

Md. Shafiqul Islam *, M. Alamgir HossainDepartment of Mathematics, University of Dhaka, Dhaka 1000, Bangladesh

a r t i c l e i n f o

Keywords:Double integralNumerical integrationQuadrilateral and triangular finite elementGaussian quadrature

0096-3003/$ - see front matter � 2009 Elsevier Incdoi:10.1016/j.amc.2009.01.030

* Corresponding author.E-mail address: [email protected] (Md. Sh

a b s t r a c t

In this paper, double integrals over an arbitrary quadrilateral are evaluated exploiting finiteelement method. The physical region is transformed into a standard quadrilateral finiteelement using the basis functions in local space. Then the standard quadrilateral is subdi-vided into two triangles, and each triangle is further discretized into 4 � n2 right isoscelestriangles, with area 1

2n2, and thus composite numerical integration is employed. In addition,the affine transformation over each discretized triangle and the use of linearity property ofintegrals are applied. Finally, each isosceles triangle is transformed into a 2-square finiteelement to compute new n2 extended symmetric Gauss points and corresponding weightcoefficients, where n is the lower order conventional Gauss Legendre quadratures. Thesenew Gauss points and weights are used to compute the double integral. Examples are con-sidered over an arbitrary domain, and rational and irrational integrals which can not beevaluated analytically.

� 2009 Elsevier Inc. All rights reserved.

1. Introduction

Numerical simulation in engineering science and in applied mathematics has become a powerful tool to model thephysical phenomena, particularly when analytical solutions are not available and/or are very difficult to obtain. The integralsarising in practical problems are not always simple or polynomial but rational and irrational expressions, in which the quad-rature scheme cannot evaluate exactly [12]. Even there is no order of Gauss quadrature that will evaluate these integralsexactly [9,10]. The integration points have to be increased in order to improve the integration accuracy and it is desirableto make these evaluations by using as few Gauss points as possible, from the point of view of the computational efficiency.Among various numerical techniques, the finite element method (FEM) is probably one of the most widely accepted even forthe complex geometries. This advantage is supported by the element wise coordinate transformation from one space to theother space.

From the literature review we may realize that a lot of works of numerical integration using Gauss quadrature over tri-angular region has been done [1–8,13], but a limited work is attempted over the quadrilateral region, such as [12]. Rathod[11] presented some analytical formulas for rational integrals over quadrilateral element but it was confined with monomi-als as numerators. For this, a little work has been done in this study to carry out the development of a good numerical inte-gration technique over the arbitrary convex quadrilateral region with the advent of FEM.

Very recently, a rigorous and elaborate survey has been reported in the literature [13] by Rathod et al., and they havederived various orders of extended numerical quadrature rules based on classical Gauss Legendre formula. In their work,a transformation has been used from standard triangular surface to a standard 2-square. All the formulations are derived,and all the examples are tested for certain triangular region. In contrast to this study, we use an arbitrary quadrilateral regionwith convex and straight sides, which is transformed into a standard square finite element by coordinate transformations.

. All rights reserved.

afiqul Islam).

516 Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524

Then the standard square is discretized into two triangular regions and each of these standard triangle is discretized into4 � n2 triangles instead of 3 � n2 [13]. We then map further each of the standard triangle into the 2-square using standardquadrilateral basis functions, and taking the sum of the discretized triangles. The subsequent formulations are developed byMathematica instead of C-Language, which can be coded easily. Examples are considered over an arbitrary domain, and aproblem of particular domain which is available in the literature. The results, obtained by the present formulations, convergeto the exact solutions correct upto 15 decimal places.

2. Formulation of integrals over an arbitrary quadrilateral region

The integral of an arbitrary function, f(x,y) over an arbitrary quadrilateral region AQ is given by

I ¼Z Z

AQf ðx; yÞdydx ¼

Z ZAQ

f ðx; yÞdxdy: ð1Þ

The integral I of Eq. (1) is then transformed into an integral over the region of the standard quadrilateral,SQ = {(u,v):�1 6 u 6 1, �1 6 v 6 1}, shown in Fig. 1, by the changing the coordinates as:

x ¼X4

i¼1

xiQ i and y ¼X4

i¼1

yiQi; ð2aÞ

where Qi are the bilinear quadrilateral element basis functions in (u,v)-space:

Q 1ðu; vÞ ¼ ð1� uÞð1� vÞ=4; Q 2ðu;vÞ ¼ ð1þ uÞð1� vÞ=4;Q 3ðu; vÞ ¼ ð1þ uÞð1þ vÞ=4; Q 4ðu;vÞ ¼ ð1� uÞð1þ vÞ=4:

ð2bÞ

The corresponding Jacobian [11] is then

J1 ¼oðx; yÞoðu; vÞ ¼

oxou

oyov �

oxov

oyou¼ a0 þ a1uþ a2v ; ð3aÞ

where

a0 ¼18½ðx4 � x2Þðy1 � y3Þ þ ðx3 � x1Þðy4 � y2Þ�;

a1 ¼18½ðx4 � x3Þðy2 � y1Þ þ ðx1 � x2Þðy4 � y3Þ�;

a2 ¼18½ðx4 � x1Þðy2 � y3Þ þ ðx3 � x2Þðy4 � y1Þ�:

ð3bÞ

u

)1,1(2 −1)1,1( −−

4)1,1(− )1,1(3v

(a) Arbitrary quadrilateral, AQ (b) Standard square element, SQ

x

y

),(2 22 yx

),(1 11 yx

),(3 33 yx

4),( 44 yx

u

)1,1(2 −1)1,1( −−

4)1,1(− )1,1(3v

(c) Discretize SQ into two triangles 'T and ''T

'T

''T

Fig. 1. Transformation of arbitrary quadrilateral (AQ) into standard square (SQ), and discretization SQ into two triangles T0 and T00 .

u

)1,1(2 −1)1,1( −−

v

'T

u

)1,1(2 −

3)1,1(− )1,1(1v

''T

3)1,1(−

Fig. 2. Transformation of T00 into T0 .

Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524 517

Now use Eqs. (1)–(3) to obtain,

I ¼Z Z

AQf ðx; yÞdydx ¼

Z ZSQ

f ðxðu;vÞ; yðu;vÞÞjJ1jdudv ¼Z Z

SQgðu; vÞdudv ¼

Z 1

�1

Z 1

�1gðu; vÞdudv ; ð4Þ

where, g(u,v) = f(u,v)jJ1j.Now discretize SQ into two triangles T0 and T00, shown in Fig. 1c, then

I ¼Z Z

SQgðu;vÞdudv ¼

Z ZT 0

gðu; vÞdudv þZ Z

T 00gðu; vÞdudv ; ð5Þ

where T0 = {(u,v):�1 6 v 6 1,�1 6 u 6 �v} and T00 = {(u,v):�1 6 u 6 1,�u 6 v 6 1}.The second integral of Eq. (5) is then transformed into an integral over the region of the same standard triangle,

T0 = {(u,v):�1 6 v 6 1, �1 6 u 6 �v}, using simple coordinate transformation as shown in Fig. 2, such that:

Z ZT 00

gðu;vÞdudv ¼Z Z

T 0gð�v;�uÞdudv: ð6Þ

Then Eq. (5) leads us

I ¼Z Z

SQgðu;vÞdudv ¼

Z ZT 0½gðu;vÞ þ gð�v ;�uÞ�dudv ¼

Z 1

�1

Z �v

�1Fðu;vÞdudv ; ð7Þ

where,F(u,v) = g(u,v) + g(�v,�u).The integral I of Eq. (7) can be further transformed into an integral over the standard 2-square, {(n,g):�1 6 n,g 6 1} using

standard quadrilateral basis functions, Qi(n,g), as shown in Fig. 3.Assume that

u ¼X4

i¼1

uiQiðn;gÞ ¼14ð�1þ 3n� g� ngÞ ¼ uðn;gÞ; ð8aÞ

v ¼X4

i¼1

v iQ iðn;gÞ ¼14ð�1� nþ 3g� ngÞ ¼ vðn;gÞ; ð8bÞ

and

J2 ¼ouon

ovog� ou

ogovon¼ 1

4ð2� n� gÞ: ð8cÞ

Notice that J1 depends on the vertices of the given arbitrary quadrilateral region, but J2 is fixed.

u

v

ξ

)1,1(2 −1)1,1( −−

4)1,1( −

)1,1(2 −1)1,1( −−

4)1,1(− )1,1(3η

(a) Standard triangle, ST (b) Standard square, SQ

)0,0(3

Fig. 3. Transformation of standard triangle ST into 2-square SQ. (a) Standard triangle, ST. (b) Standard square, SQ.

x

y

)3,3(3

)1,2(2

1)2,1( −1R

)4,1(4

Fig. 4. Quadrilateral region R1.

518 Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524

Then the Eq. (7) reduces to

I ¼Z 1

�1

Z 1

�1Fðuðn;gÞ; vðn;gÞÞjJ2jdndg

¼Z 1

�1

Z 1

�1F

14ð�1þ 3n� g� ngÞ;1

4ð�1� nþ 3g� ngÞ

� �� 1

4ð2� n� gÞdndg: ð9Þ

Now Eq. (9) represents an integral over the standard 2-square region: {(n,g):�1 6 n,g 6 1}. Hence using conventional GaussLegendre quadrature rule for the integral I of Eq. (9), we have

I ¼Xs

i¼1

Xs

j¼1

14ð2� gj � niÞwiwj � F

14ð�1þ 3ni � gj � nigjÞ;

14ð�1� ni þ 3gj � nigjÞ

� �; ð10Þ

where (ni,gj) are Gaussian points in the (n,g) directions of order s, and wi, wj are the corresponding weight coefficients [4].We can write Eq. (10) as:

I ¼XN¼s�s

k¼1

c0kFðx0k; y0kÞ; ð11aÞ

where c0k; x0k and y0k can be written in the form:

c0k ¼14ð2� ni � gjÞwiwj; x0k ¼

14ð�1þ 3ni � gj � nigjÞ; y0k ¼

14ð�1� ni þ 3gj � nigjÞ; ð11bÞ

where k = 1,2, . . . ,N, and i, j = 1,2, . . . ,sThe weighting coefficients c0k and sampling points ðx0k; y0kÞ of various order can be now easily computed from Eq. (11).

Using the given program in Mathematica, the outputs of c0k; x0k and y0k for s = 2, 3, 4, 5, 6,7 are given in Table 1.

Now we discretize ST = {(u,v):�1 6 v 6 1,�1 6 u 6 �v} in (u,v)-space of Eq. (7) into 4(n � n) = 4n2 right isosceles triangle,each Ti of area 1/(2n2) [13]. Then Eq. (7) reduces to

I ¼X4ðn�nÞ

i¼1

Z ZTi

Fðu; vÞdudv: ð12Þ

Since each Ti is to be transformed again into a standard triangle, and using composite integration rule [13] we can obtain thefollowing:

I ¼ 14n2

XN¼s�s

k¼1

c0kHðx0k; y0kÞ; ð13Þ

where

Hðx0k; y0kÞ ¼X2n�1

i¼0

X2n�1�i

j¼0

Fx0k þ 2ði� nÞ þ 1

2n;y0k þ 2ðj� nÞ þ 1

2n

� �

þX2n�2

i¼0

X2n�2�i

j¼0

F�x0k þ 2ði� nÞ þ 1

2n;�y0k þ 2ðj� nÞ þ 1

2n

� �; ð14aÞ

and

c0k ¼14ð2� np � gqÞwpwq; x0k ¼

14ð�1þ 3np � gq � npgqÞ;

y0k ¼14ð�1� np þ 3gq � npgqÞ; ðk ¼ 1;2; . . . ;N; p; q ¼ 1;2; . . . ; sÞ:

ð14bÞ

Table 1Outputs of c0k; x

0k and y0k of Eqs. (11) using the given program in the next section.

k c0k x0k y0k

Order of Gauss Legendre quadrature rule, s = 21 0.500000000000000 �0.744016935856293 0.4106836025229592 0.211324865405187 �0.044658198738520 �0.0446581987385203 0.788675134594813 �0.622008467928146 �0.6220084679281464 0.500000000000000 0.410683602522959 �0.744016935856293

Order of Gauss Legendre quadrature rule, s = 31 0.154320987654321 �0.874596669241483 0.6745966692414832 0.151284361822039 �0.443649167310371 0.3309475019311123 0.034784464623228 �0.012701665379258 �0.0127016653792584 0.342542798671788 �0.830947501931112 �0.0563508326896295 0.395061728395062 �0.250000000000000 �0.250000000000000 -6 0.151284361822039 0.330947501931112 0.4436491673103717 0.273857510685414 �0.787298334620741 �0.7872983346207418 0.342542798671788 �0.056350832689629 �0.8309475019311129 0.154320987654321 0.674596669241483 �0.874596669241483

Order of Gauss Legendre quadrature rule, s = 41 0.060501496642801 �0.925747374807601 0.7965252483805062 0.083869666513367 �0.647077355116015 0.5540400000628943 0.045307001847492 �0.283490800681011 0.2376644673281864 0.008401460977899 �0.004820780989426 �0.0048207809894265 0.142982185338485 �0.907654989120614 0.2934623660582956 0.212646651505347 �0.561084266085594 0.1188778210841187 0.140350821011734 �0.108906255706834 �0.1089062557068348 0.045307001847492 0.237664467328186 �0.2834908006810119 0.181544850004359 �0.884049478270466 �0.36289421026126910 0.284942481998960 �0.448887299291690 �0.44888729929169011 0.212646651505347 0.118877821084118 �0.56108426608559412 0.083869666513367 0.554040000062894 �0.64707735511601513 0.112601532307703 �0.865957092583479 �0.86595709258347914 0.181544850004359 �0.362894210261269 �0.88404947827046615 0.142982185338485 0.293462366058295 �0.90765498912061416 0.060501496642801 0.796525248380506 �0.925747374807600

Order of Gauss Legendre quadrature rule, s = 51 0.028067174431214 �0.950889367642309 0.8614703242350192 0.046275406309135 �0.758409434945362 0.6862397210989853 0.036857657161022 �0.476544961484666 0.4296348844539984 0.015744196426143 �0.194680488023970 0.1730300478090115 0.002633266629203 �0.002200555327023 �0.0022005553270236 0.067124593690865 �0.942264702861852 0.5023844531824957 0.114542702111995 �0.715982010624261 0.3609566095871068 0.099488780941957 �0.384617327526421 0.1538519825792629 0.052864972328108 �0.053252644428581 �0.05325264442858110 0.015744196426143 0.173030047809011 �0.19468048802397011 0.097927415226499 �0.929634884453998 �0.02345503851533412 0.172797751608793 �0.653851982579262 �0.11538267247357913 0.161817283950617 �0.250000000000000 �0.25000000000000014 0.099488780941957 0.153851982579262 �0.38461732752642115 0.036857657161022 0.429634884453998 �0.47654496148466616 0.097655803573857 �0.917005066046144 �0.54929453021316317 0.176220431895882 �0.591721954534264 �0.59172195453426418 0.172797751608793 �0.115382672473579 �0.65385198257926219 0.114542702111995 0.360956609587106 �0.71598201062426120 0.046275406309135 0.686239721098985 �0.75840943494536221 0.053501082233226 �0.908380401265687 �0.90838040126568722 0.097655803573857 �0.549294530213163 �0.91700506604614423 0.097927415226499 �0.023455038515334 �0.92963488445399824 0.067124593690865 0.502384453182495 �0.94226470286185225 0.028067174431214 0.861470324235019 �0.950889367642309

Order of Gauss Legendre quadrature rule, s = 61 0.014676040844490 �0.965094665473587 0.8998443629327182 0.026712183112376 �0.824885019554296 0.7687938811151213 0.026176910420220 �0.606455488981548 0.5646332113048014 0.016612442896900 �0.359779268120028 0.3340710599999275 0.006278401847429 �0.141349737547280 0.1299103901896076 0.000991080167803 �0.001140091627990 �0.0011400916279907 0.035095110260008 �0.960515083422740 0.6331638172466778 0.065074456294084 �0.801909923278491 0.520508849654039

(continued on next page)

Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524 519

Table 1 (continued)

k c0k x0k y0k

9 0.066568810067974 �0.554822424771676 0.34500614777778610 0.046428710417516 �0.275782268461456 0.14680793192161211 0.022046614973247 �0.028694769954641 �0.02869476995464112 0.006278401847429 0.129910390189607 �0.14134973754728013 0.053988206897587 �0.953380653041526 0.21770804724482314 0.102236557019614 �0.766117524963210 0.13371104758625215 0.109471725083648 �0.474384407091445 0.00285396507494916 0.083349671145065 �0.144925185950153 �0.14492518595015317 0.046428710417516 0.146807931921612 �0.27578226846145618 0.016612442896900 0.334071059999927 �0.35977926812002819 0.063552674420906 �0.945323618263202 �0.25147329014324720 0.122376656670072 �0.725696554736187 �0.30310635435311921 0.135593779022232 �0.383544372033350 �0.38354437203335022 0.109471725083648 0.002853965074949 �0.47438440709144523 0.066568810067974 0.345006147777786 �0.55482242477167624 0.026176910420220 0.564633211304801 �0.60645548898154825 0.055528891524955 �0.938189187881988 �0.66692906014510126 0.108102297614921 �0.689904156420906 �0.68990415642090627 0.122376656670072 �0.303106354353119 �0.72569655473618728 0.102236557019614 0.133711047586252 �0.76611752496321029 0.065074456294084 0.520508849654039 �0.80190992327849130 0.026712183112376 0.768793881115121 �0.82488501955429631 0.028361001521177 �0.933609605831142 �0.93360960583114232 0.055528891524955 �0.666929060145101 �0.93818918788198833 0.063552674420906 �0.251473290143247 �0.94532361826320234 0.053988206897587 0.217708047244823 �0.95338065304152635 0.035095110260008 0.633163817246677 �0.96051508342274036 0.014676040844490 0.899844362932718 �0.965094665473587

Order of Gauss Legendre quadrature rule, s = 71 0.008383178231877 �0.973906455024851 0.9243093696606672 0.016229336623041 �0.867477088409913 0.8231620095322413 0.018005727931648 �0.695363130529180 0.6595899331909774 0.014218420393005 �0.487276978085690 0.4618309342570695 0.007972981898571 �0.279190825642200 0.2640719353231626 0.002801080689151 �0.107076867761467 0.1004998589818987 0.000426637441423 �0.000647501146528 �0.0006475011465288 0.019988306531199 �0.971265451781595 0.7193736461605589 0.039117553014085 �0.854064060795283 0.62899831040350510 0.044437151163993 �0.664529950865235 0.48284638611155711 0.036780461704774 �0.435382796399849 0.30614838919954612 0.022765035551479 �0.206235641934462 0.12945039228753513 0.010110667549803 �0.016701532004414 �0.01670153200441414 0.002801080689151 0.100499858981898 �0.10707686776146715 0.031435523240266 �0.966994511011860 0.38795855270829616 0.062362772594912 �0.832372967976233 0.31500336900055817 0.072897093734371 �0.614667579653261 0.19702272310153318 0.063602544468903 �0.351461287844349 0.05438386353304819 0.043312161692773 �0.088254996035437 �0.08825499603543720 0.022765035551479 0.129450392287535 �0.20623564193446221 0.007972981898571 0.264071935323162 �0.27919082564220022 0.039901010364923 �0.961830934257069 �0.01272302191431023 0.080124975391153 �0.806148389199546 �0.06461720360015224 0.095986831742216 �0.554383863533048 �0.14853871215565125 0.087344939608496 �0.250000000000000 �0.25000000000000026 0.063602544468903 0.054383863533048 �0.351461287844349 -27 0.036780461704774 0.306148389199546 0.43538279639984928 0.014218420393005 0.461830934257069 �0.48727697808569029 0.041468269273342 �0.956667357502278 �0.41340459653691630 0.084034888207426 �0.779923810422858 �0.44423777620086131 0.102482025775969 �0.494100147412834 �0.49410014741283432 0.095986831742216 �0.148538712155651 �0.55438386353304833 0.072897093734371 0.197022723101533 �0.61466757965326134 0.044437151163993 0.482846386111557 �0.66452995086523535 0.018005727931648 0.659589933190977 �0.69536313052917936 0.033416562465088 �0.952396416732544 �0.74481968998917937 0.068124438478366 �0.758232717603808 - �0.758232717603808 -38 0.084034888207426 0.444237776200861 0.77992381042285839 0.080124975391153 �0.064617203600152 �0.80614838919954640 0.062362772594912 0.315003369000558 �0.83237296797623341 0.039117553014085 0.628998310403505 �0.85406406079528342 0.016229336623041 0.823162009532241 �0.867477088409913

520 Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524

Table 1 (continued)

k c0k x0k y0k

43 0.016339719022330 �0.949755413489287 �0.94975541348928744 0.033416562465088 �0.744819689989179 �0.95239641673254445 0.041468269273342 �0.413404596536916 �0.95666735750227846 0.039901010364923 �0.012723021914310 �0.96183093425706947 0.031435523240266 0.387958552708296 �0.96699451101186048 0.019988306531199 0.719373646160558 �0.97126545178159549 0.008383178231877 0.924309369660667 �0.973906455024851

Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524 521

3. Algorithm and program

Now we give an algorithm and the corresponding Mathematica program of the formulation of the above results in thefollowing:

Algorithm.

Step 1: Input (conventional) Gauss Legendre quadrature rule of order s.Step 2: Set up a subalgorithm for generating new weighting coefficients c0k and sampling points ðx0k; y0kÞ to be called STrian-

gle(s) that accepts as input the order of Gauss Legendre quadrature rule s � s, and defined by the following:

For i = 1,2,3, . . . ,sFor j = 1,2,3, . . . ,sSet k = i + (s � j)sSet the Eq. (11b)

Step 3: Call subprogram STriangle(s).Step 4: Input the value of n then T will be discretized into 4 � n2 subtriangles Ti.Step 5: Set F(u,v) = f(u,v) + f(�v,�u).Step 6: For m = 1,2,3, . . . ,n do steps 7 and 8.

Step 7: For k = 1,2,3, . . . ,s2

Set the Eqs. (14)Step 8: Set the Eq. (13)Step 9: Output for m = 1,2,3, . . . ,n, the results of the required double integral using 4 �m2 subtriangles.

Mathematica program

< NumericalMath ‘GaussianQuadrature’STriangle[s0_]:¼Module[{s=s0},

C1 = Table[0, {i,1,s2}]; X1 = Table[0, {i,1,s2}]; Y1 = Table[{0,i,1,s2}];XI = Table[0, {i,1,s}]; WI = Table[0, {i,1,s}];GQ = GaussianQuadratureWeights [s,�1,1];Do [{XIsit = GQsi, 1t;

WIsit = GQsi, 2t;}, {i,1,s}];For [i = 1,i 6 s,i++, For[j = 1,j 6 s,j++,k = i + (s � j) s;

C1 skt ¼2�XI sit�XI sjt

4 WI sitWI sjt;X1 skt ¼

�1þ3XI sit�XI sjt�XI sitXI sjt

4 ;Y1 skt ¼

�1�XI sitþ3XI sjt�XI sitXI sjt

4 ; �; �; �;s = Input[‘‘Enter the Order of Gauss Legendre Quadrature rule:”];STriangle[s];TableForm[Table[{PaddedForm[C1sit,{20,15}], PaddedForm[X1sit//N, {20,15}],

PaddedForm[Y1sit//N, {20,15}]}, {i,1,s2}],TableHeadings -> {None,{”ntntnt” ‘‘Ck”,”ntntnt” ‘‘Xk”, ”ntntnt” ‘‘Yk”}}](*This generates new weighting coefficients and sampling points*)

s = Input[”Enter the Order of Gauss Legendre Quadrature rule:”];STriangle[s]c1 ¼ 65625

208;c2 ¼ 328125

104;c3 ¼ 239062

208;d1 ¼ 1;d2 ¼ � 125

4;d3 ¼ 175

4;

f½x ;y � :¼ c1x8þc2y9þc3x7y6

d1x9þd2y7þd3 ; (*Example 2 *)

F[x_, y_]:¼f[x, y]+f [-y, -x]H1 = Table[0, {i, 1, 4 s

2}];n = Input[‘‘Enter the value of n then discretise T into 4 n

2triangle:”];

App = Table [0, {i, 1, n}];

Table 2Evaluation of integrals with present formulation.

4 � n2 I1 I2 I3

Conventional Gauss Legendre quadrature rule, s = 24 � 12 3.548632768806294 7.214372270294989 39.0393699182939604 � 22 3.549529431843940 14.766944004609170 42.2493150694819304 � 32 3.549595019797304 17.750257035191130 42.4782418570148604 � 42 3.549607123418959 19.070684778341630 42.5234950558819304 � 52 3.549610565443150 19.741189954099270 42.5368177454550304 � 62 3.549611827770161 20.116746242388630 42.5414897976646404 � 72 3.549612375533267 20.342199117184680 42.5434353160018504 � 82 3.549612643456137 20.484773675355270 42.5443912443543304 � 92 3.549612786789801 20.578713103462840 42.5449087899555604 � 102 3.549612868999844 20.642713389041600 42.545204163254480

Conventional Gauss Legendre quadrature rule, s = 34 � 12 3.549576986770514 14.991195582852550 42.5327738629216904 � 22 3.549611923279893 19.267674833364320 42.5420471679979304 � 32 3.549612907382378 20.238201270672950 42.5459624001402904 � 42 3.549613003510714 20.562029516588160 42.5457832376608504 � 52 3.549613020391390 20.693999549518530 42.5457674294945304 � 62 3.549613024587089 20.755006700820120 42.5457636661165704 � 72 3.549613025900934 20.785863805737210 42.5457659863831304 � 82 3.549613026386182 20.802577184929070 42.5457664884618804 � 92 3.549613026589042 20.812134862867130 42.5457663881047104 � 102 3.549613026682440 20.817848407116390 42.545766345330780

Conventional Gauss Legendre quadrature rule, s = 44 � 12 3.549611375919784 18.644834842838010 42.5373081524498404 � 22 3.549613007180398 20.426445648571700 42.5460026705409404 � 32 3.549613025681180 20.714072045679120 42.5457519231011004 � 42 3.549613026658277 20.787746094199740 42.5457646021448104 � 52 3.549613026765570 20.811776994488120 42.5457664958644504 � 62 3.549613026783790 20.820951110531610 42.5457665326011604 � 72 3.549613026787929 20.824870465865810 42.5457663859284704 � 82 3.549613026789089 20.826694184618200 42.5457663571264504 � 92 3.549613026789468 20.827602140250910 42.5457663677409104 � 102 3.549613026789609 20.828079820693800 42.545766374439800

Conventional Gauss Legendre quadrature rule, s = 54 � 12 3.549612941962180 20.001548496386720 42.5439983169288804 � 22 3.549613026386345 20.724196221428660 42.5457522034302104 � 32 3.549613026777556 20.806304854241970 42.5457663873492904 � 42 3.549613026788828 20.822364616979130 42.5457664348038104 � 52 3.549613026789607 20.826571851647100 42.5457663945964104 � 62 3.549613026789697 20.827902601602610 42.5457663560656104 � 72 3.549613026789713 20.828384024624050 42.5457663761872304 � 82 3.549613026789717 20.828576865317250 42.5457663803594004 � 92 3.549613026789718 20.828660594976600 42.5457663789118004 � 102 3.549613026789717 20.828699421589810 42.545766377750830

Conventional Gauss Legendre quadrature rule, s = 64 � 12 3.549613022130449 20.511614603806180 42.5440515067753504 � 22 3.549613026780732 20.801457772983100 42.5457687899917904 � 32 3.549613026789571 20.824307659861010 42.5457663566046704 � 42 3.549613026789710 20.827736127791060 42.5457663138416304 � 52 3.549613026789717 20.828459142086950 42.5457663693645304 � 62 3.549613026789717 20.828648914435710 42.5457663818032204 � 72 3.549613026789717 20.828707120508940 42.5457663786904004 � 82 3.549613026789717 20.828727210885140 42.5457663766925804 � 92 3.549613026789717 20.828734824429590 42.5457663765508004 � 102 3.549613026789717 20.828737938333210 42.545766376774700

Conventional Gauss Legendre quadrature rule, s = 74 � 12 3.549613026522518 20.707379944169620 42.5454759842527904 � 22 3.549613026789507 20.821572098014380 42.5457638130533904 � 32 3.549613026789714 20.827856159815450 42.5457664935160904 � 42 3.549613026789716 20.828580466438830 42.5457663931344104 � 52 3.549613026789717 20.828703557317910 42.5457663742482104 � 62 3.549613026789714 20.828730388598700 42.5457663764306704 � 72 3.549613026789715 20.828737369893600 42.5457663766173504 � 82 3.549613026789716 20.828739447190620 42.5457663769696604 � 92 3.549613026789717 20.828740134528660 42.5457663771569904 � 102 3.549613026789717 20.828740382547010 42.545766377131950

522 Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524

Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524 523

For[m = 1, m 6 n, m++,For[k = 1, k 6 s

2, k++,

H1 skt ¼X2m�1i¼0

X2m�1�ij¼0

FX1 skt þ 2ði� mÞ þ 1

2m;Y1 skt þ 2ðj� mÞ þ 1

2m

� �

þX2m�2i¼0

X2m�2�ij¼0

F�X1 skt þ 2ði� mÞ þ 1

2m;�Y1 skt þ 2ðj� mÞ þ 1

2m

� �; �;

App smt ¼1

4m 2

Xs2k¼1

C1 sktH1 skt; �;

TableForm[Table[{4 i2, PaddedForm[Appsit, {20, 15}]}, {i, 1, n}],

TableHeadings -> {None, {‘‘4 � n2”, ‘‘ntntnt” ‘‘Result”}}]

4. Numerical examples

In this section, we consider three examples to show that the present formulation may be applied to integrate any kind(rational, irrational) of integrals which can not be evaluated even analytically [12].

Example 1. Evaluation of I1 ¼RR

R1ðxþ yÞ�1=2 dydx, whose exact value is 3.549613026789710, where R1, Shown in Fig. 4, is a

quadrilateral region connecting the points (�1,2), (2,1), (3,3) and (1,4).

Example 2. Evaluation of I2 ¼R 1�1

R 1�1

c1x8þc2y9þc3x7y6

d1x9þd2y7þd3dydx, [12] whose approximate solution is 20.828740382547010 for

c1 ¼ 65625208 ; c2 ¼ 328125

104 ; c3 ¼ 239062208 ; d1 ¼ 1; d2 ¼ � 125

4 and d3 ¼ 1754 .

Example 3. Evaluation of I3 ¼R 1�1

R 1�1

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffic1x16 þ c2y10 þ c3x9y11

pdydx, [12] whose approximate solution is

42.545766377156990 for c1 ¼ 65625208 ; c2 ¼ 328125

104 ; c3 ¼ 239062208 .

Now we evaluate the integrals I1, I2 and I3 using the algorithm and the program given in the previous section. The resultsare shown in Table 2. The same integrals are evaluated also with the conventional Gauss Legendre quadrature rules uptoorder 30 which are shown in Table 3.

Table 3Evaluation of integrals with conventional Gauss Legendre quadratures.

Gauss Legendre quadratures (s) I1 I2 I3

2 3.538042018537409 0.387606580014487 14.4398435386800003 3.548681950777742 4.041358450537683 37.2866037238156504 3.549525572963957 10.089910171346000 42.5733716379034805 3.549603973886602 14.879287405070980 42.5253150612506206 3.549612027291594 17.674892815377660 42.5701789071211107 3.549612911402360 19.131995271464990 42.5503067885235408 3.549613013031479 19.899903477007960 42.5426253761779509 3.549613025108831 20.322734561053090 42.539420680238030

10 3.549613026580426 20.555472875766140 42.54228897366670011 3.549613026763296 20.681520680622670 42.54376181901537012 3.549613026786368 20.749429020941480 42.54520303264853013 3.549613026789497 20.786044518617900 42.54565708067917014 3.549613026789992 20.805780742278950 42.54603870055675015 3.549613026789129 20.816403494092420 42.54601838821529016 3.549613026789194 20.822114563674550 42.54599717649244017 3.549613026786854 20.825183168462830 42.54589101687681018 3.549613026777713 20.826831279051700 42.54583622042413019 3.549613026774801 20.827716125721150 42.54578154943856020 3.549613026767568 20.828190998868870 42.54576140210610021 3.549613026825007 20.828445861309920 42.54574923696685022 3.549613026737036 20.828582505269080 42.54575020169988023 3.549613026569079 20.828655837438350 42.54575335260067024 3.549613025991078 20.828694597062120 42.54575785802733025 3.549613031422469 20.828718485449080 42.54576432637282026 3.549613018504444 20.828726175065580 42.54576190085240027 3.549613031080794 20.828736825240480 42.54576903859380028 3.549612941950191 20.828658255862420 42.54572636604867029 3.549612944461810 20.828703859533620 42.54573425835153030 3.549612817087430 20.828562379650680 42.545669325364050

524 Md. Shafiqul Islam, M. Alamgir Hossain / Applied Mathematics and Computation 210 (2009) 515–524

The results in Table 2 show that the obtained values are stable for large number of triangles (n) with lower order Gausspoints (s), while Table 3 shows that if use higher order Gauss quadrature the obtained values oscillate. From Table 3, we maycomment that there is no exact order of conventional Gauss quadrature rule those will compute higher order rational andirrational integrals with good accuracy. Both tables also confirm that the present formulation with lower order Gauss pointsgive us better accuracy with high precision compare to the higher order conventional Gauss quadratures.

5. Conclusions

In this paper, the formulation of numerical evaluation of double integrals even for rational or irrational expressions overan arbitrary quadrilateral region is discussed in details. At first we have used a coordinate transformation from arbitraryquadrilateral region into a standard 2-square finite element. Then the standard square is discretized into two triangular re-gions and each of the standard triangle is further discretized into 4 � n2 triangles. We then map further each of the standardtriangle into the 2-square using standard quadrilateral basis functions. For each triangle we then generate s2 new Gausspoints using the lower order conventional Gauss quadrature of order s, and thus the composite numerical integration overthe standard triangular finite elements are applied. The program of the present formulations is written by Mathematica,which may be coded easily. We observe that computed results of the given examples converge to the exact solutions correctupto 15 decimal places. We notice that higher order conventional Gauss quadrature rule may produce a larger error than thatof a certain lower order, which is shown in Table 3. For this composite numerical integration with lower order Gauss pointspresented in this paper are more reliable to find the approximate solution that converges to the exact solution. This tech-nique may give fruitful results also for arbitrary triangular regions. Thus the performance of the present formulation isexcellent.

References

[1] P.C. Hammer, O.J. Marlowe, A.H. Stroud, Numerical integration over simplexes and cones, Math. Tables Other Aids Comput. 10 (1956) 130–136.[2] P.C. Hammer, A.H. Stroud, Numerical integration over simplexes, Math. Tables Other Aids Comput. 10 (1956) 137–139.[3] P.C. Hammer, A.H. Stroud, Numerical evaluation of multiple integrals, Math. Tables Other Aids Comput. 12 (1958) 272–280.[4] A.H. Stroud, Numerical Quadrature and Solution of Ordinary Differential Equations, Springer-Verlag, New York, Berlin, Heidelberg, 1974.[5] G.R. Cowper, Gaussian quadrature formulas for triangles, Int. J. Numer. Methods Eng. 7 (1973) 405–408.[6] F.G. Lethor, Computation of double integrals over a triangle, J. Comput. Appl. Math. 2 (1976) 219–224.[7] P. Hillion, Numerical integration on a triangle, Int. J. Numer. Methods Eng. 11 (1977) 797–815.[8] M.E. Lauresn, M. Gellert, Some criteria for numerically integrated matrices and quadrature formulas for triangles, Int. J. Numer. Methods Eng. 12 (1978)

67–76.[9] O.C. Zienkiewicz, The Finite Element Method, third ed., McGraw-Hill Inc., 1977.

[10] W.B. Bickford, A First Course in the Finite Element Method, Irwin, Illinois, 1990.[11] H.T. Rathod, Some analytical integration formulae for linear isoparametric finite elements, Comput. Struct. 30 (1988) 1101–1109.[12] G. Yagawa, G.W. Ye, S. Yoshimura, A numerical integration scheme for finite element method based on symbolic manipulation, Int. J. Numer. Methods

Eng. 29 (1990) 1539–1549.[13] H.T. Rathod, K.V. Nagaraja, B. Venkatesudu, On the application of two symmetric Gauss Legendre quadrature rules for composite numerical integration

over a triangular surface, Appl. Math. Comput. 190 (2007) 21–39.