Karla News

Program Your TI84, Lesson 5: Finding the Vertex of a Quadratic Equation

If you want to save time on your high school math homework using this TI-84 Calculator Program to find vertex of a quadratic equation. You have found the right article. The double slash “//” is a comment mark and that tells you what the calculator is doing in the program. These comments are not meant to be placed in the program.

Here is how this article works:

1. All BOLD type is what is meant to be typed into your calculator inside the program
2. // Introduce comments, these are not meant to be put into the calculator and are only there to explain what is going on.
3. // *** Program Start *** // & // *** Program End *** // Tell you when to start entering code and when to stop. The program name is included.
a. Try to use the same program names that way you can just copy my code without having to worry about changing all the names to work
4. The code will show up twice, once with the comments in them to show you how it works and again at the end without the comments so you can just copy the code into your calculator.
5. At the end of the Article you will find a tutorial guide on where to find certain calculator key strokes as well as other functions that I have created.
a. If I have created another function for another tutorial I will not retype it here, I will simply link to my other article and you can copy it from that one.
6. If you input a problem and it does not work out correctly please message me so I can update or change the code.
7. Just a note about naming conventions, I use my own naming conventions that make sense to me to keep things organized. It would be much easier if you used the same function names but it is not necessary.

// *** FQuadVertex Start *** //
// FQuadVertex accepts user input in the form of the coefficients of a quadratic formula
// Using the discriminant the calculator will then print out the vertex of the quadratic equation.
// Most of the calculator out put will be on the graph screen where the pixels are smaller
// so more text can be fit, AxesOff turns of the x and y axes, the ClrDraw erases anything
// Left there from previous programs and ClrHome clears the regular calc screen

See also  A Guide to Taking the SAT2 Exams

AxesOff
ClrDraw
Text( 1, 1, “Input the Coefficients” )

// This is a pause moment, the user will need to hit a key to move on
prgmZGetKey

// The calculator then asks the user for the coefficients stored in the same variable as the
// Quadratic equation
ClrHome
Input “A: “, A
Input “B: “, B
Input “C: “, C
ClrDraw
0 => N

// This portion will print out the quadratic equation so one does not forget which equation
// They put into the calculator, not necessary, but a nice feature
// Negative signs must be done separately because of space concerns. The N variable is
// the Horizontal spacer, most characters are 3 pixels plus 1 for a space, we increment
// N so we can place the next character in line with out overlaying the first one.

Text( 1, N, “Y=”)
(N + 8) => N

// The next three if statements do the same thing. First checking if the Coefficient is
// Negative, if it is it places a negative sign, then puts the number using the absolute
// value function to make sure no stray negatives mess up spacing and then the
// Program calls FSIZE which counts the number of digits in the value and spaces
// according to that, so if A is a 3 digit number it would space 12 not just 4.

If ( A < 0 )
Then
Text( 1, N, “-” )
(N + 4) => N
End

Text( 1, N, abs(A) )

If ( A = 0 )
Then
(N+ 4) => N
Else
abs(A) => H
prgmFSIZE
End

Text( 1, N, “X2”)
(N + 8) => N

If ( B < 0 )
Then
Text(1, N, “-“)
Else
Text( 1, N, “+”)
End
(N+4) => N
Text( 1, N, abs(B) )

If ( B = 0 )
Then
(N+ 4) => N
Else
abs(B) => H
prgmFSIZE
End

Text( 1, N, “X”)
(N + 4) => N

If ( C < 0 )
Then
Text(1, N, “-“)
Else
Text( 1, N, “+”)
End
(N+4) => N
Text( 1, N, abs(C) )

0 = > N

Text( 31, 1, “This Quadratic Equation’s Vertex is: “)
(N + 28) => N

See also  Review of Glencoe French 2 À Bord

Text( 31, N, “(” )
(N + 4) => N
(-B) => K
(2A) => L

// K and L will the values I use to reduce a fraction, this way I can output in fraction form
// without having to deal with decimals
prgmFREDUCE

// This checks to see if the x coordinate is positive or negative
If ( ( (-B) / (2A) ) < 0 )
Then
Text( 31, N, “-” )
(N + 4) => N
End

// Out puts K, if it’s an integer FSIZE counts the digits for spacing purposes
Text( 31, N, K )
If ( K = 0 )
Then
(N + 4) => N
Else
K => H
prgmFSIZE
End

// If L is > 1 then the fraction must be displayed, that is what this is checking
If ( abs(L) > 1 )
Then
Text ( 31, N, “/” )
(N + 4) => N
Text( 31, N, abs(L) )
If ( L = 0 )
Then
(N + 4) => N
Else
L => H
prgmFSIZE
End

Text( 31, N, “, “)
(N + 4) => N

(B2 – 4AC) => K
(4A) => L

prgmFREDUCE

If ( ( K / L ) < 0 )
Then
Text( 31, N, “-” )
(N + 4) => N
End

Text( 31, N, K )
If ( K = 0 )
Then
(N + 4) => N
Else
K => H
prgmFSIZE
End

If ( abs(L) > 1 )
Then
Text( 31, N, “/” )
(N + 4) => N
Text( 31, N, abs(L) )
If ( L = 0 )
Then
(N + 4) => N
Else
L => H
prgmFSIZE
End

Text( 31, N, “)” )
// *** FQuadVertex End *** //

// *** FREDUCE Start *** //
// This makes sure K and L are positive then finds the Greatest Common Factor
// The GCF can then be divided out the way we do when reducing a fraction
// What is left is K is the reduced Numerator and L is the reduced numerator.
abs(K) => K
abs(L) => L

gcd(K, L) => R

( K/R ) => K
( L/R ) => L

// *** FREDUCE End *** //

This program is complete, further on you will find the code so it is not messed with comments so you may find it easier to read and to copy.

// *** FQuadVertex Start *** //
AxesOff
ClrDraw
Text( 1, 1, “Input the Coefficients” )

prgmZGetKey

ClrHome
Input “A: “, A
Input “B: “, B
Input “C: “, C
ClrDraw
0 => N

Text( 1, N, “Y=”)
(N + 8) => N

If ( A < 0 )
Then
Text( 1, N, “-” )
(N + 4) => N
End

Text( 1, N, abs(A) )

If ( A = 0 )
Then
(N+ 4) => N
Else
abs(A) => H
prgmFSIZE
End

Text( 1, N, “X2”)
(N + 8) => N

See also  Society's Obsession with the Male Member

If ( B < 0 )
Then
Text(1, N, “-“)
Else
Text( 1, N, “+”)
End
(N+4) => N
Text( 1, N, abs(B) )

If ( B = 0 )
Then
(N+ 4) => N
Else
abs(B) => H
prgmFSIZE
End

Text( 1, N, “X”)
(N + 4) => N

If ( C < 0 )
Then
Text(1, N, “-“)
Else
Text( 1, N, “+”)
End
(N+4) => N
Text( 1, N, abs(C) )

0 = > N

Text( 31, 1, “This Quadratic Equation’s Vertex is: “)
(N + 28) => N

Text( 31, N, “(” )
(N + 4) => N
(-B) => K
(2A) => L

prgmFREDUCE

If ( ( (-B) / (2A) ) < 0 )
Then
Text( 31, N, “-” )
(N + 4) => N
End

Text( 31, N, K )
If ( K = 0 )
Then
(N + 4) => N
Else
K => H
prgmFSIZE
End

If ( abs(L) > 1 )
Then
Text ( 31, N, “/” )
(N + 4) => N
Text( 31, N, abs(L) )
If ( L = 0 )
Then
(N + 4) => N
Else
L => H
prgmFSIZE
End

Text( 31, N, “, “)
(N + 4) => N

(B2 – 4AC) => K
(4A) => L

prgmFREDUCE

If ( ( K / L ) < 0 )
Then
Text( 31, N, “-” )
(N + 4) => N
End

Text( 31, N, K )
If ( K = 0 )
Then
(N + 4) => N
Else
K => H
prgmFSIZE
End

If ( abs(L) > 1 )
Then
Text( 31, N, “/” )
(N + 4) => N
Text( 31, N, abs(L) )
If ( L = 0 )
Then
(N + 4) => N
Else
L => H
prgmFSIZE
End

Text( 31, N, “)” )
// *** FQuadVertex End *** //

// *** FREDUCE Start *** //
abs(K) => K
abs(L) => L

gcd(K, L) => R

( K/R ) => K
( L/R ) => L

// *** FREDUCE End *** //

All the functions that are required for the number of solutions of a quadratic formula have been given to you.

If you are unsure how to get how to reach a certain function in the calculator then you will find out how to do that here. There are also other notes because some of the syntax has to be changed due to what is allowed in an article positing.

gcd( can be found under the math button, scrolling right to the NUM menu. It is option 9.

Reference: