Introduction
This program plots an approximate solution for the differential
equation
using Euler's method. These solutions can be superimposed on a slopefield
by running the Slope Field program first. Previous graphs are not cleared
for comparison purposes.
If you have not used one of the programs posted on this website before,
you should read through
the information in the Intro to Programming
section first.
The Program
<<RCLF 'flags' STO | |
-19 SF -2 SF | |
"INITIAL X" ":X:" INPUT | |
OBJ 'X' STO | |
"INITIAL Y" ":Y:" INPUT | |
OBJ 'Y' STO | |
"STEP SIZE" ":H:" INPUT | |
OBJ 'H' STO | |
"# ITERATIONS" :N:" | |
INPUT OBJ 'N' STO | |
{# 0d # 0d} PVIEW DRAX | |
SUB3 {U V X Y K H N} | |
PURGE flags STOF 'flags' | |
PURGE >> | |
ENTER 'EULG' STO | {This stores the program under variable name EULG.} |
<<1 N FOR C FUNC | |
NUM 'K' STO | |
X H + 'U' STO | |
H K * Y + 'V' STO | |
U VV2 X YV2 | |
LINE U 'X' STO | |
V 'Y' STO NEXT>> | |
ENTER 'SUB3' STO | {This stores the program under the variable name SUB3} |
Running the Program
You will need to enter a function f(x,y)
into
a variable called FUNC before running the program. Follow the instructions
in