E-Code

ODE: Euler vs RK4 table — a TI-89 Titanium program

By E-Code · updated

ODE89 is a TI-89 BASIC program for the TI-89 Titanium. Type dy/dx = f(x,y), the starting point, the end x and up to 20 steps: a table of the RK4 solution, then Euler and RK4 at the end side by side.

What it asks for and what it shows

It asks for 5 values at its prompts. In the example below it shows EULER, RK4.

Example run

One of its oracle test cases: “y' = y, e in 5 steps”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1y
Input 20
Input 31
Input 41
Input 55
The screen shows
EULER=2.48832
RK4=2.718251137

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 15 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