Hi there Electrician,
Yes that makes sense. Maybe i was thinking about all the possibilities of a,b,c instead of just integers, but yes we're talking about them all being integers for the most part. So probably the discriminant can be a 'first test' so to speak.
In any case, it looks like the formula i presented earlier:
[LATEX]\[\left( x-\frac{\sqrt{{b}^{2}-4\,a\,c}-b}{2\,a}\right) \,\left( a\,x-\frac{2\,a\,c}{\sqrt{{b}^{2}-4\,a\,c}-b}\right) \][/LATEX]
does in fact work to factorize the quadratic:
a*x^2+b*x+c
for any combination of a,b,c integers where a is not equal to zero and c is not equal to zero (which case it degenerates to a simpler case anyway). The formula above appears to work regardless what we throw at it. It has been checked for these sets:
-199*x^2-199*x-199
to
+199*x^2+199*x+199
for all but a=0 and/or c=0 and for only a real discriminant. That means 63044792 or more combinations of a,b,c have been checked (39534846 real), which means really any coefficient a,b,c can take on values from -199 to +199 and we still get a valid factorization. The validity was checked down to an error limit of 0.0001 percent.
So at least it looks like we have a way to factorize at least into the form:
(x-r1)*(a*x-r2)
(where r1 and r2 are calculated by the constant terms in the formula)
and then we can examine it and determine if this can be made into an integer factorization by multiplying one factor by a number N and then dividing the other factor by N.
There's a different formula that works the same way where we multiply one of the roots by a, but the results will come out the same or similar. These probably also work for non integer coefficients and possibly even for non real discriminant.
I suppose i could apply a more rigorous mathematical proof but i just dont feel the need, but comments welcome
It looks like this may work too but i havent tested it very well yet:
[LATEX]\[\left( x+\frac{\sqrt{{b}^{2}-4\,a\,c}+b}{2\,a}\right) \,\left( a\,x-\frac{\sqrt{{b}^{2}-4\,a\,c}-b}{2}\right) \][/LATEX]