Capaian Pembelajaran
• Mahasiswa mampu menerapkan metode numerik Gauss Quadrature Rule untuk penyelesaian
persamaan integral tertentu
Gauss Quadrature Rule of Integration
http://numericalmethods.eng.usf.
edu
What is Integration?
Integration
=
ba
dx ) x ( f I
The process of measuring the area under a curve.
Where:
f(x) is the integrand
a= lower limit of integration b= upper limit of integration
f(x)
a b
y
x
b
a
dx ) x ( f
TWO-POINT GAUSSIAN
QUADRATURE RULE
Basis of the Gaussian Quadrature Rule
Previously, the Trapezoidal Rule was developed by the method of undetermined coefficients. The result of that development is summarized below.
) 2 (
) 2 (
) ( )
( )
(
1 2b a f
a b a f
b
b f c a
f c dx
x f
b
a
+ −
= −
+
Basis of the Gaussian Quadrature Rule
The two-point Gauss Quadrature Rule is an extension of the Trapezoidal Rule approximation where the arguments of the function are not predetermined as a and b but as unknowns x1 and x2. In the two-point Gauss Quadrature Rule, the
integral is approximated as
=
b
a
dx ) x ( f
I c
1f ( x
1) + c
2f ( x
2)
Basis of the Gaussian Quadrature Rule
The four unknowns x1, x2, c1 and c2 are found by assuming that the formula gives exact results for integrating a general third order polynomial,
f ( x ) = a
0+ a
1x + a
2x
2+ a
3x
3.
Hence
( )
=
b+ + +
a b
a
dx x
a x
a x
a a
dx ) x (
f
0 1 2 2 3 3b
a
a x a x
a x x
a
+ + +
= 2 3 4
4 3 3
2 2
1 0
( )
−
+
−
+
−
+
−
= 2 3 4
4 4
3 3
3 2
2 2
1 0
a a b
a a b
a a b
a b
a
Basis of the Gaussian Quadrature Rule
It follows that
( ) (
3 23)
2 2 2 2
1 0
2 3
1 3 2
1 2 1
1 0
1
a a x a x a x c a a x a x a x
c dx
) x ( f
b a
+ +
+ +
+ +
+
=
Equating Equations the two previous two expressions yield
( )
−
+
−
+
−
+
− 2 3 4
4 4
3 3
3 2
2 2
1 0
a a b
a a b
a a b
a b
a
( ) (
3 23)
2 2 2 2
1 0
2 3
1 3 2
1 2 1
1 0
1
a a x a x a x c a a x a x a x
c + + + + + + +
=
( ) ( ) ( ) (
2 23)
3 1 1 3 2
2 2 2
1 1 2 2
2 1
1 1 2
1
0
c c a c x c x a c x c x a c x c x
a + + + + + + +
=
Basis of the Gaussian Quadrature Rule
Since the constants a0, a1, a2, a3 are arbitrary
2
1
c
c a
b − = +
1 1 2 22 2
2 a c x c x
b − = +
2 2 2 2
1 1 3
3
3 a c x c x
b − = +
32 2 3
1 1 4
4
4 a c x c x
b − = +
Basis of Gauss Quadrature
The previous four simultaneous nonlinear Equations have only one acceptable solution,
1
2
a c b −
=
22
a c b −
= 2
3 1
1
2
a b
a
x b + +
−
= −
2 3
1
2
2
a b
a
x b + +
= −
Basis of Gauss Quadrature
Hence Two-Point Gaussian Quadrature Rule
( ) ( )
+ +
− + −
+ +
−
−
= −
+
3 2 1 2
2 3 2
1 2
2 )
(
1 1 2 2a b a
f b a b a
b a
f b a b
x f c x
f c dx
x f
b
a
HIGHER POINT GAUSSIAN
QUADRATURE FORMULAS
Higher Point Gaussian Quadrature Formulas
) ( )
( )
( )
( x dx c
1f x
1c
2f x
2c
3f x
3f
b
a
+ +
is called the three-point Gauss Quadrature Rule.
The coefficients c1, c2, and c3, and the functional arguments x1, x2, and x3 are calculated by assuming the formula gives exact expressions for
( )
+ + + + +
b a
dx x
a x
a x
a x
a x
a
a
0 1 2 2 3 3 4 4 5 5General n-point rules would approximate the integral
) x ( f c .
. . . . . . ) x ( f c ) x ( f c dx
) x (
f
n nb
1 1+
2 2+ +
integrating a fifth order polynomial
Arguments and Weighing Factors for n-point Gauss Quadrature
Formulas
In handbooks, coefficients and
Gauss Quadrature Rule are
−1
=1 1
n
i
c
ig ( x
i) dx
) x ( g
as shown in Table 1.
Points Weighting
Factors Function
Arguments 2 c1 = 1.000000000
c2 = 1.000000000 x1 = -0.577350269 x2 = 0.577350269 3 c1 = 0.555555556
c2 = 0.888888889 c3 = 0.555555556
x1 = -0.774596669 x2 = 0.000000000 x3 = 0.774596669 4 c1 = 0.347854845
c2 = 0.652145155 c3 = 0.652145155 c4 = 0.347854845
x1 = -0.861136312 x2 = -0.339981044 x3 = 0.339981044 x4 = 0.861136312
arguments given for n-point
given for integrals
Table 1: Weighting factors c and function
arguments x used in Gauss Quadrature Formulas.
Arguments and Weighing Factors for n-point Gauss Quadrature
Formulas
Points Weighting
Factors Function
Arguments 5 c1 = 0.236926885
c2 = 0.478628670 c3 = 0.568888889 c4 = 0.478628670 c5 = 0.236926885
x1 = -0.906179846 x2 = -0.538469310 x3 = 0.000000000 x4 = 0.538469310 x5 = 0.906179846 6 c1 = 0.171324492
c2 = 0.360761573 c3 = 0.467913935 c4 = 0.467913935 c5 = 0.360761573 c6 = 0.171324492
x1 = -0.932469514 x2 = -0.661209386 x3 = -0.2386191860 x4 = 0.2386191860 x5 = 0.661209386 x6 = 0.932469514
Table 1 (cont.) : Weighting factors c and function arguments x used in Gauss Quadrature Formulas.
Arguments and Weighing Factors for n-point Gauss Quadrature
Formulas
So if the table is given for
− 1
1
dx ) x (
g
integrals, how does one solveb
a
dx ) x (
f
? The answer lies in that any integral with limits of a , b
can be converted into an integral with limits
− 1 , 1
Letc mt
x = +
If then
x = a , t = − 1 ,
b x =
If then
t = 1
Such that:2 a m b −
=
Arguments and Weighing Factors for n-point Gauss Quadrature
Formulas
2 a c b +
Then
=
Hence2 2
a t b
a
x b +
− +
= b a dt
dx 2
= −
Substituting our values of x, and dx into the integral gives us
− −
− + +
=
1
1
2 2 2
)
( b a b a dt
a t f b
dx x f
b
a
Example 1
For an integral derive the one-point Gaussian Quadrature Rule.
, dx ) x ( f
b a
Solution
The one-point Gaussian Quadrature Rule is
( )
11
f x c
dx ) x ( f
b a
Solution
The two unknowns x1, and c1 are found by assuming that the formula gives exact results for integrating a general first order polynomial,
. )
(x a0 a1x
f = +
( )
= b +a b
a
dx x a a
dx x
f ( ) 0 1
b
a
a x x
a
+
= 2
2 1 0
( )
−
+
−
= 2
2 2
1 0
a a b
a
b
a
Solution
It follows that
(
0 1 1)
)
1( x dx c a a x f
b
a
+
=
Equating Equations, the two previous two expressions yield
( )
−
+
− 2
2 2
1 0
a a b
a b
a = c
1( a
0+ a
1x
1) = a
0( c
1) + a
1( c
1x
1)
Basis of the Gaussian Quadrature Rule
Since the constants a0, and a1 are arbitrary
c
1a b − =
1 1 2
2
2 a c x
b − =
a b
c
1= −
1
2
a x = b +
giving
Solution
Hence One-Point Gaussian Quadrature Rule
( )
− +
=
bf ( x ) dx c
1f x
1( b a ) f b 2 a
a
Example 2
Use two-point Gauss Quadrature Rule to approximate the distance covered by a rocket from t=8 to t=30 as given by
−
=
30−
8
8 2100 9
140000
140000
2000 . t dt
ln t x
Find the true error, for part (a).
Also, find the absolute relative true error, for part (a).a
a)
b) c)
Et
Solution
First, change the limits of integration from [8,30] to [-1,1]
by previous relations as follows
−
+
− +
= −
11 30
8
2
8 30 2
8 30 2
8
30 f x dx
dt ) t ( f
( )
−
+
=
11
19 11
11 f x dx
Solution (cont)
Next, get weighting factors and function argument values from Table 1 for the two point rule,
000000000
1
1 .
c =
577350269
1
0 .
x = −
000000000
2
1 .
c =
577350269
2
0 .
x =
Solution (cont.)
Now we can use the Gauss Quadrature formula
( 11 19 ) 11 ( 11 19 ) 11 ( 11 19 )
11
1 1 2 21
1
+ +
+
+
−
x f
c x
f c dx
x f
( 11 0 5773503 19 ) 11 ( 11 0 5773503 19 )
11 − + + +
= f ( . ) f ( . )
) .
( f )
. (
f 12 64915 11 25 35085
11 +
=
) .
( )
.
( 296 8317 11 708 4811
11 +
=
m .44 11058
=
Solution (cont)
since
) .
( ) .
. ln (
) .
(
f 9 8 12 64915
64915 12
2100 140000
140000 2000
64915
12 −
= −
8317
= 296.
) .
( ) .
. ln (
) .
(
f 9 8 25 35085
35085 25
2100 140000
140000 2000
35085
25 −
= −
4811
= 708.
Solution (cont)
The absolute relative true error,
t , is (Exact value = 11061.34m). %
. .
t
100
34 11061
44 11058 34
11061 −
=
% .0262
= 0
c)
The true error, , is
b)