# Quadratic equation which has rational roots

If the following quadratic equation $$qx^2+(p+q)x+bp=0$$ always has rational roots for any non-zero integers $p$ and $q$ what will be the value of $b$?

My book's solution says the value of $b$ will be $0$ or $1$.

If we consider the discriminant of the equation, $$D=(p+q)^2-4bqp = p^2+2q(1-2b)p+q^2$$ then $D$ should be a perfect square of a rational number for the equation having rational roots. so the value of b should be 0 0r 1 for given conditions (p and q are non-zero integers and the equation always has rational roots)

But I am not sure whether we can conclude the discriminant $D=p^2+2q(1-2b)p+q^2$ is a perfect square of a rational number if only if b is 0 or 1.

I can see if b is 0 or 1, then $D$ will be $(p+q)^2$ or $(p-q)^2$. So $D$ will be a perfect square of a rational number.

But I can't figure out the other case: If $D$ is a perfect square of a rational number for any non-zero integer p and q , then the value of b will be 0 or 1.

EDIT 1: b is rational number.

• Are there restrictions on $b$? (Is it an integer? a rational number?)
– Blue
Jul 2 '13 at 22:05

The key is that it must always have rational roots for any $p, q$.

Claim: Let $f(x) = x^2 + bx + c$, where $b$ and $c$ are rational numbers. If $f(x)$ satisfies the condition that for all rational numbers $r$, $f(r)$ is the square of a rational number, then $f(x)$ must be the square of a polynomial.

Proof: By completing the square, we simply need to consider polynomials of the form $x^2 + \frac{n}{m}$, where $m,n$ are integers and $\gcd(n,m) = 1$.

Consider $x = 0$ and $\frac{1}{m}$, which gives us $\frac{n}{m}$ and $\frac{1+mn}{m^2}$ are both squares of rational numbers. Multiplying both terms by $m^2$, we get that $mn$ and $mn+1$ are both integers that are squares of a rational number, hence they are perfect squares, so $mn=0$.

Since $m\neq 0$, hence $n=0$ and thus $f(x) = x^2$ and we are done. $_\square$

Corollary: $b=0$ or $1$.

Proof: Consider the polynomial $f(x) = \left( \frac{p}{q} \right)^2 + 2(1-2b) \frac{p}{q} + 1$. From the conditions, for rational numbers, this always evaluates to a rational square. Hence, we must have $f(x) = (ax+b)^2$.

Comparing coefficients, we see that $a ^2 = 1, b^2 = 1$, which implies that $f(x) = (x+1)^2$ or $(x-1)^2$, which hence correspond to $b=0$ and $b=1$ respectively. $_\square$

Note: Franklin shows that the claim is true for all polynomials, though it uses more machinery.

• Nice! I had typed a horribly awkward argument, and decided, with some reluctance, to post it. Now don't need to. Jul 3 '13 at 1:40