1

Prove that if $b^2-4ac=k^2$ (for some positive integer $k$ ) then $ax^2+bx+c$ is factorizable

I related this to the roots of equation: $ax^2+bx+c=0$ and using roots $x_1,x_2$:
$(x-x_1)(x-x_2)=0\implies(2ax+k-b)(2ax+k+b)=0\implies 4a^2x^2+4akx+k^2-b^2=0$ but this seems has nothing to do with original equation.Any better way??!!

Under what conditions can we be sure the factorization involves just integers??

Hamid Reza Ebrahimi
  • 3,445
  • 13
  • 41

4 Answers4

4

$$ax^2+bx+c=a\left(\left(x-\frac{b}{a}\right)^2-\frac{b^2-4ac}{a^2}\right)=a\left(\left(x-\frac{b}{a}\right)^2-\frac{k^2}{a^2}\right)$$

which is of the form $$\alpha ^2-\beta^2=(\alpha -\beta )(\alpha +\beta ).$$

Surb
  • 55,662
3

First note that there is no mention of "$=0$" here. There is no equation, only the polynomial itself. That means you cannot multiply away the denominators (there is no $0$ on the right-hand side to absorb it). Of course, you have to "put it into an equation" to find $x_1$ and $x_2$, but for the factorisation itself, don't equationize it (I don't think that's a word...).

Also, the solution formula to said equation is $\frac{-b\pm k}{2a}$, not $\frac{-k\pm b}{2a}$, which means that your last expression should've been $4a^2x^2 + 4abx + b^2 - k^2$. If you swap back $k^2 = b^2 - 4ac$ and divide the whole thing by $4a$ again (you multiplied by $4a$ to take away the denominators), you might find that it has more to do with the original expression than you thought. Here is a full working-out, for completeness: $$ a(x-x_1)(x-x_2) = a\left(x+\frac{b+k}{2a}\right)\left(x+\frac{b-k}{2a}\right)\\ = a\left(x + \frac{b}{2a}\right)^2 - a\left(\frac{k}{2a}\right)^2 = ax^2 + bx + \frac{b^2}{4a} - \frac{b^2 - 4ac}{4a} = ax^2 + bx + c $$

Arthur
  • 199,419
  • Under which conditions can we be sure the factorization involves just integers?? – Hamid Reza Ebrahimi Jun 30 '16 at 07:47
  • @HamidRezaEbrahimi When $\frac ba$ and $\frac ca$ and $k$ are all integers. – Arthur Jun 30 '16 at 07:55
  • What about this expression: $4x^2+5x+1$? Here $\frac{b}{a}$ is not integer but it's factorizable!!! – Hamid Reza Ebrahimi Jun 30 '16 at 07:59
  • @HamidRezaEbrahimi I didn't say I covered all the cases. Those are, however, the cases where I am certain the factorisation involves only integers. In any case, that is exactly when the specific factorisation $a(x-x_1)(x-x_2)$ involves only integers. – Arthur Jun 30 '16 at 08:02
  • 2
    @HamidRezaEbrahimi I posted an answer that shows how to get all integers. – Will Jagy Jun 30 '16 at 17:47
  • @WillJagy Thank you Will! It really deserves a BIG +1! Thank you so much, in fact I was preparing to ask a new question regarding factorization involving just integers , which you solved it in advance! – Hamid Reza Ebrahimi Jul 01 '16 at 08:40
  • Can I infer that if $b^2-4ac$ is a square then $ax^2+bx+c$ is factorizable involving just integer coefficients? – Hamid Reza Ebrahimi Jul 01 '16 at 08:52
  • @HamidRezaEbrahimi yes same method with no variable $y$ in view. Try it for some examples, just make up some integer triples where $b^2 - 4 ac$ is a square. Try some with $b > 50$ so that the gcd step is not immediate by sight. – Will Jagy Jul 01 '16 at 16:49
1

SUMMARY: with $$ \color{blue}{b^2 - 4ac = \delta^2,} $$ take $$ \color{blue}{ a_1 = \gcd \left( a, \frac{(b + \delta)}{2} \right) ; \; \; \; \; \; a_2 = \frac{a}{a_1},} $$ then $$ \color{blue}{ a x^2 + b x y + c y^2 = \; \left(a_2x+ \left( \frac{b + \delta}{2a_1} \right) y \right) \; \; \left(a_1x+ \left( \frac{b - \delta}{2a_2} \right) y \right) \; } $$ in integers. If you do not want the variable $y,$ set $$ y=1. $$ EXAMPLE: $30 x^2 + 97 xy + 55 y^2.$ $a = 30, b = 97, c = 55.$ $b^2 - 4ac = 2809,$ $\delta = \sqrt {b^2 - 4ac} = 53.$ $(b+\delta)/ 2 = 75.$ $a_1 = \gcd(30,75) = \gcd(30, 15) = 15.$ $(b+\delta)/ (2 a1) = 75/15 = 5.$ $a_2 = 30/15 = 2.$ $(b-\delta)/ 2 = 22.$ $(b-\delta)/ (2 a_2) = 22/2 =11.$ $$ 30 x^2 + 97 xy + 55 y^2 = (2x+5y)(15x+11y) $$

EXAMPLE: $4 x^2 + 5 xy + y^2.$ $a = 4, b = 5, c = 1.$ $b^2 - 4ac = 9,$ $\delta = \sqrt {b^2 - 4ac} = 3.$ $(b+\delta)/ 2 = 4.$ $a_1 = \gcd(4,4) = 4.$ $(b+\delta)/ (2 a1) = 4/4 = 1.$ $a_2 = 4/4 = 1.$ $(b-\delta)/ 2 = 1.$ $(b-\delta)/ (2 a_2) = 1/1 =1.$ $$ 4 x^2 + 5 xy + y^2 = (x+y)(4x+y) $$

ORIGINAL: Either the one-variable function $$ a x^2 + b x + c $$ or the quadratic form $$ a x^2 + b x y + c y^2, $$ with integers $a,b,c,$ factor over the rational numbers if and only if the discriminant $$ \Delta = b^2 - 4 a c $$ is a square.

You are familiar with this because of the quadratic formula $$ \frac{-b \pm \sqrt \Delta}{2a} $$ which gives the roots $x$ for $ a x^2 + b x + c =0. $

Only a little changes when inserting the letter $y,$ giving $ a x^2 + b x y + c y^2. $ First, if both $a,c$ are $0,$ then we have $bxy$ which is already factored. So, let me show the traditional case, when $a \neq 0.$ Also let $$ \Delta = \delta^2, $$ say with integer $\delta \geq 0.$

$$ a x^2 + b x y + c y^2 = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + 4 a c y^2 \right) $$ $$ = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - b^2 y^2 + 4 a c y^2 \right) $$ $$ = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - (b^2 y^2 - 4 a c y^2) \right) $$ $$ = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - (b^2 - 4 a c ) y^2 \right) $$ $$ = \frac{1}{4a} \left( 4 a^2 x^2 + 4 a b x y + b^2 y^2 - \Delta y^2 \right) $$ $$ = \frac{1}{4a} \left( (2ax+by)^2 - \Delta y^2 \right) $$ $$ = \frac{1}{4a} \left( (2ax+by)^2 - \delta^2 y^2 \right) $$ $$ = \frac{1}{4a} \left( \; (2ax+by + \delta y) \; (2ax+by - \delta y) \; \right) $$ $$ = \frac{1}{4a} \left( \; (2ax+ (b + \delta) y) \; (2ax+ (b - \delta) y) \; \right) $$ Now, either $b,\delta$ are both even or both odd. Either way, we may absorb a factor of $4$ into $$ = \frac{1}{a} \left( \; (ax+ \frac{(b + \delta)}{2} y) \; (ax+ \frac{(b - \delta)}{2} y) \; \right) $$ Finally, since $$ \frac{(b + \delta)}{2} \frac{(b - \delta)}{2} = \frac{b^2 - \Delta}{4} = ac $$ is divisible by $a,$ by unique factorization we may write $$a = a_1 a_2$$ with $a_1$ dividing the first fraction and $a_2$ the second: in fact, we may simply take $$ a_1 = \gcd \left( a, \frac{(b + \delta)}{2} \right) ; \; \; \; \; \; a_2 = \frac{a}{a_1} $$ without paying attention to any prime factorizations of $a.$

We finally get $$ a x^2 + b x y + c y^2 = \; \left(a_2x+ \left( \frac{b + \delta}{2a_1} \right) y \right) \; \; \left(a_1x+ \left( \frac{b - \delta}{2a_2} \right) y \right) \; $$ in integers.

Will Jagy
  • 139,541
  • Thank you Will! It really deserves a BIG +1! Thank you so much, in fact I was preparing to ask a new question regarding factorization involving just integers , which you solved it in advance! – Hamid Reza Ebrahimi Jul 01 '16 at 08:41
  • Can I infer that if $b^2-4ac$ is a square then $ax^2+bx+c$ is factorizable involving just integer coefficients? – Hamid Reza Ebrahimi Jul 01 '16 at 08:52
0

Hint: using the quadratic formula to solve the equation $$ax^2+bx+c=0$$ we get: $$x_{1,2}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$ What can you now say about the solutions if you know that $b^2-4ac=k^2,k\in\mathbb N$?

Hirshy
  • 5,040