### Trinomial Factoring Program for the TI-83, version 1

After working with the "split the middle term" scheme for factoring trinomials of the form

Ax2 + Bx + C
we begin to recognize a pattern to our efforts. We can codify that pattern in a program for the TI-83. Note that we are assuming that A, B, and C are integers, and that neither A nor C is 0. The image below gives the listing of the TI-83 program. That listing has been modified with the tracing lines on the left to help you identify the ranges of the the IF-THEN and IF-THEN-ELSE constructs in the program, along with the FOR structure.
 We start by clearing the screen and getting the three coefficients A, B, and C, from the user. Our goal will be to find F and G so that F*G=A*C and F+G=B. Then we can rewrite the polynomial as AX2 + FX + GX + C. Next we want to make sure that A is positive. We assume tht we will multiply the entire expressing by D. We start D as 1, but if A is negative, we set D to hold -1 and change the sign on every coefficient. We will multiply A times C, ignoring the sign of C, to get our goal product. Then, we will search for each pair of factors for that product. We need only look from 1 through the square root of E. If I goes into E exactly J times, then I and J are factors of E. However, there are different things to do if we are finding the sum or the difference of the factors. If C is positive then we want the sum, otherwise we will want the difference. We want the sum to be B, but B could be positive or negative. If B is negative, then both factors will be negative. If B is not negative, both factors will be positive. We have done all that we need to do, go to Lbl W for the next phase. The ELSE here is for the case where we want a Difference, not a Sum. In this case we just need to know if we can get the right difference. Therefore we need only compare the absolute values. There are only two possibilities, I-J=B or J-I=B. Choose the right one and set the values for F and G as indicated. We have done all that we need to do, go to Lbl W for the next phase. To get here we went through all of the factors of E and did not find one that produced the required sum of difference. Therefore, there is no integer answer. At Lbl W we have created F and G. Now we need to get the common factor for A and F and the common factor for G and C. This will give rise to the rest of the values in the answer. We have all the values. Display a template for the values and then the five values themselves.

Naturally, one could enter the program into a calculator. However, the file for the program in is available at trifact1.83p. Depending upon your browser, you should be able to save the file to your disk and then transfer it via TI-Graphlink, assuming you have the program and the required cable.