Professional Documents
Culture Documents
What is Integration?
Integration
The process of measuring the area under a curve.
y
b
f ( x )dx
a
f(x)
I ! f ( x )dx
a
Where: f(x) is the integrand a= lower limit of integration b= upper limit of integration
a b x
K.D Mokebe
KD Mokebe
Contributes
M.W Kutta ( 1867-1944) Leonhard Euler(1756-?) Sir Isaac Newton ( 1642-1727) Carl Runge ( 1856-1927)
KD Mokebe
Review
Trapezoid Rule
KD Mokebe
In practice
Divide Integration Area into small trapezoid, then sum over the entire integration horizon
Euler Algorithm!
Given: ODE
dx ! f ( x ,t ) dt x ! x0 @ t ! 0 x x
n 1
! x ! x
f
( x
,t n )
(t (t
Leonhard Euler(1756-?)
n 1
dx dt
KD Mokebe
baba ba f ( x) dx ! f x dx 2 2 2 1
KD Mokebe
Classical Quadrature
Nth order
f (x)dx
1
c f (x )
i i i!1
Any integral with limits of [a,b] can be converted into integral with limits [-1,1]
baba ba f ( x ) dx ! f x dx 2 2 2 1
KD Mokebe
10
f ( x)dx } c f (a) c
1 a
f (b)
I ! f ( x )dx } c1 f ( x1 ) c 2 f ( x 2 )
a
12
KD Mokebe
Hence
b
f ( x )dx ! 0 a1 x a 2 x 2 a3 x 3
a dx
a
x x x ! a0 x a1 a 2 a3 2 3 4 a
2 3 4
b2 a2 b3 a3 b4 a4 ! a0 b a
a1 2 a 2 3 a3 4
13
KD Mokebe
f ( x )dx ! c1 a 0 a1 x1 a 2 x1 a3 x1 c2 a0 a1 x2 a 2 x2 a3 x2
Equating Equations the two previous two expressions yield
b2 a2 b3 a3 b4 a4 a 0 b a
a1 2 a 2 3 a3 4 ! c1 a0 a1 x1 a 2 x1 a3 x1 c 2 a0 a1 x 2 a 2 x 2 a3 x 2 ! a0 c1 c 2
a1 c1 x1
2 2 2 2 2 1 1
c x
a x c
3
c 2 x 2 a3 c1 x1 c 2 x 2
K.D Mokebe
KD Mokebe
14
b a ! c1 c2 b3 a3 2 2 ! c1 x1 c2 x 2 3
b2 a2 ! c1 x1 c 2 x 2 2 b4 a4 3 3 ! c1 x1 c 2 x 2 4
15
KD Mokebe
b a 1 b a x1 ! 3 2 2 ba c1 ! 2
b a 1 b a x2 ! 2 2 3
ba c2 ! 2
KD Mokebe
K.D Mokebe
16
f (x)dx } c f x
c f x
1 1 2 2 a
17
KD Mokebe
f ( x)dx } c f ( x ) c
1 1 a
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
dx a1 x a 2 x 2 a3 x 3 a 4 x 4 a5 x 5
f ( x )dx } c1 f ( x1 ) c 2 f ( x 2 ) . . . . . . . cn f ( xn )
18
KD Mokebe
Table 1: Weighting factors c and function arguments x used in Gauss Quadrature Formulas. Points 2 3 Weighting Factors c1 = 1.000000000 c2 = 1.000000000 c1 = 0.555555556 c2 = 0.888888889 c3 = 0.555555556 c1 = c2 = c3 = c4 = 0.347854845 0.652145155 0.652145155 0.347854845 Function Arguments x1 = -0.577350269 x2 = 0.577350269 x1 = -0.774596669 x2 = 0.000000000 x3 = 0.774596669 x1 = -0.861136312 x2 = -0.339981044 x3 = 0.339981044 x4 = 0.861136312
g ( x )dx
1
i !1
ci g ( xi )
4
as shown in Table 1.
19
KD Mokebe
20
g ( x )dx
1
g ( x )dx
1
f ( x )dx
a
f ( x )dx
a
KD Mokebe
21
g ( x )dx
1
f ( x )dx ?
a
?a , bA
? 1, 1A
Let
x ! mt c
If If
x ! a , then t ! 1
x ! b,
then
t! 1
Such that:
ba m! 2
KD Mokebe
22
ba c! 2
Hence
ba ba x! t 2 2
ba dx ! dt 2
f ( x )dx !
baba ba f t dt 1 2 2 2
23
Example 1
b
f ( x )dx ,
a
Solution
The one-point Gaussian Quadrature Rule is
b
f ( x )dx } c1 f x1
KD Mokebe
24
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 ) ! a 0 a1 x.
b b 0
f ( x)dx ! a
a a
a1 x
dx
2 b
x ! a 0 x a1 2 a
b2 a 2 ! a0 b a
a1 2
25
KD Mokebe
25
Solution
It follows that
b
f ( x )dx ! c a
1 a
a1 x1
b2 a 2 a0 b a a1 2 ! c1 a 0 a1 x1
! a0 ( c1 ) a1 ( c1 x1 )
26
KD Mokebe
26
b a ! c1
b2 a 2 ! c1 x1 2
giving
c1 ! b a
ba x1 ! 2
27
KD Mokebe
27
Solution
Hence One-Point Gaussian Quadrature Rule
ba f (x)dx } c1 f x1
! (b a) f 2 a
b
28
KD Mokebe
28
Example 2
a) Use two-point Gauss Quadrature Rule to approximate the distance covered by a rocket from t=8 to t=30 as given by
b) c)
Et
Also, find the absolute relative true error, a for part (a).
KD Mokebe
29
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 x dx f ( t )dt ! f 2 1 2 2 8
1
! 11 f 11x 19
dx
1
30
KD Mokebe
Solution (cont)
Next, get weighting factors and function argument values from Table 1 for the two point rule,
Solution (cont.)
Now we can use the Gauss Quadrature formula
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
32
KD Mokebe
Solution (cont)
since
Solution (cont)
b) The true error,
t
, is
34
System Model
KD Mokebe
35
System Model
Signal Select
yy
The process involves a CSTR with an exothermic reaction and a cooling coil. Generally, we wish to control the composition of the reactant in the effluent. However, we must keep the temperature below a maximum limit to prevent damaging the glass lining of the reactor.
FC
Looks good to me. What could go wrong?
T AC
LC
Reaction: A p B
Actual System
KD Mokebe
37
Tank 1
Cao Ca1(t) Ca1 Cam
Tank 2
Ca2 Ca2(t)
Tank 3
Ca3(t)
Ca3
monitor
E(t)
noise
noise
KD Mokebe
38
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
39
KD Mokebe
THE END
http://numericalmethods.eng.usf.edu
KD Mokebe
40