8/2/2019 Mws Gen Int Ppt Gaussquadrature
1/30
4/5/2012 http://numericalmethods.eng.usf.edu 1
Gauss Quadrature Rule of
Integration
Major: All Engineering Majors
Authors: Autar Kaw, Charlie Barker
http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM
Undergraduates
http://numericalmethods.eng.usf.edu/http://numericalmethods.eng.usf.edu/8/2/2019 Mws Gen Int Ppt Gaussquadrature
2/30
Gauss Quadrature Rule ofIntegration
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu/http://numericalmethods.eng.usf.edu/8/2/2019 Mws Gen Int Ppt Gaussquadrature
3/30
http://numericalmethods.eng.usf.edu3
What is Integration?Integration
b
a
dx)x(fI
The process of measuringthe 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
8/2/2019 Mws Gen Int Ppt Gaussquadrature
4/30
http://numericalmethods.eng.usf.edu4
Two-Point GaussianQuadrature Rule
8/2/2019 Mws Gen Int Ppt Gaussquadrature
5/30
http://numericalmethods.eng.usf.edu5
Basis of the Gaussian
Quadrature RulePreviously, the Trapezoidal Rule was developed by the method
of undetermined coefficients. The result of that development is
summarized below.
)(2
)(2
)()()( 21
bfab
afab
bfcafcdxxf
b
a
8/2/2019 Mws Gen Int Ppt Gaussquadrature
6/30
http://numericalmethods.eng.usf.edu6
Basis of the Gaussian
Quadrature Rule
The two-point Gauss Quadrature Rule is an extension of theTrapezoidal Rule approximation where the arguments of the
function are not predetermined as a and b but as unknownsx1 and x2. In the two-point Gauss Quadrature Rule, theintegral is approximated as
b
adx)x(fI )x(fc)x(fc 2211
8/2/2019 Mws Gen Int Ppt Gaussquadrature
7/30
http://numericalmethods.eng.usf.edu7
Basis of the Gaussian
Quadrature RuleThe four unknowns x1, x2, c1 and c2 are found by assuming thatthe formula gives exact results for integrating a general thirdorder polynomial, .xaxaxaa)x(f 33
2
210
Hence
b
a
b
a
dxxaxaxaadx)x(f 332
210
b
a
xaxaxaxa
432
4
3
3
2
2
10
432
44
3
33
2
22
10
aba
aba
abaaba
8/2/2019 Mws Gen Int Ppt Gaussquadrature
8/30
http://numericalmethods.eng.usf.edu8
Basis of the Gaussian
Quadrature RuleIt follows that
32322221023132121101 xaxaxaacxaxaxaacdx)x(fb
a
Equating Equations the two previous two expressions yield
432
44
3
33
2
22
10
aba
aba
abaaba
3
23
2
222102
3
13
2
121101 xaxaxaacxaxaxaac
322
3
113
2
22
2
11222111210
xcxcaxcxcaxcxcacca
8/2/2019 Mws Gen Int Ppt Gaussquadrature
9/30
http://numericalmethods.eng.usf.edu9
Basis of the Gaussian
Quadrature RuleSince the constants a0, a1, a2, a3 are arbitrary
21 ccab 221122
2xcxc
ab
2
22
2
11
33
3 xcxcab
322
311
44
4xcxcab
8/2/2019 Mws Gen Int Ppt Gaussquadrature
10/30
http://numericalmethods.eng.usf.edu10
Basis of Gauss QuadratureThe previous four simultaneous nonlinear Equations haveonly one acceptable solution,
21
abc
22
abc
23
1
21
ababx
23
1
22
ababx
8/2/2019 Mws Gen Int Ppt Gaussquadrature
11/30
http://numericalmethods.eng.usf.edu11
Basis of Gauss Quadrature
Hence Two-Point Gaussian Quadrature Rule
23
1
2223
1
22
)( 2211
abab
f
ababab
f
ab
xfcxfcdxxf
b
a
8/2/2019 Mws Gen Int Ppt Gaussquadrature
12/30
http://numericalmethods.eng.usf.edu12
Higher Point GaussianQuadrature Formulas
8/2/2019 Mws Gen Int Ppt Gaussquadrature
13/30
http://numericalmethods.eng.usf.edu13
Higher Point Gaussian
Quadrature Formulas)()()()( 332211 xfcxfcxfcdxxf
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 dxxaxaxaxaxaa
5
5
4
4
3
3
2
210
General n-point rules would approximate the integral
)x(fc.......)x(fc)x(fcdx)x(f nn
b
a
2211
integrating a fifth order polynomial
8/2/2019 Mws Gen Int Ppt Gaussquadrature
14/30
http://numericalmethods.eng.usf.edu14
Arguments and Weighing Factorsfor n-point Gauss Quadrature
Formulas
In handbooks, coefficients and
Gauss Quadrature Rule are
1
1 1
n
i
ii )x(gcdx)x(g
as shown in Table 1.
Points WeightingFactors
FunctionArguments
2 c1 = 1.000000000c2 = 1.000000000
x1 = -0.577350269x2 = 0.577350269
3 c1 = 0.555555556c2 = 0.888888889c3 = 0.555555556
x1 = -0.774596669x2 = 0.000000000x3 = 0.774596669
4 c1 = 0.347854845c2 = 0.652145155c3 = 0.652145155c4 = 0.347854845
x1 = -0.861136312x2 = -0.339981044x3 = 0.339981044x4 = 0.861136312
arguments given for n-point
given for integrals
Table 1: Weighting factors c and functionarguments x used in Gauss QuadratureFormulas.
d i hi
8/2/2019 Mws Gen Int Ppt Gaussquadrature
15/30
http://numericalmethods.eng.usf.edu15
Arguments and Weighing Factorsfor n-point Gauss Quadrature
Formulas
Points WeightingFactors
FunctionArguments
5 c1 = 0.236926885c2 = 0.478628670c3 = 0.568888889c4 = 0.478628670c5 = 0.236926885
x1 = -0.906179846x2 = -0.538469310x3 = 0.000000000x4 = 0.538469310x5 = 0.906179846
6 c1 = 0.171324492c2 = 0.360761573c3 = 0.467913935c4 = 0.467913935c5 = 0.360761573c6 = 0.171324492
x1 = -0.932469514x2 = -0.661209386x3 = -0.2386191860x4 = 0.2386191860x5 = 0.661209386x6 = 0.932469514
Table 1 (cont.) : Weighting factors c and function arguments x used inGauss Quadrature Formulas.
A d W i hi F
8/2/2019 Mws Gen Int Ppt Gaussquadrature
16/30
http://numericalmethods.eng.usf.edu16
Arguments and Weighing Factorsfor n-point Gauss Quadrature
FormulasSo 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 11, Let
cmtx
If then,ax
1t
,bx If then 1tSuch that:
2
abm
A t d W i hi F t
8/2/2019 Mws Gen Int Ppt Gaussquadrature
17/30
http://numericalmethods.eng.usf.edu17
Arguments and Weighing Factorsfor n-point Gauss Quadrature
Formulas
2
abc
Then Hence
22
abtabx dtabdx2
Substituting our values of x, and dx into the integral gives us
1
1222
)( dtabab
tab
fdxxf
b
a
8/2/2019 Mws Gen Int Ppt Gaussquadrature
18/30
http://numericalmethods.eng.usf.edu18
Example 1For an integral derive the one-point Gaussian Quadrature
Rule.
,dx)x(fb
a
Solution
The one-point Gaussian Quadrature Rule is
11 xfcdx)x(fb
a
8/2/2019 Mws Gen Int Ppt Gaussquadrature
19/30
http://numericalmethods.eng.usf.edu19
SolutionThe two unknowns x1, and c1 are found by assuming that theformula gives exact results for integrating a general first orderpolynomial,
.)( 10 xaaxf
b
a
b
a
dxxaadxxf 10)(
b
a
xaxa
2
2
10
2
22
10
abaaba
8/2/2019 Mws Gen Int Ppt Gaussquadrature
20/30
http://numericalmethods.eng.usf.edu20
SolutionIt follows that
1101
)( xaacdxxf
b
a
Equating Equations, the two previous two expressions yield
2
22
10
abaaba 1101 xaac )()( 11110 xcaca
8/2/2019 Mws Gen Int Ppt Gaussquadrature
21/30
http://numericalmethods.eng.usf.edu21
Basis of the Gaussian
Quadrature RuleSince the constants a0, and a1 are arbitrary
1cab
11
22
2xc
ab
abc 1
21
abx
giving
8/2/2019 Mws Gen Int Ppt Gaussquadrature
22/30
http://numericalmethods.eng.usf.edu22
Solution
Hence One-Point Gaussian Quadrature Rule
2)()( 11
abfabxfcdxxf
b
a
8/2/2019 Mws Gen Int Ppt Gaussquadrature
23/30
http://numericalmethods.eng.usf.edu23
Example 2Use two-point Gauss Quadrature Rule to approximate the distance
covered by a rocket from t=8 to t=30 as given by
30
8
892100140000
1400002000 dtt.
tlnx
Find the true error, for part (a).
Also, find the absolute relative true error, for part (a).a
a)
b)
c)
tE
8/2/2019 Mws Gen Int Ppt Gaussquadrature
24/30
http://numericalmethods.eng.usf.edu24
SolutionFirst, change the limits of integration from [8,30] to [-1,1]
by previous relations as follows
1
1
30
8 2
830
2
830
2
830dxxfdt)t(f
1
1
191111 dxxf
8/2/2019 Mws Gen Int Ppt Gaussquadrature
25/30
8/2/2019 Mws Gen Int Ppt Gaussquadrature
26/30
http://numericalmethods.eng.usf.edu26
Solution (cont.)Now we can use the Gauss Quadrature formula
191111191111191111 22111
1
xfcxfcdxxf
1957735030111119577350301111 ).(f).(f
).(f).(f 350852511649151211
).().( 481170811831729611
m.4411058
8/2/2019 Mws Gen Int Ppt Gaussquadrature
27/30
http://numericalmethods.eng.usf.edu27
Solution (cont)since
).(.).(
ln).(f 64915128964915122100140000
14000020006491512
8317296.
).(.).(
ln).(f 35085258935085252100140000
14000020003508525
4811708.
8/2/2019 Mws Gen Int Ppt Gaussquadrature
28/30
http://numericalmethods.eng.usf.edu28
Solution (cont)
The absolute relative true error, t , is (Exact value = 11061.34m)
%.
..t 100
3411061
44110583411061
%.02620
c)
The true error, , isb)tE
ValueeApproximatValueTrueEt
44.1105834.11061 m9000.2
8/2/2019 Mws Gen Int Ppt Gaussquadrature
29/30
Additional ResourcesFor all resources on this topic such as digital audiovisuallectures, primers, textbook chapters, multiple-choicetests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, pleasevisit
http://numericalmethods.eng.usf.edu/topics/gauss_qua
drature.html
http://numericalmethods.eng.usf.edu/topics/gauss_quadrature.htmlhttp://numericalmethods.eng.usf.edu/topics/gauss_quadrature.htmlhttp://numericalmethods.eng.usf.edu/topics/gauss_quadrature.htmlhttp://numericalmethods.eng.usf.edu/topics/gauss_quadrature.html8/2/2019 Mws Gen Int Ppt Gaussquadrature
30/30
THE END
http://numericalmethods.eng.usf.edu
http://numericalmethods.eng.usf.edu/http://numericalmethods.eng.usf.edu/Top Related