Accuracy of the function to be integrated – HP 15c User Manual

Page 41

Advertising
background image

Section 2: Working with

f

41

The HP-15C doesn't prevent you from declaring that f(x) is far more accurate than it really is.
You can specify the display setting after a careful error analysis, or you can just offer a
guess. You may leave the display set to i or

• 4 without much further thought. You

will get an estimate of the integral and its uncertainty, enabling you to interpret the result
more intelligently than if you got the answer with no idea of its accuracy or inaccuracy.

The f algorithm uses a Romberg method for accumulating the value of the integral.
Several refinements make it more effective.

Instead of using uniformly spaced samples, which can induce a kind of resonance or aliasing
that produces misleading results when the integrand is periodic f uses samples that are
spaced nonuniformly. Their spacing can be demonstrated by substituting, say,

3

2

1

2

3

u

u

x

into

1

1

2

3

1

1

)

1

(

2

3

2

1

2

3

)

(

du

u

u

u

f

dx

x

f

I

and sampling u uniformly. Besides suppressing resonance, the substitution has two more
benefits. First, no sample need be drawn from either end of the interval of integration (except
when the interval is so narrow that no other possibilities are available). As a result, an
integral like

3

0

sin

dx

x

x

won't be interrupted by division by zero at an endpoint. Second, f can integrate functions
that behave like

a

x

whose slope is infinite at an endpoint. Such functions are encountered

when calculating the area enclosed by a smooth, closed curve.

Another refinement is that f uses extended precision, 13 significant digits, to accumulate
the internal sums. This allows thousands of samples to be accumulated, if necessary, without
losing to roundoff any more information than is lost within your function subroutine.

Accuracy of the Function to be Integrated

The accuracy of an integral calculated using f depends on the accuracy of the function
calculated by your subroutine. This accuracy, which you specify using the display format,
depends primarily on three considerations:

The accuracy of empirical constants in the function.

The degree to which the function may accurately describe a physical situation.

The extent of round-off error in the internal calculations of the calculator.

Advertising