# how do I use the solve function in program

• Jul 28th 2007, 05:03 PM
likemath
how do I use the solve function in program
I have a ti-89 titanium, and I am having trouble using the solve function in it. The program starts off asking for 5 variables such as x1, x2, v0, etc; when I get to the point of the program where I need the solve function, I write: solve(equation1=equation2,t1) "litte arrow" t1. "Little Arrow is that storing variable sign which is the sto button on the calculator. Of course before I get to the solve function, I create t1 equaled to zero so that the ti variable exists before I try to use solve(). I have also tried to take off the "little arrow" t1 part of it on what I was trying to do but to no avail. Could someone help me out? If no one has understood what I was talking about, could someone please at least give me some example code that uses the solve function within it. Thank you.
• Jul 29th 2007, 01:37 AM
earboth
Quote:

Originally Posted by likemath
I have a ti-89 titanium, and I am having trouble using the solve function in it. The program starts off asking for 5 variables such as x1, x2, v0, etc; when I get to the point of the program where I need the solve function, I write: solve(equation1=equation2,t1) "litte arrow" t1. "Little Arrow is that storing variable sign which is the sto button on the calculator. Of course before I get to the solve function, I create t1 equaled to zero so that the ti variable exists before I try to use solve(). I have also tried to take off the "little arrow" t1 part of it on what I was trying to do but to no avail. Could someone help me out? If no one has understood what I was talking about, could someone please at least give me some example code that uses the solve function within it. Thank you.

Hello,

I have attached 3 screenshots to show you how to use the build-in functions of the TI89.

1. The text of the program.
2. How to start the program. (probier is the German word for trial)
3. The IO-screen

The command Input requires a numerical expression. I named the variable for the first expression e, for the second expression f. Even though I asked for an equation you put in a term. The terms e and f are stored in y1(x) and y2(x).

The Disp command shows the result of solving the equation e = f.

I hope this helps a little bit. If you need some additional informations: ask.
• Jul 29th 2007, 10:36 AM
likemath
thanks but...
Thanks MHF Helper, but in the program that I am working on, the user enters in the variables and the program assembles the equations, which I understand how to do. The thing that I am having trouble with is that the variable that the solve function is solving for is a new variable that will be used again as another variable in the program.
• Jul 29th 2007, 11:10 AM
galactus
Hello Likemath:

I don't know of this will help, but it is the screen shots for a program I write years ago which finds the equation of a line given 2 sets of coordinates.

If it doesn't help, at least you can have a nice program. It may not be the most efficiently written, but it works well.

At the top of the one named EQOFLINE5, you'll see "li(DispHome".

Delete the li(. It should be DispHome

It has solve in it. Hope it helps a little.
• Jul 29th 2007, 01:07 PM
earboth
Quote:

Originally Posted by likemath
... I write: solve(equation1=equation2,t1) "litte arrow" t1. .... Of course before I get to the solve function, I create t1 equaled to zero so that the ti variable exists before I try to use solve(). ....

Hello,

I don't understand the procedure:
1. You have an equation which contains the variable t1.
2. t1 is set to zero.
3. You solve for t1 - but t1 has a value already :confused:

4. If you use the $\boxed{\text{STO}~\blacktriangleright}$ the variable is created and get the calculated value. So it isn't necessary to create it in advance.

Maybe it is easier for us if you show in detail what you want that the program should do. (structure of the equation, the algorithm, what you want to do with the result, etc.)
• Jul 30th 2007, 05:21 AM
likemath
here's what I got
Here's what I got. I can't do those picture thingys, so here we go....

:dist1()
:Prgm
:Input "enter x1",x1
:Input "enter x2",x2
:Input "enter v0",v0
:input Input "enter tf",tf

I did not finish the rest of it since this is where I am having my problem. Perhaps you can show me what I am doing wrong and correct it. I could not do the square root symbol, so I wrote sqrt. And the little arrow, I wrote as "sto." Thanks for your previous input.
• Jul 30th 2007, 06:45 AM
galactus
Yes, the TI-92 will use solve in a program. I have used it many times.

Look at the program I posted. It was lengthy, so I couldn't fit it on one screen shot.
• Jul 30th 2007, 06:58 AM
topsquark
Quote:

Originally Posted by galactus
Yes, the TI-92 will use solve in a program. I have used it many times.

Look at the program I posted. It was lengthy, so I couldn't fit it on one screen shot.

My bad, thanks for the correction. :)

-Dan
• Jul 31st 2007, 08:15 AM
earboth
Quote:

Originally Posted by likemath
Here's what I got. I can't do those picture thingys, so here we go....

:dist1()
:Prgm
:Input "enter x1",x1
:Input "enter x2",x2
:Input "enter v0",v0
:input Input "enter tf",tf

I did not finish the rest of it since this is where I am having my problem. Perhaps you can show me what I am doing wrong and correct it. I could not do the square root symbol, so I wrote sqrt. And the little arrow, I wrote as "sto." Thanks for your previous input.

Hello,

I've tested this program and there is actually a result. You can have a look at it by using this command: