skip to content

$ cd ../projects

diffeq-ti84

writeup only

Differential equations toolkit in calculator-constrained Python. Exact rational arithmetic, 921 tests, byte-budgeted builds sized for TI-84 Evo memory.

Python

A complete differential equations toolkit running in the Python subset a TI-84 Evo accepts, verified by 921 tests across 13 suites and held to per-module byte budgets enforced in CI. The constraint is the whole story, and the failure inside it is that I ran out of memory before I ran out of features.

I built it in the Python subset a TI-84 Evo can run, and the interesting part is what the target takes away: no f-strings, no typing, no dataclasses, no cmath or fractions modules, output that must fit 28-character lines, and RAM tight enough that modules lazy-load one unit at a time and unload when you back out of a menu.

The failure worth naming is RAM. Every supporting file costs memory simply by being loaded, and I did not account for that until enough of them were loaded at once. The device ran out before the feature list did. The fix is a module whose only job is to clear cached bytes back out of RAM, paired with loading one unit at a time and unloading it when you back out of a menu. The lazy loading reads like a design decision above. It was a repair.

I compute everything in exact rational arithmetic through a custom fraction class with continued-fraction conversion, so no floating-point error accumulates across steps. I wrote a build stripper that enforces per-module byte budgets in CI, so the suite keeps fitting on the device.

I covered first-order equations and applications, second-order equations, Laplace transforms with partial fractions, undetermined coefficients, eigenvalue methods for systems, power series, and a small exact linear algebra library (RREF, inverses, characteristic equations).

I built a teaching mode that annotates every solver step by step: definitions, substitutions, why each move happens. I verified it with 921 tests across 13 suites, checked against course materials and independent hand computation.