The Gauss Quadrature Program


This program computes the definite integral of a function you have defined in program memory.


Introduction

The Gauss Quadrature method of integration used by the program incorporates a seven-point Gaussian integration formula for an arbitrary interval.

You must store the function as a subroutine in program memory before running the Gauss Quadrature program. When the program calls the subroutine, the value for the independent variable is available in both the display and in data register H (007).

The number of subintervals affects the computation time and the accuracy. Fewer subintervals allow a quick result. More subintervals minimize error. Consider both factors when deciding on a number of subintervals.

Reference

Handbook of Mathematical Functions, M. Abramowitz and I. A. Stegun, National Bureau of Standards, 1972, p. 887.

For the Beginning Programmer

Before running the Gauss Quadrature program, you must store the function you are integrating in program memory as a subroutine.

If you are not familiar with keystroke programming, refer to the following chapters in the RPD-95 Programming Guide for instructions.
  • "Working with Programs on the RPD-95"
  • "Using Calculator Keystrokes in a Program"
  • "Controlling the Sequence of Operations"

Rules for Storing the Function

When you store the function as a subroutine, follow these rules.
  • The subroutine must be labeled fx (lowercase only).
  • Anytime the subroutine needs the independent variable, use a RCL H or RCL 007 instruction.
  • The subroutine must terminate with a RTN instruction.

Running the Program

To run the Gauss Quadrature program:
  1. Store the function in program memory, as described above.
  2. If your subroutine involves a trigonometric function, select the angle units you want to use.
  3. Select { GAU } from the MATHEMATICS menu.
    The program displays:D_y0uDMn
  4. Enter the number of subintervals and press { n }.
  5. Enter the lower limit and press { LO }.
  6. Enter the upper limit and press { HI }.
  7. Press { EOD } to evaluate the integral.
    While the program is calculating the result, "F4:EOD" is displayed. Depending on the function you are integrating, it may take several minutes to evaluate the integral.
    When the calculation is complete, the result is displayed, for example:
    D_RCnRZ2
  8. Press { ESC } to return to the GAUSS QUADRATURE menu.


Back