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.