0% found this document useful (0 votes)
56 views30 pages

Gauss Quadrature

Uploaded by

Jeff Tan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views30 pages

Gauss Quadrature

Uploaded by

Jeff Tan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

Gauss Quadrature Rule

of Integration

Major: All Engineering Majors

Authors: Autar Kaw, Charlie Barker

http://numericalmethods.eng.usf.e
du
Transforming Numerical Methods Education for STEM
Undergraduates

http://
01/06/25 numericalmethods.eng.usf.edu 1
Gauss Quadrature Rule
of Integration

http://numericalmethods.eng.usf.
edu
What is Integration?
b

Integration f ( x )dx
a
f(x)
y
The process of
measuring the area
under a curve.
b
I f ( x )dx
a

Where:
f(x) is the integrand
a= lower limit of
integration a b x

b= upper limit of
3 integration http://numericalmethods.eng.usf.edu
Two-Point Gaussian
Quadrature Rule

4 http://numericalmethods.eng.usf.edu
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.

f ( x)dx c f (a)  c
a
1 2 f (b)

b a b a
 f (a)  f (b)
2 2

5 http://numericalmethods.eng.usf.edu
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
I  f ( x )dx c1 f ( x1 )  c 2 f ( x 2 )
a

6 http://numericalmethods.eng.usf.edu
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
) a0order
f ( x third
integrating a general  a2 x 2  a3 x 3 .
 a1 x polynomial,
Hence
b b
f ( x )dx a0  a1 x  a 2 x  a3 x dx
2 3

a a
2 3 4 b
 x x x 
 a0 x  a1  a 2  a3 
 2 3 4 a
 b2  a2   b3  a3   b4  a4 
a0 b  a   a1    a 2    a3  
 2   3   4 
7 http://numericalmethods.eng.usf.edu
Basis of the Gaussian
Quadrature Rule
It follows that

   
b
2 3 2 3
f ( x )dx c1 a0  a1 x1  a 2 x1  a3 x1  c 2 a0  a1 x 2  a 2 x 2  a3 x 2
a

Equating Equations the two previous two expressions yield

 b2  a2   b3  a3   b4  a4 
a0 b  a   a1    a 2    a3  
 2   3   4 

 2
 
3
c1 a0  a1 x1  a 2 x1  a3 x1  c 2 a0  a1 x 2  a 2 x 2  a3 x 2
2 3

a0 c1  c 2   a1 c1 x1  c x   a c x  a c x 
2 2 3 3
2 2 2 1 1  c2 x2 3 1 1  c2 x2
8 http://numericalmethods.eng.usf.edu
Basis of the Gaussian
Quadrature Rule
Since the constants a0, a1, a2, a3 are
arbitrary

b2  a2
b  a c1  c 2 c1 x1  c2 x2
2

b3  a3 2 2 b4  a4
c1 x1  c2 x2 3
c1 x1  c 2 x 2
3
3 4

9 http://numericalmethods.eng.usf.edu
Basis of Gauss Quadrature
The previous four simultaneous nonlinear Equations
have only one acceptable solution,

 b  a  1  b  a  b  a  1  b  a
x1     x 2    
 2  3 2  2  3  2

b a b a
c1  c2 
2 2

10 http://numericalmethods.eng.usf.edu
Basis of Gauss Quadrature
Hence Two-Point Gaussian Quadrature
Rule
b

f ( x)dx  c1 f x1   c2 f x2 


a

b a b a  1  ba b a b a  1  ba


 f      f    
2  2  3 2  2  2  3 2 

11 http://numericalmethods.eng.usf.edu
Higher Point Gaussian
Quadrature Formulas

12 http://numericalmethods.eng.usf.edu
Higher Point Gaussian
Quadrature Formulas
b

f ( x)dx c f ( x )  c
a
1 1 2 f ( x2 )  c3 f ( x3 )

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
integrating a fifth order polynomial
b
a0  a1 x  a 2 x  a3 x  a 4 x  a5 x dx
2 3 4 5

General n-point rules would approximate the integral


b
f ( x )dx c1 f ( x1 )  c 2 f ( x 2 )  . . . . . . .  c n f ( x n )
a
13 http://numericalmethods.eng.usf.edu
Arguments and Weighing
Factors for n-point Gauss
Quadrature Formulas
Table 1: Weighting factors c and function
In handbooks, coefficients arguments x used in Gauss
and Quadrature
arguments given for n- Point Formulas.
Weighting Function
point
Gauss Quadrature Rule are
s Factors Arguments
2 c1 = x1 = -0.577350269
given for integrals 1.000000000 x2 = 0.577350269
c2 =
1 n 1.000000000
g ( x )dx   ci g ( xi ) 3 c1 = x1 = -0.774596669
1 i 1
0.555555556 x2 = 0.000000000
c2 = x3 = 0.774596669
as shown in Table 1. 0.888888889
c3 =
0.555555556
4 c1 = x1 = -0.861136312
0.347854845 x2 = -0.339981044
14 c = http://numericalmethods.eng.usf.edu
Arguments and Weighing
Factors for n-point Gauss
Quadrature Formulas
Table 1 (cont.) : Weighting factors c and function arguments x
used in Gauss Quadrature Formulas.

Points Weighting Function


Factors Arguments
5 c1 = x1 = -0.906179846
0.236926885 x2 = -0.538469310
c2 = x3 = 0.000000000
0.478628670 x4 = 0.538469310
c3 = x5 = 0.906179846
0.568888889
c4 =
0.478628670
c5 =
0.236926885
6 c1 = x1 = -0.932469514
0.171324492 x2 = -0.661209386
15 c2 = http://numericalmethods.eng.usf.edu
x3 = -
Arguments and Weighing
Factors for n-point Gauss
Quadrature Formulas
1
So if the table is given for g ( x )dx integrals, how does one solve
b 1
a , b 
f ( x )dx ?The answer lies in that any integral with limits of
a
can be converted into an integral with limits  1, 1 Let

x mt  c
If x a , then t  1
Such that:
If x b , then t 1

b a
m
2
16 http://numericalmethods.eng.usf.edu
Arguments and Weighing
Factors for n-point Gauss
Quadrature Formulas
Then ba Hence
c
2

b a ba b a
x t dx  dt
2 2 2

Substituting our values of x, and dx into the integral gives us

b 1
b a ba b a

a
f ( x ) dx   f
1 

2
t  
2  2
dt

17 http://numericalmethods.eng.usf.edu
Example 1
b
For an f ( x )dxderive
, the one-point Gaussian Quadrature
integral a
Rule.
Solution
The one-point Gaussian Quadrature Rule is
b
f ( x )dx c1 f x1 
a

18 http://numericalmethods.eng.usf.edu
Solution
The two unknowns x1, and c1 are found by assuming that
the formula gives exact results for integrating a general
first order polynomial,

f ( x ) a0  a1 x.
b b

f ( x )dx a
a a
0  a1 x dx

2 b
 x 
  a0 x  a1 
 2 a

 b2  a 2 
a0 b  a   a1  
 2 

19 http://numericalmethods.eng.usf.edu
Solution
It follows that
b

f ( x )dx c a
a
1 0  a1 x1 

Equating Equations, the two previous two expressions yield

 b2  a 2 
a0 b  a   a1   c1 a 0  a1 x1  a0 ( c1 )  a1 ( c1 x1 )
 2 

20 http://numericalmethods.eng.usf.edu
Basis of the Gaussian
Quadrature Rule
Since the constants a0, and a1 are
arbitrary
b  a c1

b2  a 2
c1 x1
2
giving

c1 b  a
ba
x1 
2

21 http://numericalmethods.eng.usf.edu
Solution
Hence One-Point Gaussian Quadrature
Rule

b
ba
a f ( x)dx  c1 f x1   (b  a ) f  2 

22 http://numericalmethods.eng.usf.edu
Example 2

Use two-point Gauss Quadrature Rule to approximate the distance


a)

covered by a rocket from t=8 to t=30 as given by

30
  140000  
x   2000 ln    9 .8t  dt
8  140000  2100t  

b)Find the true error, Et for part (a).

c)Also, find the absolute relative true error,a for part (a).

23 http://numericalmethods.eng.usf.edu
Solution
First, change the limits of integration from [8,30] to [-1,1]
by previous relations as
follows

30
30  8 1  30  8 30  8 
f ( t )dt  f  x  dx
8 2 1  2 2 

1
11 f 11x  19 dx
1

24 http://numericalmethods.eng.usf.edu
Solution (cont)
Next, get weighting factors and function argument values from Table 1
for the two point
rule,

c1  1.000000000
x1  0.577350269
c 2  1.000000000

x 2  0.577350269

25 http://numericalmethods.eng.usf.edu
Solution (cont.)
Now we can use the Gauss Quadrature formula

1
11 f 11x  19 dx 11c1 f 11x1  19   11c 2 f 11x 2  19 
1

11 f 11(  0.5773503 )  19   11 f 11( 0.5773503 )  19 


11 f ( 12.64915 )  11 f ( 25.35085 )
11( 296.8317 )  11( 708.4811 )
11058 .44 m

26 http://numericalmethods.eng.usf.edu
Solution (cont)
since

 140000 
f ( 12.64915 ) 2000 ln    9.8( 12.64915 )
 140000  2100( 12.64915 )
296.8317

 140000 
f ( 25.35085 ) 2000 ln    9.8( 25.35085 )
 140000  2100( 25.35085 )

708.4811
27 http://numericalmethods.eng.usf.edu
Solution (cont)
b) The true error,Et , is
Et True Value  Approximat e Value
11061 .34  11058 .44
2.9000 m
c)The absolute relative true error,,t is (Exact value = 11061.34m)

11061.34  11058.44
t  100%
11061.34

0.0262%
28 http://numericalmethods.eng.usf.edu
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/gaus
s_quadrature.html
THE END

http://numericalmethods.eng.usf.edu

You might also like