Faculty of Engineering
Civil Engineering Department
Numerical Analysis
ECIV 3306
Chapter 22
Integration of Equations
Gauss Quadrature
• Gauss quadrature implements a strategy of
positioning any two points on a curve to define
a straight line that would balance the positive
and negative errors.
• Hence, the area evaluated under this straight
line provides an improved estimate of the
integral.
Two points Gauss-Legendre Formula
• Assume that the two Integration points are xo and x1 such that:
ba
2
I f ( x).dx c f ( x ) c
ba
1 1 2 f ( x2 )
2
I c0 f ( x0 ) c1 f ( x1 )
• c0 and c1 are constants, the function arguments x0 and x1 are
unknowns…….(4 unknowns)
Two points Gauss-Legendre Formula
3
2nd order, and 3rd order 1
1
functions: c0 f ( x0 ) c1 f ( x1 ) x 3 dx 0
1
Two points Gauss-Legendre Formula
x b 1 f(x) f()
f(x1)
x a 1 f(xo)
ba ba
x
2 2
ba x
dx d xo x1
2 a b
-1 1
Higher-Points Gauss-Legendre Formula
1
I f ( )d
1
i using n Gauss points :
n
I ci f (i ) c1 f (1 ) c2 f ( 2 ) ..... cn f ( n )
i 1
Multiple Points Gauss-Legendre
Points Weighting factor Function argument Exact for
2 1.0 -0.577350269 up to 3rd
1.0 0.577350269 degree
b A b
A
1
0
1 Can be evaluated by
f ( x)dx 1/ A t 2 f dt
t
Newton-Cotes closed
formula
Improper Integral - Examples
• . dx
0.5 1
(t )
1
dt
0.5 1
dt
2 x( x 2) 0 t 2
1/ t 2 0 1 2t
• . 0
e y
sin y dy
2
2
0
e y
sin y dy
2
2
e y sin 2 y dy
1/ 2 1 1 / t
y
e sin y dy
2
2
e sin 2
(1 / t ) dt
2 0 t
• . 2
ye y
dy 2
2
ye y
dy 2
ye y dy
1/ 2 1 1 / t
y
ye dy 3
e dt
2 0 t
Multiple Integration
• Double integral:
d b
I f ( x, y ) dx dy
y c x a
Multiple Integration using Gauss
Quadrature Technique
. 1
x •b & x a 1
ba ba ba
x & dx d
2 2 2
• .
y d 1 & x c 1
d c d c d c
y & dy d
2 2 2
• .
d c ba
d b 1 1
I f ( x, y ) dx dy f ( , ) d d
y c x a
2 2 1 1
Multiple Integration using Gauss Quadrature
Technique
Now we can use the Gauss Quadrature technique:
d c ba n n
I
2
2 j 1 i 1
c j ci f (i , j )
T ( x, y) 2 xy 2 x x 2 2 y 2 72
6 8
I (2 xy 2 x x 2 2 y 2 72)dxdy
0 0