In this tutorial I will show you how to create a program that will solve a equation with variables for you. There are some requirements though.

Requirements
  • A Ti-83 or better calculator
  • Knowledge of how to use the calculator
  • Knowledge of where to find the functions
  • A little Ti-BASIC knowledge will be helpful

Well lets get into it.
Creating the Program
First, we need to create the program. Open up your program screen and create a new program. Name it something like EQSOLV.

Ok let's get started with the coding.
WARNING:
This program will use the following variables.
  • Str9
  • Str0
  • Y1
  • X

Ok, first open up the edit screen. It should like like this.

CODE
PROGRAM:EQSOLV


If it looks like then you did the creation of the program correctly.

Ok, we need to add a ClrHome command. Your screen should like this.

CODE
PROGRAM:EQSOLV
:ClrHome


Great! Time to start having user input screens. We will use the Input command and the Str0 and Str9 variables here.

-> = STO
CODE
PROGRAM:EQSOLV
:ClrHome
:Input "EQUATION:",Str0
:Input "ANSWER:",Str9


Now when the program is executed, it will ask for the equation. Then it will ask for the answer.

Ok, we now need to create one big string for the equation. We will also add some other parts to the string for evaluating.

The reason for this is that we will use the solve() function. The synatx for solve() is:solve(equation-(answer),X,guess)

CODE
PROGRAM:EQSOLV
:ClrHome
:Input "EQUATION:",Str0
:Input "ANSWER:",Str9
:Str0+"-("+Str9+")"->Str0

We now have our equation ready for solving. First, we need to turn the equation into a function.

We will use a function called String-to-Equ(). It is pictured with an arrow as "to". I will call it String-to-Equ though.

CODE
PROGRAM:EQSOLV
:ClrHome
:Input "EQUATION:",Str0
:Input "ANSWER:",Str9
:Str0+"-("+Str9+")"->Str0
:String-to-Equ(Str0,Y1)


We now have our equation saved as a function for solving. Now let's solve the equation and display our answer.

CODE
PROGRAM:EQSOLV
:ClrHome
:Input "EQUATION:",Str0
:Input "ANSWER:",Str9
:Str0+"-("+Str9+")"->Str0
:String-to-Equ(Str0,Y1)
:solve(Y1,X,0)->X
:Output(3,1,"X=
:Output(3,3,X


That will solve the equation, store it in X and display it. Keep off the end quotation marks for memory management.
You may think we are done. Well we are not quite finished. Now we need to clean up the program by erasing the variables we used. It will help memory management.

Our final code should look like this.

CODE
PROGRAM:EQSOLV
:ClrHome
:Input "EQUATION:",Str0
:Input "ANSWER:",Str9
:Str0+"-("+Str9+")"->Str0
:String-to-Equ(Str0,Y1)
:solve(Y1,X,0)->X
:Output(3,1,"X=
:Output(3,3,X
:DelVar X
:DelVar Str0
:DelVar Str9
:DelVar Y1
:Stop


There you go. A simple equation solver made in Ti-BASIC.

Instructions on Use
To use the equation solver simply enter in the equation to be solved in the equation input. Enter in the answer to the equation in the answer input.
When typing in the variable use the [X,T,(theta)] button.

Example of use:
CODE
EQUATION:2+X
ANSWER:4
X=2
Done


That would be the results when you enter in that equation.

Well thank you for reading. This is my third tutorial and I hope you like it.

 

 

 


Reply