Page 1 of 1

"tricky" factoring problem

Posted: Tue Jun 11, 2019 4:54 pm UTC
by Repeekthgil
I teach algebra 2 and we spend a lot of time practicing and (hopefully) mastering factoring quadratics. My favorite time comes when we've got the "what multiplies to c and adds to b" down but then x^2+5x-6 shows up and everyone jumps on 2 and 3 but forget about the negatives.

This is my example of a "tricky" quadratic. It's the base of a family of "tricky" quadratics. x^2 (+/-) 10x (+/-) 24 is also in this family.

Looking at it a little deeper, we find that this family can be scaled by "s" such that b=5s and c=6s^2.

But my question is are there other families?

At their simplest it seems like we're interested in the system of equations |a+b|=|c-d| and |a*b|=|c*d| but that's only 2 lines for 4 variables. Certainly (2,3,6,1), along with it's symmetries, work for this and the scaled case (4,6,12,2) and so on, but is there another base 4-tuple that works?

I had though it had to do with 6 being a perfect number (6=1+2+3) but the factors of 28 and 496 don't have the above property and I didn't go any further...

Has anyone ever come across this problem explored further? My google-fu is too weak to find it if it has been explored.

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 5:32 pm UTC
by gmalivuk
Repeekthgil wrote:this family can be scaled by "s" such that b=5s and c=5s^2.

I don't have anything to add about your other questions, but I assume this should read "c=6s^2"?

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 7:41 pm UTC
by phillip1882
instead of factoring "by trail and error"
you should teach the kids the quadratic formula.
A*x^2 +B*x +C = 0
x = (-B+/-sqrt(B^2 -4*A*C))/(2*A)
it works for all quadratics, and gives the two solutions for x.

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 7:44 pm UTC
by Nicias
Yes. There appear to be quite a few. For example: {(10,3), (15,2)} , {(12, 5), (20, 3)}. I used Mathematica to brute force search. Here is my code:

Code: Select all

For[n = 5, n < 1000, n++,
 f = {n/#, #} & /@ Select[Divisors[n], # < Sqrt[n] &];
 d = Flatten[{#[[1]] - #[[2]]} & /@ f];
 s = Flatten[{#[[1]] + #[[2]]} & /@ f];
 cand = Intersection[s, d];
 pos = Join[FirstPosition[s, #], FirstPosition[d, #]] & /@ cand;
 If[pos != {},
  ans = {f[[#[[1]]]], f[[#[[2]]]]} & /@ pos;
  If[GCD @@ Flatten[ans] == 1, Print[ans[[1]]]]]
 ]

It is admittedly a little bit of Mathematica non-sense. Here is what I get when I look for all such pairs with product up to 10,000:

Spoiler:

Code: Select all

{{3,2},{6,1}}

{{10,3},{15,2}}

{{12,5},{20,3}}

{{21,4},{28,3}}

{{36,5},{45,4}}

{{15,14},{35,6}}

{{55,6},{66,5}}

{{56,9},{72,7}}

{{78,7},{91,6}}

{{35,18},{63,10}}

{{30,28},{70,12}}

{{44,21},{77,12}}

{{90,11},{110,9}}

{{136,9},{153,8}}

{{40,33},{88,15}}

{{63,22},{99,14}}

{{65,24},{104,15}}

{{171,10},{190,9}}

{{132,13},{156,11}}

{{210,11},{231,10}}

{{52,45},{117,20}}

{{99,26},{143,18}}

{{70,39},{130,21}}

{{253,12},{276,11}}

{{119,30},{170,21}}

{{300,13},{325,12}}

{{240,17},{272,15}}

{{143,30},{195,22}}

{{77,60},{165,28}}

{{234,21},{273,18}}

{{152,33},{209,24}}

{{102,55},{187,30}}

{{306,19},{342,17}}

{{406,15},{435,14}}

{{195,34},{255,26}}

{{85,84},{204,35}}

{{465,16},{496,15}}

{{154,51},{238,33}}

{{117,68},{221,36}}

{{133,60},{228,35}}

{{230,39},{299,30}}

{{528,17},{561,16}}

{{255,38},{323,30}}

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 7:58 pm UTC
by gmalivuk
phillip1882 wrote:
instead of factoring "by trail and error"
you should teach the kids the quadratic formula.
A*x^2 +B*x +C = 0
x = (-B+/-sqrt(B^2 -4*A*C))/(2*A)
it works for all quadratics, and gives the two solutions for x.

Sure it always works, but for small integer coefficients in quadratics that can be easily factored, factoring is far faster. Plus it's immediately apparent why factoring works, whereas they presumably haven't learned the method that leads to the quadratic formula yet.

Nicias wrote:
Yes. There appear to be quite a few. For example: {(10,3), (15,2)} , {(12, 5), (20, 3)}.

I imagine there are infinitely many, but the useful thing that list shows is that, for a teacher introducing the idea of factoring quadratics, there are only a small handful of base examples that might come up. (No one's going to give middle schoolers x2 + 101x - 990.)

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 8:05 pm UTC
by elasto
[ninja'd but posting anyway]

phillip1882 wrote:instead of factoring "by trail and error"
you should teach the kids the quadratic formula.
A*x^2 +B*x +C = 0
x = (-B+/-sqrt(B^2 -4*A*C))/(2*A)
it works for all quadratics, and gives the two solutions for x.

While that's the general solution, and will surely be taught if it hasn't been already, it's just a rote mechanism that doesn't really provide any insight, and if you're falling back on that you might as well just fire up Wolfram Alpha and be done with it.

I'd imagine the value of this exercise is practising quickly seeing the solutions to simple equations, and so getting an 'instinct' for what's going on with a quadratic.

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 8:25 pm UTC
by doogly
Besides, once you've memorized the quadratic formula, what can you do? Solve quadratic equations? That's sort of cute and I suppose comes up when you do some parabolic motion problems in Physics 1, but if you include any questions that *actually* require things from high school algebra in a college physics course, it's just rude, you can't embarrass students and the math education system like that. No, that's rude. You always just put questions where the factoring is something they can pretty easily do on the exam.

Plus, the method of completing the square is something they're going to need when doing path integrals a few years down the line, and factoring is going to become really important once they hit ring theory. The quadratic formula qua quadratic formula has a shelf life of that particular chapter in the textbook. Next.

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 8:55 pm UTC
by jaap
I have found the parametrization to these pairs of quadratics. The expessions
a = -(3k-1)(5k+3)
b = 2(k+2)(k-5)
c = -2(k+2)(5k+3)
d = (k-5)*(3k-1)
satisfy ab=cd and a+b=c-d. As mentioned before, they can be multiplied by the same scaling factor, which I haven't explicitly included.

For example:
For k=1 you get (-16,-24,-48,-8) = -8*(2,3,6,1).
For k=0 you get (3,-20,-12,5).
For k=-1 you get (-8,-12,4,24) = -4*(2,3,-1,-6).
For k=-3 you get (-120,16,-24,80) = 8*(-15,2,-3,10)

Re: "tricky" factoring problem

Posted: Tue Jun 11, 2019 11:05 pm UTC
by Eebster the Great
jaap wrote:I have found the parametrization to these pairs of quadratics. The expessions
a = -(3k-1)(5k+3)
b = 2(k+2)(k-5)
c = -2(k+2)(5k+3)
d = (k-5)*(3k-1)
satisfy ab=cd and a+b=c-d. As mentioned before, they can be multiplied by the same scaling factor, which I haven't explicitly included.

For example:
For k=1 you get (-16,-24,-48,-8) = -8*(2,3,6,1).
For k=0 you get (3,-20,-12,5).
For k=-1 you get (-8,-12,4,24) = -4*(2,3,-1,-6).
For k=-3 you get (-120,16,-24,80) = 8*(-15,2,-3,10)

How did you find these, and does this include all solutions?

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 5:12 am UTC
by jaap
Eebster the Great wrote:How did you find these, and does this include all solutions?


Yes, it should include all solutions.

From ab=cd we know that c=at, d=b/t for some rational factor t.
Substitute in a+b=c-d to get a+b=at-b/t.
This is a quadratic in t which has determinant a^2+6ab+b^2. We want this determinant to be perfect square since we really only want rational solutions for t.
a^2+6ab+b^2 = z^2
We already know this has one solution, namely (a,b)=(3,2), which gives z=7.
Instead of integer solutions to this homogeneous equation,we can divide by z and find rational solutions:
A^2+6AB+B^2 = 1, which has solution (A,B)=(3/7,2/7).
The way to find a general parametrization of all the solutions to this conic is to draw a line with slope k through the known point, and work out the other intersection point.
So the line is k=(7A-3)/(7B-2), or A=(k(7B-2)+3)/7. Substitute this, and simplify. It helps that you know that 7B-2 is a linear factor corresponding to the known point, and the other linear factor gives you a solution for B in terms of the parameter k.
Then get an expression for A in terms of k by substituting into A=(k(7B-2)+3)/7.
A and B are rational expressions where the numerators and the shared denominator are quadratics in k. This means that apart from a scaling factor, you can let (a,b) be the numerators and z be the denominator. This leads to the solution I gave.

Edit:
I forgot that k is a rational, say u/v. This means the general solution is:

a = -(3u-v)(5u+3v)
b = 2(u+2v)(u-5v)
c = -2(u+2v)(5u+3v)
d = (u-5v)*(3u-v)

though actually this is just a scaled version of the solution in terms of k that I wrote in the previous post.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 6:01 am UTC
by Eebster the Great
Thanks, I've never really seen a problem of finding solutions in integers worked out before.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 8:20 am UTC
by jaap
Eebster the Great wrote:Thanks, I've never really seen a problem of finding solutions in integers worked out before.

FYI, if you apply the same method to the circle a^2+b^2=z^2 with known point (0,z,z) then you get the well known parametrization of Pythagorean triples (u^2-v^2, 2uv, u^2+v^2). This is a lot less messy than the problem in this thread, in case you want to work through the details.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 8:25 am UTC
by DavCrav
The rational roots test should be taught more often in, well, every place.

If a_n x^n+...+a_0 is a polynomial in Z[x], then any rational root of it is p/q, where p divides a_0 and q divides a_n.

Proof: Exercise.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 9:40 am UTC
by Eebster the Great
jaap wrote:
Eebster the Great wrote:Thanks, I've never really seen a problem of finding solutions in integers worked out before.

FYI, if you apply the same method to the circle a^2+b^2=z^2 with known point (0,z,z) then you get the well known parametrization of Pythagorean triples (u^2-v^2, 2uv, u^2+v^2). This is a lot less messy than the problem in this thread, in case you want to work through the details.

I have actually seen this before, and it's just simple enough that it's kind of intuitive. 3blue1brown also has his own nice take on it.

DavCrav wrote:The rational roots test should be taught more often in, well, every place.

If a_n x^n+...+a_0 is a polynomial in Z[x], then any rational root of it is p/q, where p divides a_0 and q divides a_n.

Proof: Exercise.

This is taught in every high school algebra program in Ohio, I think, sometimes in Algebra I and sometimes in II.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 11:42 am UTC
by DavCrav
I never met it at school in the UK, and I did a lot of maths, pretty much all the maths it was possible to take at school.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 12:38 pm UTC
by Repeekthgil
Wow. I wasn't expecting such a rapid response!

Yes that definitely was a typo about 6*s^2. Of course we teach the quadratic formula :) But factoring is a fun puzzle to play.

I went and asked another teacher and he quickly suggested we take a look at examples and see if we could find another and we did.

30 factors into 2 and 15, and, 3 and 10. And those both go to +/-13 and this gave us a really neat property.

The first 4 factors of 6 had a "cross ratio" between them of 1:3.

1, 6
2, 3

The next 4 factors had a "cross ratio" of 1:5.

2, 15
3, 10

So we found a pattern. And as we explored we found many more patterns. And when you check any of those sequences (I went with the sequence of c values: 6, 30, 84... into the OEIS you get entry number A055112. Somehow the basest family of Pythagoras is involved.

Which now makes me think we only found one family of these "tricky" factorings and that somewhere between 30 and 84 there exists another number that has factors that sum and difference in a different way... That's a relatively small gap to check.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 12:51 pm UTC
by Repeekthgil
jaap wrote:I have found the parametrization to these pairs of quadratics. The expessions
a = -(3k-1)(5k+3)
b = 2(k+2)(k-5)
c = -2(k+2)(5k+3)
d = (k-5)*(3k-1)
satisfy ab=cd and a+b=c-d. As mentioned before, they can be multiplied by the same scaling factor, which I haven't explicitly included.

For example:
For k=1 you get (-16,-24,-48,-8) = -8*(2,3,6,1).
For k=0 you get (3,-20,-12,5).
For k=-1 you get (-8,-12,4,24) = -4*(2,3,-1,-6).
For k=-3 you get (-120,16,-24,80) = 8*(-15,2,-3,10)


Hi jaap,

Thanks for this. I'm looking forward to digging into your solutions. I had wondered about negative inputs and they look to be symmetries of the positive numbers. Except your k=0. Those are different from the ones we found. They are the factors of 60, which (unsurprisingly) is a number between 30 and 84. So they might be the start of a new family. They have a ratio of 3:5. All the ones I found yesterday had unit ratios. First guess is that all odd ratios will have a "tricky" quadratic.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 1:16 pm UTC
by Eebster the Great
DavCrav wrote:I never met it at school in the UK, and I did a lot of maths, pretty much all the maths it was possible to take at school.

We call it the "Rational Root Theorem." It's not in the common core, so not everyone in the country will learn it, but all the high school algebra text books I've seen include it. It allows you to enumerate all possible roots to check them exhaustively if you really suck at factoring, but more importantly it gives you a sense of how polynomials work and what to look for, which is difficult to teach.

Re: "tricky" factoring problem

Posted: Wed Jun 12, 2019 2:27 pm UTC
by Repeekthgil
So there's a whole family of solutions with unit:odd ratios. (1:1, 1:3, 1:5, ...) These are related to Pythagorean triples with last terms differing by 1. OEIS A055112.

There's also a whole family with difference of 2 between the ratio (3:5, 5:7, 7:9, ...) These are related to OEIS sequence A069072. Pythagorean triples with odd sides differing by 2.

The integer-iness of Pythagorean triples showing up in an integer quadratic problem shouldn't come as a surprise I suppose. (edit: but it sure is surprising!)

I had noticed your discriminant property of a^2+6ab+b^2 but hadn't made the connection about wanting rational solutions. I'm in the middle of giving finals so haven't had a chance to finish working through your solution for the lines. Thanks for the input!

Re: "tricky" factoring problem

Posted: Mon Jul 08, 2019 2:20 pm UTC
by Yakk
doogly wrote:Besides, once you've memorized the quadratic formula, what can you do? Solve quadratic equations? That's sort of cute and I suppose comes up when you do some parabolic motion problems in Physics 1, but if you include any questions that *actually* require things from high school algebra in a college physics course, it's just rude, you can't embarrass students and the math education system like that. No, that's rude. You always just put questions where the factoring is something they can pretty easily do on the exam.

I am not sure what you are saying here. That if you actually require high school algebra in a first-year college physics course, you'll embarrass the failures of mathematics education and students with their inability to do it?

As for the quadratic formula, I mean, who doesn't use it when they need to work out B-spline intersections with lines, as one does?
Plus, the method of completing the square is something they're going to need when doing path integrals a few years down the line, and factoring is going to become really important once they hit ring theory. The quadratic formula qua quadratic formula has a shelf life of that particular chapter in the textbook. Next.

I've also used it when calculating the eigenvalues of 2x2 matrix transformations of the plane; those eigenvalues tell me if the transformation is a scale or not (and how big).

In addition, you can sing and dance as you recite it. Which is something I've used more often than the above.

Oh, and also, I've used it to understand some dice probability cases.

Re: "tricky" factoring problem

Posted: Tue Jul 09, 2019 11:23 am UTC
by doogly
Yup, that is precisely what I meant.