Accuracy Of The Function To Be Integrated - HP -34C Owner's Handbook Manual

Table of Contents

Advertisement

A More Detailed Look at
241
This approximation took about twice as long as the approximation in
3 or (sc1]2. In this case, the algorithm had to evaluate the function
at about twice as many sample points as before in order to achieve an
approximation of acceptable accuracy. Note, however, that we received
a reward for our patience: the accuracy ofthis approximation is better,
by almost two digits, than the accuracy of the approximation calculated
using half the number of sample points.
The preceding examples show that repeating the approximation of an
integral in a different display format sometimes will give you a more
accurate answer, but sometimesit will not. Whether or not the accuracy
is changed depends on the particular function, and generally can be
determined only by trying it.
Furthermore, if you do get a more accurate answer, it will come at the
cost of about double the calculation time. This unavoidable trade-off
between accuracy and time is important to keep in mind if you are con-
sidering decreasing the uncertainty in hopes of obtaining a more accurate
answer.
Note: The time required to calculate the integral of a given
function depends not only on the numberof digits specified in
the display format, but also, to a certain extent, on the limits
of integration. When the calculation of an integral requires an
excessive amount of time, the width of the interval of integra-
tion (that is, the difference of the limits) may be too large
compared with certain features of the function being inte-
grated. For most problems, however, you need not be con-
cerned about the effects of the limits of integration on the
calculation time. These considerations, together with exam-
ples where the limits may be unduly prolonging the calcula-
tion time as well as techniques for dealing with such
situations, will be discussed later in this appendix.
Accuracy of the Function to be Integrated
The accuracy of an integral calculated using
depends on the accuracy
of the function calculated by your subroutine. This accuracy, which you
specify using the display format, depends primarily on three consider-
ations:
1. The accuracy of empirical constants in the function.

Advertisement

Table of Contents
loading

Table of Contents