Factoring Quadratics

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

quadfact.png

Routine Summary

A program that factors a quadratic using the inspection method.

Inputs

A,B,C

Outputs

L1

Variables Used

A,B,C,P,F,L,N,M,J,O,I,L1

Calculator Compatibility

TI-83/84/+/SE

Author

b2jammer

Download

quadfact.zip

:Prompt A,B,C
:AC→P:A→F:C→L
:1→N:1→M
:If (P<0) or (B<0):Then
:-1→N
:-1→M
:End
:For(J,M,N*abs(P),N)
:J+(J=0)→J
:If fPart(P/J)=0 and (P/J)+J=B:Then
:J→I
:(P/J)→O
:N*abs(P)→J
:End
:End
:{0,0,0,0→L1
:1-2(F<0)
:Ansgcd(abs(F),abs(O→L1(1
:1-2(I<0)
:Ansgcd(abs(I),abs(L→L1(2
:1-2(F<0 xor A<0)
:Ansgcd(abs(F),abs(I→L1(3
:1-2(O<0 xor B<0)
:Ansgcd(abs(O),abs(L→L1(4
:Disp "(AX+B)(CX+D)
:Disp "{A,B,C,D}
:(L1(1)L1(3)=A)
:Ans(L1(1)L1(4)+L1(2)L1(3)=B)
:Ans(L1(2)L1(4)=C)
:AnsL1

A program that takes the coefficients of a quadratic function and factors it using the Factoring by Inspection method, storing the new coefficients to L1.

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.