# Prove that if $p$ and $q$ are odd numbers then $x$ is not a rational number in $x^2 + 2px +2q=0$ [duplicate]

How do I prove that if $p$ and $q$ are odd numbers then $x$ is not a rational number in $x^2 + 2px +2q=0$?

So I don't know a whole bunch about quadratic functions behaviour but I know that we can get the solution for $x$ with the quadratic formula. I tried comparing the general formula with a fraction in which either $m$ or $n$ is an irrational number.

\begin{equation*} \qquad \frac{-b \pm \sqrt{b^2-4ac}}{2a} = \frac{m}{n} \end{equation*}

We know that n is not the irrational number since a equals $1$ . Therefore the upper part of the quadratic formula should equal an irrational number. I'm stuck on that part though, which function property could I use to prove this?

Note: I'm new to this site and I am learning to correctly use the features of stack exchange. If there is something I can improve in I'll be more than happy to take some constructive criticism

## marked as duplicate by Parcly Taxel, Joey Zou, Claude Leibovici, Michael Hoppe, Community♦Sep 15 '16 at 23:15

• Oh wait? I answered this question here! – Parcly Taxel Sep 15 '16 at 6:31
• It's going to be irrational if and only if $\sqrt {b^2-4ac}$ is irrational. Express this in terms of p a q and see what happens. If p and q are odd, you should get that this is irrational. – fleablood Sep 15 '16 at 7:06

The discrimiant is $$\sqrt{(2p)^2-8q}=2\sqrt{p^2-2q}$$

We need $p^2-2q=r^2$ where $r$ is an integer

As $p$ is odd, so will be $r^2,r$

Finally $p^2-r^2=(p+r)(p-r)$ is a multiple of $2\cdot4$ unlike $2q$

$$x^2 + 2px + 2q = 0$$

Suppose $u$ is a rational root of the above equation. By the rational root theorem, u must be an integer. Since $0$ is an even number, $u$ must be an even number, say $u = 2v$ for some integer $v$. Substituting and simplifying, we find

$$2v^2 + 2pv + q = 0$$

But $2v^2 + 2pv + q$ is an odd integer and $0$ is an even integer.

By contradiction, there are no rational roots.