home *** CD-ROM | disk | FTP | other *** search
/ ticalc.org / ticalc_org_rev_b.iso / archives / 81 / basic / math / solve_eq.81 < prev    next >
Encoding:
Text File  |  2001-07-01  |  1.3 KB  |  46 lines

  1. EQUATION SOLVER by Adrian Mettler, July 1997
  2. (kazmet@zapcom.net, http://www.zapcom.net/~kazmet/a)
  3.  
  4. SOLVE.EQ: 
  5. This is an algebraic equation solver for the TI-81* calculator. It solves a
  6. system of two first-degree equations with two unknowns in the form y=mx+b. 
  7.  
  8. HOW TO USE IT:
  9. The two equations are in the form Y=AX+B and Y=CX+D.  The program will
  10. prompt for the values of A, B, C, and D.  The solution will then be given 
  11. in (X,Y) form.
  12.  
  13. NOTES:
  14. If you enter two equations with the same slope, the program will inform you
  15. that there is no single solution and quit.  Solutions are rounded to three
  16. decimal places so that the X and Y usually can both fit.
  17.  
  18. --
  19. *It should work for the other models in this series also, but might 
  20. need minor modifications.
  21.  
  22. --start program code--
  23. Prgm1:SOLVE.EQ
  24. :Disp "EQUATION SOLVER"
  25. :Disp "Y1=AX+B"        (Y1 is the Y subscript 1 found in 2ndòY-VARS)
  26. :Disp "Y2=CX+D"        (Y2 is the Y subscript 2 found in 2ndòY-VARS)
  27. :Disp ""
  28. :Disp "INPUT A,B,C,D"
  29. :Input A
  30. :Input B
  31. :Input C
  32. :Input D
  33. :If A=C
  34. :Goto E
  35. :2 -> Ccol        (-> is the [STO>] key, Ccol is found in VARSòDIM)
  36. :1 -> Crow
  37. :Disp "SOLUTION (X,Y)"
  38. :(D-B)/(A-C) -> X
  39. :X -> [C](1,1        ([C] denotes matrix C, 2ndò3)
  40. :AX+B -> [C](1,2
  41. :Round([C],3) -> [C]
  42. :Disp [C]
  43. :End
  44. :Lbl E
  45. :Disp "ERROR- DOES NOT HAVE 1 SOLUTION"
  46. --end program code (190 bytes)--