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.
If you have a TI Connectivity Cable, you can download the program main.euler.89p
The Program
:euler( ) | {This will already appear if you named the program eulgr} |
:Prgm | {This will already appear} |
:FnOff | {FnOff is in the CATALOG menu} |
:Local x,y,s | {Local is in the F4 menu} |
:Input "initial x", x | {Input is in the F3 menu} |
:Input "initial y", y | |
:Input "step size", s | |
:Lbl p | {Lbl is in the CATALOG menu} |
:For c,0,20 | {For EndFor is in the F2 menu} {The 0 is a zero} |
:x+s![]() |
{![]() |
:y+y1(x)*s![]() |
{y1 is the Y followed by a 1} |
:Line x,y,u,v | {Line is in the CATALOG menu} |
:u![]() |
|
:v![]() |
|
:EndFor | |
:Pause | {Pause is in the CATALOG menu} |
:Goto p | {Goto is in the CATALOG menu} |
:EndPrgm | {This will already appear} |
Running the Program
You will need to enter a function f(x,y) into y1 before
running the program. You should adjust the WINDOW
accordingly. The program will ask for an
initial set of coordinates for x and y. You will also need to provide
a stepsize. This can be either positive or negative.
The program will plot 20 steps and then pause. Hit
ENTER to plot the next 20 steps, and so on.
To test the program try the following:
f(x,y) = x + y,
WINDOW:
-4< x <4,
-4< y <4, Initial x = 0, Initial y = 0,
Stepsize = 0.05