# Creating a Simple Quadratic Formula Program on Your TI-83 Plus or TI-84 Plus

Filed under Algebra, Calculator Program, Difficulty: Medium, TI-83 Plus, TI-84 Plus.

One of the most useful features of the TI-83 Plus/TI-84 Plus series of calculators is their integrated programming language, TI-BASIC. Unfortunately, not much documentation exists online on how to create programs using this feature. This tutorial provides an introduction on how to create a simple program to solve one of the most ubiquitous problems in elementary mathematics, finding the zeros of a quadratic equation.

Note: Read the TI-89/Voyage 200 version of this tutorial here.

From your calculator’s home screen, press and then to select the “NEW” option.

Press to select and you will be prompted to name your new program. If you choose the name of an existing program, it will just open that program, so choose a unique name. Names also cannot begin with a number. You can press 2nd and then ALPHA to enter alpha lock, which lets you type using only the green letters until disabled, instead of having to press ALPHA every single time you input a letter.

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. If you press from this menu you are taken to the programming menu, which lists commands you can enter in. Under CTL are standard programming functions such as loops and conditional statements. Under I/O there are functions for getting user input and outputting statements to the home screen. The EXEC menu is a list of programs so that any TI-BASIC program can call another.

In order to create a program we need to prompt for user input, perform a calculation, and then display the result to the user. The good news is that syntax for calculations in TI-BASIC is identical to typing expressions into the home screen.

For the first line of your program, enter: Disp “AX²+BX+C. (No period) This displays “AX²+BX+C on the home screen. You can enter Disp by pressing , and a single quote can be entered by pressing ALPHA . The quote tells the program that everything after it is to be displayed as text instead of evaluated as a calculation. We don’t need to add a closing quote because there is nothing else on the line. Press to go to the next line and type Prompt A,B,C. Prompt can be entered by pressing . The prompt function asks the user to enter values for A, B, and C, which are variables on the calculator. Each letter, from A to Z, as well as theta, can be used to store a single number, and prompt does this for you for whichever letters you tell it to. Press to go to the next line.

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 that much more work. On the new line, enter Disp (-B+√(B²-4AC))/(2A. As with the quotation mark above, we don’t have to add a closing parenthesis, in this case because you are not required to close expressions on the TI-83+ and TI-84+. Since programs are stored in the calculator’s memory and too many large programs can cause your calculator to crash, leaving out unnecessary characters is a good habit to get in to. Press to go to the next line and enter Disp (-B-√(B²-4AC))/(2A for the minus case.

Now exit the program editor by pressing 2nd . You can run your program by pressing and scrolling down to your program using the arrowkeys and pressing twice when your program is selected. If your program has any errors, you can select “GOTO” and your calculator will take you to where it encounters the error.

Now you can experiment by adding more features to your program. Calcblog’s version of a simple quadratic formula program looks like this:

The a+bi line makes sure that your calculator is set to display imaginary numbers, otherwise if you input a quadratic with imaginary solutions you will get an error. You can get this command by pressing and selecting it from the list. The extra text on the bottom two Disp lines adds text labels to the solution and separates them from their corresponding equation using a comma. You can download this program here.

You can keep enhancing your quadratic formula program to include many other features, such as displaying the discriminant of the equation or formatting more nicely. Knowing how to program TI-BASIC is very useful in creating such programs, and if you’re looking for some more practice, try creating a program to calculate the area of a circle with radius R or to convert temperatures between Celsius and Fahrenheit. Happy coding!

### 6 Responses to Creating a Simple Quadratic Formula Program on Your TI-83 Plus or TI-84 Plus

1. ConsultThis

How do you get the descriminant to display? Also — do you think there’s a way to get the a+bi form of the equation but with fractions instead of decimals straight from QUADFORM without having to go to the MATH menu?

Thanks.

• Hans

You can put the ?Frac next to the variable on the Disp line to make it show as a faction.

2. Samantha

I programmed this into my calculator exactly as written here. I even double checked with the screen shot that you have. It’s giving me the wackiest wrong answers, that I’ve double checked manually and with other quadratic calculators on the internet. This previously happened before when someone else programmed it into my calculator. This might sound strange, but could my calculator just be stupid?

• Samantha

I just programmed it into a friends calculator the exact same way and they get the right answer but mine doesn’t. It’s official my calculator is stupid. No wonder I’ve been getting the wrong answers on my homework.

• Calcblog

What answers do you get when you plug in x^2-2x+1 or a sample input? It might be one of your settings is wrong. (Hopefully it’s not something worse!)

3. Dustin

How do I put in the a+bi line between the prompt line and the second display line?