Information Technology Reference
In-Depth Information
C
Z
b
300
1
2
p.b/
D
f.x/dx;
we have
C
Z
bC1
300
1
2
p.b
C
1/
D
f.x/dx
C
Z
b
300
f.x/dx
C
Z
bC1
b
1
2
D
f.x/dx
D
p.b/
C
Z
bC1
b
f.x/dx:
Since
p.300/
D
1
2
;
we find the value of p.b/ for any integer value of b larger than 300 by performing
the following iterative procedure
p.b
C
1/
D
p.b/
C
Z
bC1
b
f.x/dx;
b
D
300; 301; : : :
Hence, we only have to apply the trapezoidal rule to intervals of length one. In
Fig.
1.7
, we have plotted p
D
p.b/ using this procedure with
7
n
D
4 in the trape-
zoidal rule at each step from b to b
C
1. We observe from the figure that the desired
value of b ensuring a sufficient supply on at least 95% of the days is between 330
and 340.InTable
1.3
we have listed the values of p.b/ for some relevant values of b
and we observe that choosing b
D
333 will give a sufficient supply on 95:1%of
the days.
1.6
Exercises
Exercise 1.1.
Let
f.x/
D
1
x
C
1
:
(a) Use the trapezoidal method (1.10) to estimate
Z
1
f.x/dx:
(1.24)
0
7
We have also tried n
D
6 and n
D
8 with the same results; in fact, the difference between the
10
6
.
associated p functions is less than 2