I created a program that factors quadratic equations and the algorithm works fine, but I need some help in displaying the result. Preferably in the form of (x+a)(x+b). Any help is greatly appreciated!
what's the code. Once we know that, then helping you will be much easier. I did something like this, except I based it off of the quadratic equation. I'll look for my solution and get back to you. But i'm interested to see what you try on your own. One thing you might be able to try would be to use the output function and use a combination of strings and variables such as
:Output(1,1,"X+"
:Output(1,3, -X /// using X as one of your output variables. Also, you'd make it negative, because that's how it would appear in the factor. Also, then it might display as X+-1, which would essentially be the same thing as displaying X-1.
Try doing that for your program.
Tom R.
Blacksmith, woodsman, patriot, and programmer.
yeah, I've looked at my program and it's something like this:
:ClrHome
:Prompt A,B,C
:((-B+√(B²-4AC))/2A)→X
:((-B-√(B²-4AC))/2A)→Y
:Output(1,2,"X+"
:Output(1,4,-X
:Output(2,2,"X+"
:Output(2,4,-Y
Tom R.
Blacksmith, woodsman, patriot, and programmer.
I have created a program that works very well, and will actually factor not only real quadratics, but will give you the equation for the imaginary ones too! I am sure that this has been done many times before, and I am actually in the process of improving it, but here it is, as it stands now, exactly as typed in for the program
:Fix 3
:Prompt A,B,C
:If (B2-4AC)<0
:Then
:prgmIQUADFOM
:Else
:(-(-B+√(B2-4AC))/(2A))→N
:-N→P
:prgmNUMSTRIN
:str1→str2
:(-(-B-√(B2-4AC))/(2A))→N
:-N→M
:prgmNUMSTRIN
:Disp "(X+"+Str2+"+"(X+"+Str1+")"
:P→N
:prgmNUMSTRIN
:Str1→Str3
:M→N
:prgmNUMSTRIN
:Str1→Str4
:Disp "X="+Str3+","+Str4
:End
:Float
The program IQUADFOM is this:
:ClrHome
:(-(B2-4AC))→N
:prgmNUMSTRIN
:Str1→Str2
:(2A)→N
:prgmNUMSTRIN
:Str1→Str3
:(-B)→N
:prgmNUMSTRIN
:Disp " "+Str1+" +- i√("+Str2
/NOTE:There are three spaces in the first set of quotes, and there is only one space between the second quote and the plus, as well as only one space between the - and the /NOTE:i
:Disp " --—-"
/NOTE:There are two spaces, and then 13 -'s
:Disp " "+Str3
/NOTE: There are eight spaces in the quotes
The program NUMSTRIN is:
:{0,1→L₁
:{0,N→L₂
:LinReg(ax+b) r₁
/NOTE: r₁ is the first polar equation, accessible through VARS, left arrow key, 3, 1
:Equ▶String(r₁,Str1
:sub(str1,1,length(str1)-3→str1
And there you go! Works very well, and if I ever figure out how to simplify and reduce the fraction from IQUADFOM, I will post it here for you.
Hope this helps!
All you need to do is use the quadratic equation and add the a+bi function in the beginning. Such as:
:a+bi
:ClrHome
:Prompt A,B,C
:((-B+√(B²-4AC))/2A)→X
:((-B-√(B²-4AC))/2A)→Y
:Output(1,2,"X+"
:Output(1,4,-X
:Output(2,2,"X+"
:Output(2,4,-Y
Tom R.
Blacksmith, woodsman, patriot, and programmer.
Not to be a killjoy, but I prefer to use the Application Plysmlt (or whatever it is called). It can solve polynomials up to the 10th power I think, as well as solve simultaneous equations in the form:
3x + 2y + 1z = 10
2x + 1y + 5z = 15
9x + 5y + 0z = 51
Except you only have to enter the coefficients.
If you are trying to learn TI BASIC, do what Forgemaster said.

Fire Emblem for TI 83/4+ Progress: Demo: 75% Total: 40% Postponed indefinitely