Escolar Documentos
Profissional Documentos
Cultura Documentos
Saharudin Haron
Page 7 - 1
Numerical Integration
Integrate means (dictionary): to bring together, to unite or to indicate the total amount. Mathematically, integration is represented by:
I=
f ( x ) dx
where, I = integral the function f(x) with respect to independent variable x evaluated between limits x = a to x = b. f(x) and equivalent to the area under the curve.
Page 7 - 2
f (a ) + f (b) I = (b a ) 2
width x average height
Page 7 - 3
f(x) = 0.2 + 25x 200x2 + 675 x3 900x4 + 400x5 from a = 0 to b = 0.8 The exact value of the integral, analytically determined is 1.640533
Solution: Function values; f(0) = 0.2 and f(0.8) = 0.232
f (a ) + f (b) I = (b a ) 2
= 0.8 [(0.2 + 0.232) / 2 ] = 0.1728 Et = 1.640533 0.1728 = 1.467733
t = 89.5%
Page 7 - 4
By substituting h = (b - a)/n,
n 1 f ( x ) 2 f ( x ) f ( x ) + + o i n i =1 I = (b a ) 2n ( width ) Averageheight
Page 7 - 5
Example: Use the two-segment trapezoidal rule to estimate the integral of:
f(x) = 0.2 + 25x 200x2 + 675x3 900x4 + 400x5 from a = 0 and b = 0.8. The true value for the integral is 1.640533
Solution: n = 2, thus, h = (b-a)/n = (0.8-0)/2 = 0.4
f(0.8) = 0.232
Numerical Integration
assignment in class
The outflow chemical concentration from a completely mixed reactor is measured as
t, min c, mg/m3 0 10 2 20 4 30 6 40 8 60 12 72 16 70 20 50
For an outflow of Q = 12 m3/min, estimate the mass of chemical that exit the reactor from t = 0 to 20 min
Page 7 - 7
Page 7 - 8
( x x1 )( x x2 ) ( x x0 )( x x1 ) ( x x0 )( x x 2 ) I= f ( x 2 ) dx f ( x1 ) + f ( x0 ) + x ( x2 x0 )( x2 x1 ) ( x1 x0 )( x1 x2 ) ( x0 x1 )( x0 x2 )
x
1
h I [ f ( x0 ) + 4 f ( x1 ) + f ( x2 )] 3
f ( x0 ) + 4 f ( x1 ) + f ( x2 ) I (b a ) 6 width
average height
Page 7 - 9
Average Height
Page 7 - 10
3h I [ f ( x0 ) + 3 f ( x1 ) + 3 f ( x2 ) + f ( x3 )] 8 f ( x0 ) + 3 f ( x1 ) + 3 f ( x2 ) + f ( x3 ) I (b a ) 8 width
average height
Page 7 - 11