Suppose the cofficients of a quadratic are rational. How can we use the discriminant to determine if the roots are also rational

algebra-precalculusquadratics

Suppose the cofficients of a quadratic are rational. How can we use the discriminant to determine if the roots are also rational?

Firstly the discriminant has to be nonnegative.

I've had a read of Rational root theorem. I kinda get it but i'm not quite sure how to apply it to find a solution for the problem.

$$\sqrt{b^2-4ac} = \frac{p}{q}$$, where $p, q \in \mathbb{Z} $ and are coprime.
$$b^2-4ac = \frac{p^2}{q^2}$$
$$ q^2(b^2-4ac) = p^2$$
Am I going in the right direction ? I want reason that some $p/q$ does exist. Please guide me.

Best Answer

To find out if the roots are rational, you need to check if the discriminant $b^2-4ac$ (which is a rational number $s/t$) is a square of a rational number. We can assume that the fraction $s/t$ is in the lowest terms, i.e., $s$, $t$ are coprime integers. Then you just need to find out if $s$ and $t$ are perfect squares (of integers).

For example $1/2x^2-x+1/4$ has discriminant $1/2$ but $2$ is not a perfect square, so the roots are not rational. On the other hand, $1/2x^2-3/2x+1$ has discriminant $9/4-2=1/4$, where both $1$ and $4$ are perfect squares, so roots are rational.