Numerical integration 437
With 6 intervals, each will have a width of
π
2− 06
i.e.
π
12rad (or 15◦) and the ordinates occur at0 ,
π
12,π
6,π
4,π
3,5 π
12andπ
2Corresponding values of
1
1 +sinxare shown in thetable below.
x1
1 +sinx
0 1.0000
π
12(or 15◦) 0.79440π
6(or 30◦) 0.66667π
4(or 45◦) 0.58579π
3(or 60◦) 0.535905 π
12(or 75◦) 0.50867π
2(or 90◦) 0.50000From equation (1):
∫ π
2
0
1
1 +sinxdx≈(π
12){ 1
2( 1. 00000 + 0. 50000 )+ 0. 79440 + 0. 66667
+ 0. 58579 + 0. 53590
+ 0. 50867}=1.006,correct to 4
significant figures.Now try the following exercise
Exercise 173 Further problemson the
trapezoidal ruleIn Problems 1 to 4, evaluate the definite integrals
using thetrapezoidal rule, giving the answers
correct to 3 decimal places.1.∫ 102
1 +x^2dx (Use 8 intervals) [1.569]2.∫ 312ln3xdx (Use 8 intervals) [6.979]3.∫ π
3
0√
(sinθ)dθ (Use 6 intervals) [0.672]4.∫ 1. 40e−x2
dx (Use 7 intervals) [0.843]45.3 The mid-ordinate rule
Let a required definite integral be denoted again
by∫b
aydxand represented by the area under the graph
ofy=f(x)betweenthelimitsx=aandx=b,asshown
in Fig. 45.2.y 1 y 2 y 3 ynO abyf(x)xyddd
Figure 45.2With the mid-ordinate rule each interval of width d is
assumed to be replaced by a rectangle of height equal to
the ordinate at the middle point of each interval, shown
asy 1 ,y 2 ,y 3 , ...,ynin Fig. 45.2.Thus∫baydx≈dy 1 +dy 2 +dy 3 +···+dyn
≈d(y 1 +y 2 +y 3 + ···+yn)
i.e.the mid-ordinate rule states:∫baydx≈(width of interval) (sum
of mid-ordinates)( 2 )