W
Shared by:
Categories
Tags
-
Stats
views:
8
posted:
9/14/2012
language:
English
pages:
14
Document Sample

```							Chapter 07.05

After reading this chapter, you should be able to:

1. derive the Gauss quadrature method for integration and be able to use it to solve
problems, and
2. use Gauss quadrature method to solve examples of approximate integrals.

What is integration?
Integration is the process of measuring the area under a function plotted on a graph. Why
would we want to integrate a function? Among the most common examples are finding the
velocity of a body from an acceleration function, and displacement of a body from a velocity
function. Throughout many engineering fields, there are (what sometimes seems like)
countless applications for integral calculus. You can read about some of these applications in
Chapters 07.00A-07.00G.
Sometimes, the evaluation of expressions involving these integrals can become daunting, if
not indeterminate. For this reason, a wide variety of numerical methods has been developed
to simplify the integral.
Here, we will discuss the Gauss quadrature rule of approximating integrals of the form
b
I   f x dx
a
where
f (x) is called the integrand,
a  lower limit of integration
b  upper limit of integration

07.05.1
07.05.2                                                                            Chapter 07.05

Figure 1 Integration of a function.

Background:
To derive the trapezoidal rule from the method of undetermined coefficients, we
approximated
b

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

Let the right hand side be exact for integrals of a straight line, that is, for an integrated form
of
b

 a
a
0    a1 x dx

So
b
b
             2

 a0  a1 x dx  a0 x  a1 x 
a                              2 a
 b2  a2 
 a0 b  a   a1  2                                             (2)
         
But from Equation (1), we want
b

 a
a
0    a1 x dx  c1 f (a)  c2 f (b)                                         (3)

to give the same result as Equation (2) for f ( x)  a 0  a1 x .
b

 a
a
0    a1 x dx  c1 a0  a1a   c2 a0  a1b 

 a0 c1  c2   a1 c1a  c2 b                                   (4)
Hence from Equations (2) and (4),
 b2  a2 
 2   a0 c1  c2   a1 c1a  c2 b 
a0 b  a   a1           
          

Since a 0 and a1 are arbitrary constants for a general straight line
c1  c2  b  a                                                                                           (5a)
b2  a2
c1a  c 2 b                                                                                              (5b)
2
Multiplying Equation (5a) by a and subtracting from Equation (5b) gives
ba
c2                                                                                                       (6a)
2
Substituting the above found value of c 2 in Equation (5a) gives
ba
c1 
2                                                                                                  (6b)
Therefore
b

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

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

Derivation of two-point Gauss quadrature rule
Method 1:
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 x 2 . So in the two-point Gauss quadrature rule, the integral is approximated as
b
I   f ( x)dx
a

 c1 f ( x1 )  c 2 f ( x 2 )
There are four unknowns x1 , x 2 , c1 and c 2 . These are found by assuming that the formula
gives exact results for integrating a general third order polynomial,
f ( x)  a 0  a1 x  a 2 x 2  a3 x 3 . Hence

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


a                 a
b
           x2                           x3       x4 
 a 0 x  a1      a2                         a3 
            2                            3       4 a
 b2                     a2        b3  a 3        b4  a4 
 a0 b  a   a1 
                              a2                   4 
  a3                           (8)
                       2   
 3 
                


The formula would then give
b

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

c a  a x  a x
1           0       1 1
2
2 1    a3 x13   c2 a0  a1 x 2  a 2 x 2  a3 x 2 
2        3
(9)
07.05.4                                                                                                                 Chapter 07.05

Equating Equations (8) and (9) gives
 b2  a 2   b3  a 3   b4  a 4 
a0 b  a   a1 
 2   a 2  3   a3  4 
                      
                                
                       2
 
 c1 a0  a1 x1  a2 x1  a3 x1  c2 a0  a1 x2  a 2 x2  a3 x2
3                                       2           3

 a0 c1  c2   a1 c1 x1        c x   a c x                                   
 c2 x2  a3 c1 x1  c2 x2                
2             2               3           3
2   2       2   1 1                                                              (10)

Since in Equation (10), the constants a 0 , a1 , a 2 , and a 3 are arbitrary, the coefficients of
a 0 , a1 , a 2 , and a 3 are equal. This gives us four equations as follows.
b  a  c1  c2
b2  a2
 c1 x1  c 2 x 2
2
b3  a3
 c1 x1  c 2 x 2
2           2

3
b  a4
4
 c1 x1  c2 x2
3          3
(11)
4

Without proof (see Example 1 for proof of a related problem), we can find that the above
four simultaneous nonlinear equations have only one acceptable solution
ba
c1 
2
ba
c2 
2
 b  a  1  b  a
x1          
    

 2        3   2
 b  a  1  b  a
x2         
   
                                                                                                    (12)
 2  3        2

Hence
b

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

ba        ba  1  ba ba                                   ba  1  ba
               2  3   2   2
f                                                     2  3 2 
f                                              (13)
2                                                                      

Method 2:
We can derive the same formula by assuming that the expression gives exact values for the
b           b           b                   b
individual integrals of  1dx,               xdx,       x dx, and
2
 x dx .
3
The reason the formula can also be
a           a           a                   a

derived using this method is that the linear combination of the above integrands is a general
third order polynomial given by f ( x)  a 0  a1 x  a 2 x 2  a3 x 3 .
These will give four equations as follows
b

1dx  b  a  c
a
1    c2

b2  a 2
b

 xdx  2  c1 x1  c2 x2
a

b3  a 3
b

 x dx                   c1 x1  c2 x2
2                            2        2

a
3
b4  a 4
b

 x dx  4  c1 x1  c2 x2
3                  3   3
(14)
a
These four simultaneous nonlinear equations can be solved to give a single acceptable
solution
ba
c1 
2
ba
c2 
2
 b  a  1  b  a
x1          
     

 2         3    2
 b  a  1  b  a
x2         
   
                                                             (15)
 2  3        2

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

 f ( x)dx 
a
2
f








 2  3   2   2 f  2  3   2 







(16)

Since two points are chosen, it is called the two-point Gauss quadrature rule. Higher point
versions can also be developed.

For example
b

 f ( x)dx  c
a
1   f ( x1 )  c2 f ( x2 )  c3 f ( x3 )                    (17)

is called the three-point Gauss quadrature rule. The coefficients c1 , c 2 and c 3 , and the
function arguments x1 , x 2 and x 3 are calculated by assuming the formula gives exact
expressions for integrating a fifth order polynomial

 a        a1 x  a 2 x 2  a3 x 3  a 4 x 4  a5 x 5 dx .
b

0
a

General n -point rules would approximate the integral
07.05.6                                                                                      Chapter 07.05

b

 f ( x)dx  c
a
1   f ( x1 )  c2 f ( x2 )  . . . . . . .  cn f ( xn )                     (18)

Arguments and weighing factors for n-point Gauss quadrature rules
In handbooks (see Table 1), coefficients and arguments given for n -point Gauss quadrature
rule are given for integrals of the form
1              n

 g ( x)dx   ci g ( xi )
1            i 1
(19)

Table 1 Weighting factors c and function arguments x used in Gauss quadrature formulas
Weighting          Function
Points Factors              Arguments
c1  1.000000000               x1  0.577350269
c2  1.000000000               x2  0.577350269
2

c1  0.555555556               x1  0.774596669
c 2  0.888888889              x2  0.000000000
3
c3  0.555555556               x3  0.774596669

c1  0.347854845               x1  0.861136312
c 2  0.652145155             x 2  0.339981044
4
c3  0.652145155               x3  0.339981044
c 4  0.347854845              x4  0.861136312

c1  0.236926885               x1  0.906179846
c 2  0.478628670             x 2  0.538469310
5
c3  0.568888889               x3  0.000000000
c 4  0.478628670              x4  0.538469310
c5  0.236926885               x5  0.906179846

c1  0.171324492               x1  0.932469514
c 2  0.360761573             x 2  0.661209386
6
c3  0.467913935               x3  0.238619186
c 4  0.467913935              x4  0.238619186

c5  0.360761573   x5  0.661209386
c6  0.171324492   x6  0.932469514

1                                           b
So if the table is given for         g ( x )dx integrals, how does one solve
1
 f ( x)dx ?
a

The answer lies in that any integral with limits of a, b  can be converted into an integral
with limits  1, 1 . Let
x  mt  c                                                                       (20)
If x  a, then t  1
If x  b, then t   1
such that
a  m(1)  c
b  m(1)  c                                                                     (21)
Solving the two Equations (21) simultaneously gives
ba
m
2
ba
c                                                                               (22)
2
Hence
ba        ba
x           t
2         2
ba
dx           dt
2
Substituting our values of x and dx into the integral gives us
ba    baba
b              1


a
f ( x )dx   f 
1 
2
x     
2  2
dx                                         (23)

Example 1
1
For an integral    f ( x)dx, show that the two-point Gauss quadrature rule approximates to
1
1

 f ( x)dx  c
1
1   f ( x1 )  c2 f ( x2 )

where
c1  1
c2  1
1
x1  
3
07.05.8                                                                                                 Chapter 07.05

1
x2 
3
Solution
Assuming the formula
1

 f ( x)dx  c f x   c f x 
1
1         1       2         2                                                  (E1.1)
1       1        1             1
gives exact values for integrals  1dx,                         xdx,    x dx, and
2
 x dx
3
. Then
1        1       1            1
1

1dx  2  c
1
1    c2                                                                       (E1.2)
1

 xdx  0  c x
1
1 1      c2 x2                                                                (E1.3)
1
2
 x dx  3  c x                    c2 x2
2                         2             2
1 1                                                                        (E1.4)
1
1

 x dx  0  c x                    c2 x2
3                         3             3
1 1                                                                        (E1.5)
1
2
Multiplying Equation (E1.3) by x1 and subtracting from Equation (E1.5) gives

c 2 x 2 x1  x 2  0
2       2
                                                              (E1.6)
The solution to the above equation is
c 2  0, or/and
x 2  0, or/and
x1  x2 , or/and
x1   x 2 .
I. c2  0 is not acceptable as Equations (E1.2-E1.5) reduce to c1  2, c1 x1  0,
2
c1 x12  , and c1 x13  0 . But since c1  2 , then x1  0 from c1 x1  0 , but x1  0
3
2
conflicts with c1 x12  .
3
II. x2  0 is not acceptable as Equations (E1.2-E1.5) reduce to c1  c2  2 , c1 x1  0,
2
c1 x12  , and c1 x13  0 . Since c1 x1  0 , then c1 or x1 has to be zero but this violates
3
2
c1 x12   0 .
3
III. x1  x 2 is not acceptable as Equations (E1.2-E1.5) reduce to c1  c 2  2 ,
2
c1 x1  c 2 x1  0, c1 x12  c2 x1  , and c1 x13  c2 x13  0 . If x1  0 , then c1 x1  c2 x1  0
2

3

gives c1  c2  0 and that violates c1  c 2  2 . If x1  0 , then that violates
2
c1 x12  c2 x1   0 .
2

3
That leaves the solution of x1   x 2 as the only possible acceptable solution and in fact, it
does not have violations (see it for yourself)
x1   x 2                                                                     (E1.7)
Substituting (E1.7) in Equation (E1.3) gives
c1  c2                                                                         (E1.8)
From Equations (E1.2) and (E1.8),
c1  c 2  1                                                                  (E1.9)
Equations (E1.4) and (E1.9) gives
2
x1  x 2 
2      2
(E1.10)
3
Since Equation (E1.7) requires that the two results be of opposite sign, we get
1
x1  
3
1
x2 
3
Hence
1

 f ( x)dx  c
1
1   f ( x1 )  c2 f ( x2 )                                    (E1.11)

 1      1 
 f    f    
  3     3

Example 2
b
For an integral    f ( x)dx, derive the one-point Gauss quadrature rule.
a
Solution
The one-point Gauss quadrature rule is
b

 f ( x)dx  c f x 
a
1          1                                                    (E2.1)

1           1
Assuming the formula gives exact values for integrals  1dx, and      xdx
1         1
b

1dx  b  a  c
a
1

b2  a2
b

 xdx 
a
2
 c1 x1                                                       (E2.2)

Since c1  b  a, the other equation becomes
07.05.10                                                                              Chapter 07.05

b2  a2
(b  a) x1 
2
ba
x1                                                                           (E2.3)
2
Therefore, one-point Gauss quadrature rule can be expressed as
ba
b

 f ( x)dx  (b  a) f  2 
a                         
(E2.4)

Example 3
What would be the formula for
b

 f ( x)dx  c
a
1    f (a)  c2 f (b)

 a x  b x dx, that is, a linear
b
2
if you want the above formula to give you exact values of              0     0
a
2
combination of x and x .
Solution
If the formula is exact for a linear combination of x and x 2 , then
b2  a2
b


a
xdx 
2
 c1a  c2 b

b3  a 3
b

 x dx  3  c1a  c2b
2                2      2
(E3.1)
a
Solving the two Equations (E3.1) simultaneously gives
b2  a 2 
 a b   c1   2 
 a 2 b 2  c    b 3  a 3 
           2              
 3 
          
1  ab  b 2  2a 2
c1  
6        a
1 a  ab  2b 2
2
c2                                                                                  (E3.2)
6       b
So
1  ab  b 2  2a 2         1 a 2  ab  2b 2
b

 f ( x)dx   6
a
a
f (a) 
6        b
f (b)                    (E3.3)

Let us see if the formula works.

 2 x           
5
Evaluate             2
 3x dx using Equation(E3.3)
2

 2 x                
5
2
 3x dx  c1 f (a)  c 2 f (b)
2


1  (2)(5)  5 2  2(2) 2
6           2
2(2) 2  3(2) 
6

1 2 2  2(5)  2(5) 2
5
      [2(5) 2  3(5)]
 46.5

 2 x           
5
The exact value of                         2
 3x dx is given by
2
5
 2 x 3 3x 2 
                 
5

 2 x  3 x dx        
2

2                 3      2 2
 46.5
Any surprises?
5
Now evaluate  3dx using Equation (E3.3)
2
5

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

1  2(5)  5 2  2(2) 2       1 2 2  2(5)  2(5) 2
                          (3)                        (3)
6          2                  6          5
 10.35
5
The exact value of                 3dx is given by
2
5

 3dx  3x
5
2
2
9
Because the formula will only give exact values for linear combinations of x and x 2 , it does
5
not work exactly even for a simple integral of  3dx .
2
Do you see now why we choose a 0  a1 x as the integrand for which the formula
b

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

gives us exact values?

Example 4
Use two-point Gauss quadrature rule to approximate the distance covered by a rocket from
t  8 to t  30 as given by
                                
30
140000
x    2000 ln 
                           9.8t dt

8         140000  2100t          
Also, find the absolute relative true error.
07.05.12                                                                                  Chapter 07.05

Solution
First, change the limits of integration from 8, 30  to  1, 1 using Equation(23) gives
30  8       30  8 30  8 
30                      1


8
f (t )dt 
2  1 f  2 x  2 dx   
1
 11 f 11x  19dx
1
Next, get weighting factors and function argument values from Table 1 for the two point rule,
c1  1.000000000 .
x1  0.577350269
c2  1.000000000
x2  0.577350269
Now we can use the Gauss quadrature formula
1
11 f 11x  19dx  11c1 f 11x1  19  c2 f 11x2  19
1
 11 f 11(0.5773503 )  19   f 11(0.5773503 )  19 
 11 f (12 .64915 )  f (25 .35085 )
 11(296 .8317 )  (708 .4811 )
 11058.44 m
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
The absolute relative true error, t , is (True value = 11061.34 m)
11061 .34  11058 .44
t                                100
11061 .34
 0.0262%

Example 5
Use three-point Gauss quadrature rule to approximate the distance covered by a rocket from
t  8 to t  30 as given by
                                
30
140000
x    2000 ln 
                           9.8t dt

8         140000  2100t          
Also, find the absolute relative true error.

Solution
First, change the limits of integration from 8, 30  to  1, 1 using Equation (23) gives
30  8       30  8 30  8 
30                      1


8
f (t )dt 
2  1 f  2 x  2 dx   
1
 11 f 11x  19dx
1
The weighting factors and function argument values are
c1  0.555555556
x1  0.774596669
c 2  0.888888889
x 2  0.000000000
c3  0.555555556
x3  0.774596669
and the formula is
1
11 f 11x  19dx  11c1 f 11x1  19  c2 f 11x2  19  c3 f 11x3  19
1

0.5555556 f 11(.7745967)  19  0.8888889 f 11(0.0000000)  19
 11                                                                          
 0.5555556 f 11(0.7745967)  19                                        
 110.55556 f (10 .47944 )  0.88889 f (19 .00000 )  0.55556 f (27 .52056 )
 110.55556  239 .3327  0.88889  484 .7455  0.55556  795 .1069 
 11061.31 m
since
        140000          
f (10.47944)  2000 ln                           9.8(10.47944)
140000  2100(10.47944) 
 239.3327
        140000          
f (19.00000)  2000 ln                           9.8(19.00000)
140000  2100(19.00000) 
 484.7455
        140000          
f (27.52056)  2000 ln                           9.8(27.52056)
140000  2100(27.52056) 
 795.1069

The absolute relative true error, t , is (True value = 11061.34 m)
11061 .34  11061 .31
t                                100
11061 .34
 0.0003%
07.05.14                                                       Chapter 07.05

INTEGRATION
Summary These are textbook notes of Gauss quadrature rule
Major    General Engineering
Authors  Autar Kaw, Michael Keteltas
Date     September 14, 2012
Web Site http://numericalmethods.eng.usf.edu

```
Related docs
Other docs by HC120914225823
weq srs071310w3