E-Code

ODE solver: Euler vs RK4 with a table — a TI-84 Plus CE program

By E-Code · updated

ODESOLV is a TI-BASIC program for the TI-84 Plus CE. Type y'=f(X,Y), the start point, the end X and the number of steps: prints an RK4 table, then Euler vs RK4 at the end, and reruns RK4 with twice the steps for an error estimate.

What it asks for and what it shows

It asks for 5 values at its prompts. In the example below it shows X END, EUL, RK4, RK2N, ERR, EERR.

Example run

One of its oracle test cases: “y'=y, e^1 in 10 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 510
The screen shows
X END=1
EUL=2.59374246
RK4=2.718279744
RK2N=2.718281693
ERR=1.299014113E-7
EERR=0.1245392326

How it's checked

7 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 46 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE math programs · All TI-84 Plus CE programs