Once you know the quadratic formula, you can save time computing the roots (zeros) of quadratic polynomials by programming it into your Texas Instruments (TI) graphing calculator once-and-for-all.
To create a new program in your TI-83/84+,
press PRGM,
navigate over to the NEW
menu,
and select Create New
.
You’ll be asked to name your new program;
the one in this guide is named QUAD
,
but you can name yours whatever you want.
Once you enter the name
you should see a Program Editor screen like this
where you’ll write the program.
That lonely colon :
indicates
the beginning of a line of code.
Given a quadratic polynomial \(ax^2 + bx + c\) your program will need to do three things: first prompt you to input the coefficients \(a\) and \(b\) and \(c\), then calculate the roots using the quadratic formula, and then display those roots on the home screen.
-
Prompting for the Coefficients
While in the Program Editor, pressing PRGM will present you with menus of programming-related keywords. We’re interested in input/output keywords, so press PRGM and navigate over to theI/O
menu. SelectPrompt
and enterPrompt A,B,C
as the first line of your program. Now when the program is executed, it will prompt for values ofA
andB
andC
to be entered. Note that the comma , button is above the 7 button. -
Calculating the Roots
The roots \(x\) of a quadratic polynomial are \[ x = \frac{-b \pm \sqrt{b^2-4ac}}{2a} \,. \] It’ll make for a cleaner program if you only compute that square root once, and store it to a variable, sayD
. \[ x = \frac{-b \pm D}{2a} \quad\text{where } D = \sqrt{b^2-4ac} \] The syntax for storing this value toD
is√(B²−4AC)→D
, where you can enter that arrow→
by pressing the STO→ button. It will be convenient to store the two roots to variables after calculating them. We’ll store the first root toR
and the other root toT
, which stand for “R
oot” and “T
he other root” respectively. Do this with the lines(-B−D)/(2A)→R
and(-B+D)/(2A)→T
. -
Displaying the Roots
Finally to display the roots, return to the menu of input/output keywords by pressing PRGM and selecting theI/O
menu. SelectDisp
then enter the lineDisp R,T
to display the roots.
Once finished your program should look like this:
To finish up, you should test your program
on a quadratic polynomial with roots that you know
to make sure you’ve entered the code correctly.
To run your freshly written program,
press PRGM and find QUAD
under the EXEC
menu.
Selecting it will show prgmQUAD
on the home screen;
press ENTER to run prgmQUAD
.
Referring to the quadratic polynomial
\[ 6(x-28)(x-496) \;\;=\;\; 6x^2 - 3144x + 83328 \]
enter A
\(=6\),
B
\(=-3144\), and C
\(=83328\).
Delightful! Note that if you ever run this program
and receive the error ERR:NONREAL ANS
,
this indicates that the roots of the quadratic are not real.
I.e. \(ax^2+bx+c\) does not factor over the real numbers.
If you’d like to change the mode of your calculator
to display complex numbers rather than report an error,
press MODE and select a+bi
.
For more information on programming in your TI calculator, consult the programming section in your calculator’s guidebook.