Numerical integration 437
With 6 intervals, each will have a width of
π
2
− 0
6
i.e.
π
12
rad (or 15 ◦ ) and the ordinates occur at
0,
π
12
,
π
6
,
π
4
,
π
3
,
5π
12
and
π
2
Corresponding values of
1
1 + sin x
are shown in the
table below.
x
1
1 + sin x
0
1.0000
π
12
(or 15 ◦ )
0.79440
π
6
(or 30 ◦ )
0.66667
π
4
(or 45
◦ )
0.58579
π
3
(or 60
◦ )
0.53590
5π
12
(or 75 ◦ )
0.50867
π
2
(or 90 ◦ )
0.50000
From equation (1):
π
2
0
1
1 + sin x
dx ≈
π
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 problems on the
trapezoidal rule
In Problems 1 to 4, evaluate the definite integrals
using the trapezoidal rule, giving the answers
correct to 3 decimal places.
1.
1
0
2
1 + x 2 dx (Use 8 intervals)
[1.569]
2.
3
1
2 ln3x dx (Use 8 intervals)
[6.979]
3.
π
3
0
(sin θ)dθ (Use 6 intervals) [0.672]
4.
1.4
0
e
−x 2 dx (Use 7 intervals)
[0.843]
45.3 The mid-ordinate rule
Let a required definite integral be denoted again
by
b
a y dx and represented by the area under the graph
of y = f (x) between the limits x = a and x = b, as shown
in Fig. 45.2.
y 1
y 2
y 3
y n
a
b
O
y ϭ f(x)
x
y
d
d
d
Figure 45.2
With 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
as y 1 , y 2 , y 3 , ..., y n in Fig. 45.2.
Thus
b
a
y dx ≈ d y 1 + d y 2 + d y 3 + · · · +d y n
≈ d( y 1 + y 2 + y 3 + · · · + y n )
i.e. the mid-ordinate rule states:
b
a
y dx ≈ (width of interval) (sum
of mid-ordinates)
(2)
Précédent

- 456/705

Suivant