Section 14: Numerical Integration 199

Find Si(2).

Key in the following subroutine to evaluate the function f(x) = (sin x) / x.*

Keystrokes ¥

´b .2

[

®

÷

n

Display

 

 

000–

 

Program mode.

001–42,21, .2

Begin subroutine with a b

 

 

instruction.

002–

23

Calculate sin x.

003–

34

Since a value of x will be

 

 

placed in the Y-register by the

 

 

falgorithm before it

 

 

executes this subroutine, the

 

 

®operation at this point

 

 

will return x to the X-register

 

 

and move sin x to the Y-

 

 

register.

004–

10

Divide sin x by x.

005–

43 32

 

Now key the limits of integration into the X- and Y-registers. In Radians mode, press ´f.2 to calculate the integral.

Keystrokes

Display

¥

0.4401

0 v

0.0000

2

2

R

2.0000

´f .2

1.6054

Run mode.

Key lower limit into Y- register.

Key upper limit, into X- register.

(If not already in Radians mode.)

Si(2).

*If the calculator attempted to evaluate f(x) = (sin x)/x at x = 0, the lower limit of integration, it would terminate with Error 0 in the display (signifying an attempt to divide by zero), and the integral could not be calculated. However, the f algorithm normally does not evaluate functions at either limit of integration, so the calculator can calculate the integral of a function that is undefined there. Only when the endpoints of the interval of integration are extremely close together, or the number of sample points is extremely large, does the algorithm evaluate the function at the limits of integration.

Page 199
Image 199
HP 15c Scientific manual Keystrokes ¥, 6054