Like the TI-83 Plus and TI-84 Plus, the TI-89, TI-92 Plus, and Voyage 200 graphing calculators all have their own integrated programming language, TI-BASIC. While this language is somewhat more complex on the TI-89/V200 series than the the TI-83 Plus and TI-84 Plus, it offers expanded functionality and is able to take advantage of the TI-89 and Voyage 200′s symbolic math capabilities. This tutorial, like our tutorial for the TI-83 Plus and TI-84 Plus, provides an introduction on how to create a simple program to solve the quadratic formula, which finds the zeros of a quadratic equation.

### Programming Basics on the TI-89 and Voyage 200

You can find your calculator’s program editor on the applications menu. On older calculators, this will be a drop-down menu reached by pressing the

button. On newer calculators, the menu is made up of icons, and the program editor has an icon which is a stylized “:Prgm.”Press

to open the Program Editor once you select it. You will be prompted to name your new program. If you choose the name of an existing program, your calculator will give you an error, so choose a unique name. When typing in the name of the program, alpha lock is automatically entered, although you can also use numbers in your application name as long as they appear after the first character.You will then be taken to the program editing screen. From here you can use any of your calculator’s functions to create a program, as well as the basic programming commands. Pressing 2nd ) provides shortcuts to setting the calculator’s display and output modes.

enters the tools menu, which allows you to cut, copy, paste, and create copies of programs. Under Control, which is reached by pressing , you can find standard programming functions such as loops and conditional statements. Pressing opens the I/O menu, which lists functions for getting user input and outputting statements to the home screen. opens the Var menu, which contains functions for dealing with variables on the calculator, and also contains the Local function, which we will use later in this tutorial. opens the Find… feature, which lets you search your program for a specific string. This feature is especially useful when you are dealing with long programs. Finally, the button (reached on the TI-89 by pressing### Creating the Quadratic Program on your Graphing Calculator

The name of the program and the Prgm and EndPrgm commands will already be entered into the editor. The body of the calculator program goes between these tags. For the first line of your quadratic program, enter ClrIO, which can be reached by pressing

to get to the C menu and then using the arrow buttons to scroll down and find it. Press to paste the ClrIO function into your program. This function clears the program output screen every time the program runs so that data and graphics from previously run programs will not clutter the screen.Next, set the mode for outputting results as complex numbers in case any quadratic equations you enter result in imaginary solutions. As you may have guessed, you can reach this by pressing 2nd to enter the menu, Mode, and selecting “Complex Format > Rectangular” from the list. Press to paste this to the program screen.

We now need to display some information about the program. It makes sense for this specific program to display the equation the program solves. We will use the Disp function, under the I/O menu, to output text to the home screen. A good suggestion for what to enter is **Disp “ax^2+bx+c=0″** because this displays the type of equation we are solving. Feel free to enter more detailed instructions in this step. Note that we entered the quadratic equation between quotes. This tells the calculator that we want to output the information as a string of text on the screen, as opposed to a calculation.

The next part of the program is very important: we want to define the variables that the program is using as “Local,” so that the variables won’t affect anything outside of the program. Otherwise, after running the program, using the letter variables on the home screen might end up giving unusual results. For more info on what can go wrong if your variables are not correctly defined and how to fix it, check out this quick fix. We will be using the variables a, b, c, and d for this program, so enter **Local a,b,c,d** into the program. Remember that the Local function is on the Var menu, which can be reached by pressing .

Next we need to collect user input. One easy way to do this is by using the Prompt function, which allows the user to input data into variables. Enter **Prompt a,b,c** to prompt the user for values to the a, b, and c in the quadratic equation.

Now that we have the values of A, B, and C in our equation, we need to do something with them. You may recall that the quadratic formula is:

Since the calculator doesn’t have a ± key, we have to break this up into plus and minus cases. Luckily, this isn’t much more work, and we can break it up by calculating the value of everything under the square root first. Do this by entering **√(B²-4AC)** **d**. Now we can use the variable d in our equations.

Finally, we need to output the solutions to our equation, which can easily be combined with the remainder of the algebra into one step using the Disp function. Recall that expressions not in quotes will be evaluated, so we can enter this all in one line as below.

Now exit the program editor by pressing 2nd . Return to the home screen and test your program by entering its name followed by an opening and closing parenthesis and pressing . For example, if you named your program **quad**, you would enter **quad()**. If your program has any errors, you can select “GOTO” and your calculator will take you to where it encounters the error.

You can keep enhancing your quadratic formula program to include many other features, such as displaying the discriminant of the equation, factoring the expression if possible, or even taking input through the program line (entering quad(a,b,c) and getting an answer) as opposed to being prompted in-program. The skills in this tutorial aren’t just useful for making a quadratic solver either. If you’re looking for some more practice, try creating a program to convert temperatures between Celsius and Fahrenheit, find the area or volume of a geometric figure, finding the geometric mean of a series of numbers, or something else. The possibilities are endless.

### Download the Quadratic Program Source for Your TI-89 or Voyage 200

You can download the source for this program here.

This method didn’t work for me and the program I made that i found that worked was

quad()

Prgm

ClrIO

Prompt a,b,c

Disp “Answer”

Disp (-b+? (b^2-4*a*c))/(2*a)

Disp (-b-? (b^2-4*a*c))/(2*a)

EndPrgm

Thanks for the input! Both programs look fine, maybe you have a different OS version? What error did you get?

That was amazing! I have created my first ti89 program. Thank you so much

I have made the program several different ways, and none of them work. I cant find my “quad” program after I made it. I also am not sure how to type in my a,b,c points once I am at the HOME screen.

I am at HOME page

I type “quad()”

Inside parenthesis what do I write? I’ve tried just the numbers with a comma in between and I’ve tried “quad(a=#,b=#,c=#). None of these have worked.

Any suggestions?

If you made this specific version of the program, you shouldn’t have to enter anything in the parentheses, the program should prompt you. (Hence the “prompt” command).

You can also modify the program to work by inputting quad(a,b,c) by making that the first line of the program and removing the “prompt” line.

It worked for me. Gee, thanks!

Thank you thank you thank you!! that was a huge help for my physics class!! lol

How do you type in “?” ?

A much simpler function that uses a single input line without prompts and returns the answer to the home screen instead of program/io

How to use: type “qa(a,b,c)” into the home screen command line where a b and c are the respective coefficients after you have created the function below.

Function:

qa(x,y,z)

Func

If y^2-4*x*z<0 then

"Non-real result."

Else

(-y+{-1,1}*(y^2-4*x*z)^(1/2))/(2*x)

Endif

Endfunc