• December 19th 2009, 08:47 PM
stevek
Hi all,

I have a bit of a unique problem that I'm hoping someone amongst you may have some suggestions on how to obtain a short cut to the answer.

Essentially, I have a list of quadratics that were generated from an initial quadratic equation by using some simple transformation rules.
This family of quadratics (I like to call it a 'family' as they're related to each other because of the transformation rules), will always contain only ONE quadratic equation that has integer roots ... the remaining quadratics in the family have either complex roots or non-integer roots.

Let me use an example to make this clearer ....

lets start with the original quadratic say, $x^2 - 4x + 4894$

Now, lets generate further members of this family by simply adding 24 to the 2nd term and subtracting 1 from the 3rd term ... so now we have the following:

(1) $x^2 - 4x + 4894$ Roots: Complex
(2) $x^2 - 28x + 4893$ Roots: Complex

Essentially, we're using the following: $x^2 - (4x + 24nx) + (4894 - n)$ to generate a family of 16 quadratics using n=0 to 15 iterations.

n
---
(0) $x^2 - 4x + 4894$ Roots: Complex
(1) $x^2 - 28x + 4893$ Roots: Complex
(2) $x^2 - 52x + 4892$ Roots: Complex
(3) $x^2 - 76x + 4891$ Roots: Complex
(4) $x^2 - 100x + 4890$ Roots: Complex
(5) $x^2 - 124x + 4889$ Roots: Complex
(6) $x^2 - 148x + 4888$ Roots: 49.75 and 98.25
(7) $x^2 - 172x + 4887$ Roots: 35.91 and 136.09
(8) $x^2 - 196x + 4886$ Roots: 29.31 and 166.69
(9) $x^2 - 220x + 4885$ Roots: 25.06 and 194.94
(10) $x^2 - 244x + 4884$ Roots: 22 and 222
(11) $x^2 - 268x + 4883$ Roots: 19.66 and 248.34
(12) $x^2 - 292x + 4882$ Roots: 17.80 and 274.20
(13) $x^2 - 316x + 4881$ Roots: 16.29 and 299.71
(14) $x^2 - 340x + 4880$ Roots: 15.02 and 324.98
(15) $x^2 - 364x + 4879$ Roots: 13.94 and 350.06

If we examine the above family of quadratics, we see that the ONLY integer roots of 22 and 222 occur at iteration 10.

Please note that for every starting quadratic that I will be using, that quadratic WILL be guaranteed to only generate a single subsequent quadratic family member that has integer roots.

Now what I would like, is for someone to suggest a way of QUICKLY finding that quadratic family member with the integer roots. I really don't want to have to plow my way through potentially millions of family members to find that single quadratic that has the only integer roots.

Hopefully I've been reasonably clear in my request and explanation.

Thanks for any assistance ...

stevek
• December 20th 2009, 12:13 AM
CaptainBlack
Quote:

Originally Posted by stevek
Hi all,

I have a bit of a unique problem that I'm hoping someone amongst you may have some suggestions on how to obtain a short cut to the answer.

Essentially, I have a list of quadratics that were generated from an initial quadratic equation by using some simple transformation rules.
This family of quadratics (I like to call it a 'family' as they're related to each other because of the transformation rules), will always contain only ONE quadratic equation that has integer roots ... the remaining quadratics in the family have either complex roots or non-integer roots.

Let me use an example to make this clearer ....

lets start with the original quadratic say, $x^2 - 4x + 4894$

Now, lets generate further members of this family by simply adding 24 to the 2nd term and subtracting 1 from the 3rd term ... so now we have the following:

(1) $x^2 - 4x + 4894$ Roots: Complex
(2) $x^2 - 28x + 4893$ Roots: Complex

Essentially, we're using the following: $x^2 - (4x + 24nx) + (4894 - n)$ to generate a family of 16 quadratics using n=0 to 15 iterations.

n
---
(0) $x^2 - 4x + 4894$ Roots: Complex
(1) $x^2 - 28x + 4893$ Roots: Complex
(2) $x^2 - 52x + 4892$ Roots: Complex
(3) $x^2 - 76x + 4891$ Roots: Complex
(4) $x^2 - 100x + 4890$ Roots: Complex
(5) $x^2 - 124x + 4889$ Roots: Complex
(6) $x^2 - 148x + 4888$ Roots: 49.75 and 98.25
(7) $x^2 - 172x + 4887$ Roots: 35.91 and 136.09
(8) $x^2 - 196x + 4886$ Roots: 29.31 and 166.69
(9) $x^2 - 220x + 4885$ Roots: 25.06 and 194.94
(10) $x^2 - 244x + 4884$ Roots: 22 and 222
(11) $x^2 - 268x + 4883$ Roots: 19.66 and 248.34
(12) $x^2 - 292x + 4882$ Roots: 17.80 and 274.20
(13) $x^2 - 316x + 4881$ Roots: 16.29 and 299.71
(14) $x^2 - 340x + 4880$ Roots: 15.02 and 324.98
(15) $x^2 - 364x + 4879$ Roots: 13.94 and 350.06

If we examine the above family of quadratics, we see that the ONLY integer roots of 22 and 222 occur at iteration 10.

Please note that for every starting quadratic that I will be using, that quadratic WILL be guaranteed to only generate a single subsequent quadratic family member that has integer roots.

Now what I would like, is for someone to suggest a way of QUICKLY finding that quadratic family member with the integer roots. I really don't want to have to plow my way through potentially millions of family members to find that single quadratic that has the only integer roots.

Hopefully I've been reasonably clear in my request and explanation.

Thanks for any assistance ...

stevek

You are looking for the member whose discriminant is a perfect square (or for the square root of the discriminant to be an integer). The discriminant of $Q(x)=ax^2+bx+c$ is $\text{disc}(Q)=b^2-4ac$.

CB
• December 20th 2009, 01:23 AM
stevek
Quote:

Originally Posted by CaptainBlack
You are looking for the member whose discriminant is a perfect square (or for the square root of the discriminant to be an integer). The discriminant of $Q(x)=ax^2+bx+c$ is $\text{disc}(Q)=b^2-4ac$.

CB

Yes, I'd already seen that but many thanks anyway for responding.

I actually need somekind of a "shortcut" to allow me to go from the original quadratic at (n=0) and find the quadratic at (n=10) without having to manually examine all the other quadratics inbetween (n=1 to n=9).

Imagine if the quadratic with the integer roots was at n=2,000,000 !!!
It'd take forever to search all the quadratics for n < 2,000,000.
• December 20th 2009, 01:41 AM
CaptainBlack
Quote:

Originally Posted by stevek
Yes, I'd already seen that but many thanks anyway for responding.

I actually need somekind of a "shortcut" to allow me to go from the original quadratic at (n=0) and find the quadratic at (n=10) without having to manually examine all the other quadratics inbetween (n=1 to n=9).

Imagine if the quadratic with the integer roots was at n=2,000,000 !!!
It'd take forever to search all the quadratics for n < 2,000,000.

Write the discriminant in terms of the coeficients of the n-th quadratic and find the value of n that gives a perfect square.

CB
• December 20th 2009, 09:39 AM
Wilmer
Well, as far as I can see, something has to be added for clarification;
like a definition of "family" or something...
In your example, n=10 works, BUT also n=67:
X^2 - 1612x + 4827 : roots 3 and 1609

Is there a "purpose" for this?

Starting point: ax^2 + bx + c = 0
a,b and c each increase or decrease n times, by a constant (possibly 0)
Let u = change to a, v = change to b, w = change to c
Then:
(a + nu)x^2 + (b + nv)x + c + nw = 0

A = a + nu, B = b + nv, C = c + nw
Ax^2 + Bx + C = 0
So:
sqrt(B^2 - 4AC) = integer ?

I see no unique solutions or quick ways...but it's Sunday (Smirk)