# Prove that if $a, b, c$ are positive odd integers, then $b^2 - 4ac$ cannot be a perfect square.

Prove that if $a, b, c$ are positive odd integers, then $b^2 - 4ac$ cannot be a perfect square.

What I have done:

This has to either be done with contradiction or contraposition, I was thinking contradiction more likely.

## 5 Answers

If $b^2-4ac$ was a perfect square then the polynomial $ax^2+bx+c$ would have some rationals $\frac {p_1}{q_1}, \frac {p_2}{q_2}$ as roots($\frac{p_i}{q_i}=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$). Therefore $(q_1x-p_1)(q_2x-p_2)=ax^2+bx+c$.
So $q_1,q_2,p_1,p_2$ are odd integers (since $q_1q_2=a,p_1p_2=c$) and $q_1p_2+q_2p_1=-b\Rightarrow\Leftarrow.$

HINT $$\text{We know that all odd squares are of the form 8k+1 (Why?)} \tag{\star}$$ Use $(\star)$, to prove what you want. Move your mouse over the gray area for the complete solution.

First note that $b^2-4ac$ is odd, if $a,b,c$ are all odd. Hence, if it is a square, it has to be a square of an odd number. Since $a,c$ are odd, we have $a=2M_a+1$ and $c= 2M_c+1$. Hence, we get $$4ac = 4(2M_a+1)(2M_b+1) = 16M_a M_b + 8(M_a + M_b) + 4 \equiv 4 \pmod8$$ Also, from $(\star)$, $b^2 \equiv 1 \pmod8$. Hence, $$b^2-4ac \equiv 5 \pmod8$$ contradicting $(\star)$.

Suppose $b^2-4ac$ is a square. Since $a,b,c$ are odd, $b^2-4ac$ must be an odd square. Hence $x=\frac{-b+\sqrt{b^2-4ac}}{2}$ is an integer. Since $x^2+bx+ac=0$, therefore $x^2+bx+ac\equiv 0\,(mod\,2)$. By FLT $x^2\equiv x\,(mod\,2)$. Hence $(1+b)x+ac\equiv 0\,(mod\,2)$. Since $2|1+b$. Thus $0+ac\equiv 0\,(mod\,2)$ (contradiction)

• Why $ax^2+bx+c=0$? I think $x$ should be $x=\frac{-b+\sqrt{b^2-4ac}}{2a}$ and then $x$ is rational. – P.. May 5 '13 at 21:46
• By the quadratic formula $\frac{-b+\sqrt{b^2-4ac}}{2}$ is a solution for $ax^2+bx+c$ – Amr May 5 '13 at 21:48
• @P.. $x=\frac{-b+\sqrt{b^2-4ac}}{2}$ is an integer because the numerator is even – Amr May 5 '13 at 21:49
• Isn't $x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$ the solution of $ax^2+bx+c$? – P.. May 5 '13 at 21:49
• @P.. This is true. But it suffices to consider one root only for my argument to work – Amr May 5 '13 at 21:51

$$a,b,c=\text{odd}\quad\iff\quad a=2A+1\quad;\quad b=2B+1\quad;\quad c=2C+1$$ $$\Delta=b^2-4ac=n^2\quad\iff\quad(2B+1)^2-4\,(2A+1)(2C+1)=n^2$$ $$(4B^2+4B+1)-4\,(4AC+2A+2C+1)=n^2$$ $$4\,\Big[(B^2+B)-(4AC+2A+2C+1)\Big]+1=n^2$$ $$\iff n=2k+1\iff n^2=4k^2+4k+1\iff$$ $$\underbrace{\underbrace{B(B+1)}_{even}-\underbrace{2\,(2AC+A+C)}_{even}-1}_{odd}=\underbrace{k(k+1)}_{even}$$ Contradiction !

\begin{align} b^2 - 4ac &= n^2 \rightarrow \text{ ...n$must be odd} \\ (b - n)(b + n) &= 4k \rightarrow \text{ ...product of 2 even numbers} \\ b-n=2 \land b+n &=2k \rightarrow \text{ ...because$k$is odd} \\ 2n+2 &= 2k \rightarrow\\ n &= k - 1 \text { ...contradicting$n$and$kare odd.} \end{align}