Information Technology Reference
In-Depth Information
p
0
.x/
f.x/
for all x
2
Œa; b. If we are able to integrate p
0
.x/,wehaveanestimate
Z
b
f.x/dx
Z
b
a
p
0
.x/ dx:
a
We used this strategy above to derive the trapezoidal rule and in this project we
will pursue this a little further.
(a) The midpoint rule.
Let
a
C
b
2
;
p
0
.x/
D
f
x
2
Œa; b
and show that
Z
b
a
C
b
2
:
p
0
.x/dx
D
.b
a/f
(1.43)
a
The midpoint rule is given by
a
C
b
2
:
Z
b
f.x/dx
.b
a/f
(1.44)
a
(b) Note that
Z
1
x
.4
x
2
/
2
1
24
:
dx
D
(1.45)
0
Use the midpoint rule to approximate the integral (
1.45
) and compute the
relative error.
(c) Let
b
a
n
h
D
where n>0is an integer, and define
x
i C1=2
D
a
C
.i
C
1=2/h
for i
D
0;1;2;:::;n
1. Show that x
1=2
D
a
C
h=2 and that x
n1=2
D
b
h=2.
Derive the composite midpoint rule
Z
b
f.x/dx
h
n
X
i D0
f.x
i C1=2
/:
(1.46)
a