## Sunday, 9 October 2011

### Rational Roots of a Quadratic Equation

Here is an interesting excursion to try; take a quadratic equation that you know has rational roots, and then permute the values of A, B, and C through all possible variations. What is the probability that they would ALL have rational roots?

For example, you might try 2x2+7x + 3, which has roots of -1/2 and -3. If you switch to 2x2+3x + 7 there are no real roots at all. In fact, four of the six permutations have imaginary roots, and only 3x2+7x +2 also has rational roots.

If instead, you had used x2+3x - 10 (roots at 2 and -5) you would find three other permutations had rational roots, 3x2+x -10, -10x2+3x + 1, and -10x2+1x + 3 . The other two permutations have real irrational roots.

What happened with the choices you made for A, B, and C (you DID do it didn't you???).
Several questions pop up...

Is it possible for All six of the permutations to have rational roots?

Both my examples have an even number of the permutations that have rational roots. Is it possible that the number of permutations with rational roots could be odd?

Is it possible that a choice of A, B, and C would have two permutations with rational roots, two with irrational roots, and two with imaginary roots? (sort of the ultimate root trifecta)

The answer to the first question is yes, and it is not overly taxing to explain the possible outcomes.
Let's begin with A,B,C all positive.  For this to work in all permutations, the smallest, when it falls as B, must be large enough that B^2 > 4AC.  There would be no problem if B is switched for either larger numbers since it increases the left side and decreases the right side of the relation.  For all negative the same approach applies.

If only one of the integers is negative, the roots will be real in any of the four permutations where the negative is in the squared or the constant term.  For the final two permutations, where the negative is the linear coefficient, its square must be > 4* product of the two positive terms,

If two are negative, we again have four permutations where the roots must be real.  Two where the positive term is the quadratic coefficient, and the two where it is the constant.  For the blast two permutations, the positive term must be  > 4* product of the two negative terms.

I like the second question because it can be solved with a simple appeal to symmetry. Since B2-4AC is equal to B^2-4CA, exchanging A and C will always produce the same value for the discriminant (B2-4AC). So the number of permutations which have rational roots will always be even, 0, 2, 4 or 6.

For the Third, I resorted to a computer search and the first I found was with the values of 1, -4, and -5. x2-4x-5 has rational roots, x2-5x-4 has irrational roots, and -4x2+x-5 has imaginary roots.

#### 1 comment:

David said...

Interesting question! I found 13 essentially different triples of integers (a,b,c) such that ax^2+bx+c has rational roots for every permutation of the coefficients. I required that 0 < a ≤ |b| ≤ |c| < 500, a+b+c ≠ 0, and gcd(a,b,c) = 1.

5 -33 52
8 45 -77
9 36 -85
11 52 -288
20 32 -133
21 76 -145
23 -165 238
32 60 -143
45 172 -448
58 143 -345
75 116 -224
92 217 -480
155 171 -374