EQUATION SOLVER by Adrian Mettler, July 1997
(kazmet@zapcom.net, http://www.zapcom.net/~kazmet/a)
SOLVE.EQ:
This is an algebraic equation solver for the TI-81* calculator. It solves a
system of two first-degree equations with two unknowns in the form y=mx+b.
HOW TO USE IT:
The two equations are in the form Y=AX+B and Y=CX+D. The program will
prompt for the values of A, B, C, and D. The solution will then be given
in (X,Y) form.
NOTES:
If you enter two equations with the same slope, the program will inform you
that there is no single solution and quit. Solutions are rounded to three
decimal places so that the X and Y usually can both fit.
--
*It should work for the other models in this series also, but might
need minor modifications.
--start program code--
Prgm1:SOLVE.EQ
:Disp "EQUATION SOLVER"
:Disp "Y1=AX+B" (Y1 is the Y subscript 1 found in 2nd•Y-VARS)
:Disp "Y2=CX+D" (Y2 is the Y subscript 2 found in 2nd•Y-VARS)
:Disp ""
:Disp "INPUT A,B,C,D"
:Input A
:Input B
:Input C
:Input D
:If A=C
:Goto E
:2 -> Ccol (-> is the [STO>] key, Ccol is found in VARS•DIM)
:1 -> Crow
:Disp "SOLUTION (X,Y)"
:(D-B)/(A-C) -> X
:X -> [C](1,1 ([C] denotes matrix C, 2nd•3)
:AX+B -> [C](1,2
:Round([C],3) -> [C]
:Disp [C]
:End
:Lbl E
:Disp "ERROR- DOES NOT HAVE 1 SOLUTION"
--end program code (190 bytes)--