E-Code

Trapezoid and Simpson vs nInt — a TI-89 Titanium program

By E-Code · updated

INTEG89 is a TI-89 BASIC program for the TI-89 Titanium. Type f(x), the limits and an even number of panels: the trapezoid and Simpson estimates, the calculator's nInt value, and each rule's error.

What it asks for and what it shows

It asks for 4 values at its prompts. In the example below it shows TRAP, SIMPSON, NINT, TRAP ERR.

Example run

One of its oracle test cases: “x² from 0 to 3”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1x^2
Input 20
Input 33
Input 46
The screen shows
TRAP=9.125
SIMPSON=9
NINT=9
TRAP ERR=0.125

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-89 Titanium, they make 21 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-89 Titanium math programs · All TI-89 Titanium programs