Numerical Integration - Trapezoidal Rule
Numerical Integration - Trapezoidal Rule
by a dam. The reservoir's cross-sectional area varies along its length, and
the engineer uses the equation:
2
f ( x )=32+50 x−3 x
Numerical Solution:
x n−¿ x 10−0
h= 0
= =2.5 ¿
n 4
i x f(x)
0 0 32
1 2.5 138.25
2 5.0 207
3 7.5 238.25
4 10 232
Substitute into the Trapezoidal Rule formula:
h
I=
2
[ f ( x 0 ) +2 f ( x i ) +f ( x n ) ]
2.5
I=
2
[ 32+2 ( 138.25+207+238.25 )+ 232 ]
3
I =1778.75 m
Analytical Solution:
10
V=∫ f ( x ) dx
0
10
V =∫ (32+50 x−3 x ² ) dx
0
[ ]
10
50 x 2 3 x 3
V = 32 x + − +c
2 3 0
( )
2 3
50 ( 10 ) 3 ( 10 )
V = 32 ( 10 ) + − −0
2 3
3
V =1820 m
Comparison of Results:
∫_0^10▒(32+50x-3x²)dx