Proving that a quadratic equation has no integer solution if c=2n and n is odd

quadraticssolution-verification

My textbook makes the proposition: For all integers $m$ and $n$, if $n$ is odd, then the equation \begin{align}
x^2+2mx+2n=0
\end{align}

Has no integer solution for $x$.

It asks me to prove via a proof by contradiction. I assumed the negation of the proposition is: There exists integers $m$ and $n$, where $n$ is odd and the equation $x^2+2mx+2n=0$ has an integer solution for $x$.

If $n$ is odd there must be some integer $a$ such that $n=2a+1$. Substituting that we get $$x^2+2mx+2(2a+1)=0\\x^2+2mx+4a+2=0$$ If we put that into a quadratic equation, we get $$\frac{-2m \pm \sqrt{(2m)^2-4(1)(4a+2)}}{2(1)} = \frac{-2m \pm \sqrt{4m^2-16a-8}}{2} = \frac{-2m \pm \sqrt{4(m^2-4a-2)}}{2} = \frac{-2m \pm 2 \sqrt{m^2-4a-2}}{2} = -m \pm \sqrt{m^2-4a-2}$$ So the way I see to find a contradiction is for that to not possibly be an integer, or for $m$ or $a$ to also not be integers or something. But I am lost trying to find the contradiction. If someone can please help.

Best Answer

Your solution can be finished by noting that every integer square must be congruent to $0$ or $1$ (mod $4$) (that is, is of the form $4j$ or $4j+1$), which forces $m^2-4a-2$ to be congruent to $2$ or $3$ (mod $4$) and thus cannot be a perfect square.

Alternatively, we can look at the original expression $x^2+2mx+2n$ and note that:

  • if $x$ is odd, then $x^2+2(mx+n)$ is odd and hence not equal to $0$;
  • if $x$ is even, then $x^2+2mx$ is a multiple of $4$, and hence $x^2+2mx+2n$ is congruent to $2$ (mod $4$) and thus still not equal to $0$.