Main Menu | A-Level Resources Menu | Program Menu
Brian Logue, St.Columb’s College, Derry
Peter McPolin, St Mary's College of Education, Belfast
This program allows the user to calculate the definite integral of a function using the Trapezium Rule and Simpson’s Rule. The function may be entered as a formula or its values may be input directly. The student can easily compare the degree of accuracy obtained by each method for a particular set of values / function.
The main menu lists the three options shown below:

Options 2 and 3 from the above menu use data that has been previously stored in list L1 and are fairly self-explanatory.
Use the ENTER DATA option before choosing options 2 or 3 if you are entering new data. (Otherwise proceed to options 2 or 3 if the data has already been stored.) After choosing the ENTER DATA option the user is prompted for the number N of sub-intervals - see input screen below left.


Press [ENTER] after the N value to get the DATA ENTRY menu -
see above right:
Option 1 of this menu allows the user to find the definite integral of
the function of X which has been previously entered into the calculator
and stored in the variable Y1. When this option is chosen the user is prompted
for the lower and upper limits of the integral (namely XMIN and XMAX respectively).
Once these have been entered, the length H of each sub-interval and the
values Y0 to YN are calculated
and stored in the list L1, where Yi is the value of the function at X=XMIN+H*i,
i = 0 to N.
Option 2 allows the user to enter the H and Y values directly into list L1.
The program consists of a main program NINTEGM and three sub-programs:
(Click to view listing)
| NINTEGM: NINTEGD: NINTEGS: NINTEGT: |
Main Program Data Entry Program Simpson’s Rule Program Trapezium Rule Program |
The program uses 3183 bytes of memory and uses lists L1 and L2. The data is stored in L1 as follows: the ordinate values of the function are stored contiguously from L1(1) to L1(N+1), where N is the number of intervals; the length of each sub-interval is stored in L1(N+2).
Download the Ninteg.82g Program Group
Instructions for downloading at the Texas Program Archive.