Page 105 -
P. 105
end
plot([x b],Int)
It may be useful to remind the reader, at this point, that the algorithm in
Example 4.6 can be generalized to any arbitrary function. However, it should
be noted that the key to the numerical calculation accuracy is a good choice
for the increment dx. A very rough prescription for the estimation of this
quantity, for an oscillating function, can be obtained as follows:
1. Plot the function inside the integral (i.e., the integrand) over the
desired interval domain.
2. Verify that the function does not blow-out (i.e., goes to infinity)
anywhere inside this interval.
3. Choose dx conservatively, such that at least 30 subintervals are
included in any period of oscillation of the function (see Section
6.8 for more details).
In-Class Exercises
Plot the following indefinite integrals as function of x over the indicated
interval:
∫ x cos( ) x dx 0 < x < π
Pb. 4.25 0 1+ sin( ) x / 2
/
∫ x (1+ x 23 6 <
)
Pb. 4.26 13 dx 1 < x 8
/
1 x
x (x + 2 )
Pb. 4.27 ∫ 2 2 dx 0 < x < 1
0 (x + 2 x + 4 )
∫ x 2 3 < x < π
Pb. 4.28 x sin( x dx 0) / 2
0
∫ x 2 x dx 0 < x < π
Pb. 4.29 tan( ) sec ( )x / 4
0
Homework Problem
Pb. 4.30 Another simpler algorithm than the midpoint rule for evaluating a
definite integral is the Trapezoid rule: the area of the slice is approximated by
© 2001 by CRC Press LLC