This repository contains programs for the HP Prime Graphing Calculator to perform Euler's Method for approximating solutions to differential equations.
Euler's Method is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. These programs allow users to input a differential equation (dy/dx), initial conditions (X0, Y0), a step size (h), and the number of iterations (n) to generate a table of approximate values.
- NEULER.hpprgm: An HP PPL (HP Prime Programming Language) implementation. This version utilizes the calculator's native input forms and CAS capabilities for expression evaluation.
- CNEULER.py: A Python implementation intended for the HP Prime's Python app. Note: Implementation Currently Not Working - Any Input Would Be Appreciated.
- Transfer or type the code from
NEULER.hpprgminto the HP Prime Program Editor. - I found it best to run the program via Shift + 1 and hitting "run" in the bottom right.
- Enter the derivative expression (in the included quotes with all proper operator notation IE: "(-Y/(7*X))" and NOT (-Y/7X) as HP Prime INPUT() will not recognize assumed operators and also requires quotes for STR.)
- Enter the initial values (X0 and Y0), step size, and number of steps in the input dialog.
- View the step-by-step results in the terminal.
- Original algorithm logic adapted from a TI-84 program provided by Northwestern Michigan College.
- HP PPL adaptation generated by Gemini.
- Python adaptation generated by Claude.