5. http://numericalmethods.eng.usf.edu
5
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
)
(
)
(
)
( 2
1
b
f
a
b
a
f
a
b
b
f
c
a
f
c
dx
x
f
b
a
6. http://numericalmethods.eng.usf.edu
6
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 )
x
(
f
c
)
x
(
f
c 2
2
1
1
7. http://numericalmethods.eng.usf.edu
7
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, .
x
a
x
a
x
a
a
)
x
(
f 3
3
2
2
1
0
Hence
b
a
b
a
dx
x
a
x
a
x
a
a
dx
)
x
(
f 3
3
2
2
1
0
b
a
x
a
x
a
x
a
x
a
4
3
2
4
3
3
2
2
1
0
4
3
2
4
4
3
3
3
2
2
2
1
0
a
b
a
a
b
a
a
b
a
a
b
a
8. http://numericalmethods.eng.usf.edu
8
Basis of the Gaussian
Quadrature Rule
It follows that
3
2
3
2
2
2
2
1
0
2
3
1
3
2
1
2
1
1
0
1 x
a
x
a
x
a
a
c
x
a
x
a
x
a
a
c
dx
)
x
(
f
b
a
Equating Equations the two previous two expressions yield
4
3
2
4
4
3
3
3
2
2
2
1
0
a
b
a
a
b
a
a
b
a
a
b
a
3
2
3
2
2
2
2
1
0
2
3
1
3
2
1
2
1
1
0
1 x
a
x
a
x
a
a
c
x
a
x
a
x
a
a
c
3
2
2
3
1
1
3
2
2
2
2
1
1
2
2
2
1
1
1
2
1
0 x
c
x
c
a
x
c
x
c
a
x
c
x
c
a
c
c
a
9. http://numericalmethods.eng.usf.edu
9
Basis of the Gaussian
Quadrature Rule
Since the constants a0, a1, a2, a3 are arbitrary
2
1 c
c
a
b
2
2
1
1
2
2
2
x
c
x
c
a
b
2
2
2
2
1
1
3
3
3
x
c
x
c
a
b
3
2
2
3
1
1
4
4
4
x
c
x
c
a
b
10. http://numericalmethods.eng.usf.edu
10
Basis of Gauss Quadrature
The previous four simultaneous nonlinear Equations have
only one acceptable solution,
2
1
a
b
c
2
2
a
b
c
2
3
1
2
1
a
b
a
b
x
2
3
1
2
2
a
b
a
b
x
11. http://numericalmethods.eng.usf.edu
11
Basis of Gauss Quadrature
Hence Two-Point Gaussian Quadrature Rule
2
3
1
2
2
2
3
1
2
2
)
( 2
2
1
1
a
b
a
b
f
a
b
a
b
a
b
f
a
b
x
f
c
x
f
c
dx
x
f
b
a
13. http://numericalmethods.eng.usf.edu
13
Higher Point Gaussian
Quadrature Formulas
)
(
)
(
)
(
)
( 3
3
2
2
1
1 x
f
c
x
f
c
x
f
c
dx
x
f
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 5
5
4
4
3
3
2
2
1
0
General n-point rules would approximate the integral
)
x
(
f
c
.
.
.
.
.
.
.
)
x
(
f
c
)
x
(
f
c
dx
)
x
(
f n
n
b
a
2
2
1
1
integrating a fifth order polynomial
14. http://numericalmethods.eng.usf.edu
14
Arguments and Weighing Factors
for n-point Gauss Quadrature
Formulas
In handbooks, coefficients and
Gauss Quadrature Rule are
1
1 1
n
i
i
i )
x
(
g
c
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.
16. http://numericalmethods.eng.usf.edu
16
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 solve
b
a
dx
)
x
(
f ? The answer lies in that any integral with limits of
b
,
a
can be converted into an integral with limits
1
1,
Let
c
mt
x
If then
,
a
x 1
t
,
b
x
If then 1
t
Such that:
2
a
b
m
17. http://numericalmethods.eng.usf.edu
17
Arguments and Weighing Factors
for n-point Gauss Quadrature
Formulas
2
a
b
c
Then Hence
2
2
a
b
t
a
b
x
dt
a
b
dx
2
Substituting our values of x, and dx into the integral gives us
1
1
2
2
2
)
( dt
a
b
a
b
t
a
b
f
dx
x
f
b
a
19. http://numericalmethods.eng.usf.edu
19
Solution
The two unknowns x1, and c1 are found by assuming that the
formula gives exact results for integrating a general first order
polynomial,
.
)
( 1
0 x
a
a
x
f
b
a
b
a
dx
x
a
a
dx
x
f 1
0
)
(
b
a
x
a
x
a
2
2
1
0
2
2
2
1
0
a
b
a
a
b
a
20. http://numericalmethods.eng.usf.edu
20
Solution
It follows that
1
1
0
1
)
( x
a
a
c
dx
x
f
b
a
Equating Equations, the two previous two expressions yield
2
2
2
1
0
a
b
a
a
b
a
1
1
0
1 x
a
a
c
)
(
)
( 1
1
1
1
0 x
c
a
c
a
23. http://numericalmethods.eng.usf.edu
23
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
9
2100
140000
140000
2000 dt
t
.
t
ln
x
Find the true error, for part (a).
Also, find the absolute relative true error, for part (a).
a
a)
b)
c)
t
E
28. http://numericalmethods.eng.usf.edu
28
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) t
E
Value
e
Approximat
Value
True
Et
44
.
11058
34
.
11061
m
9000
.
2
29. Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice
tests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, please
visit
http://numericalmethods.eng.usf.edu/topics/gauss_qua
drature.html