How to check, when/whether a quadratic equation has iteger roots

1.1k Views Asked by At

I am familliar with the Jacobi symbol and thus can check for an equation, whether it has solutions in a given $\mathbb{Z}_n$. But how do I check for integer solutions in general?

In perticular, I found the question: for which $a$ does $ax^2+2x+4=0$ have integer solutions?

4

There are 4 best solutions below

0
On

Hint: think of the quadratic formula and the $\sqrt{b^2-4ac}$ in it.

2
On

You know that the answer to that is $x=\frac{-2 \pm \sqrt{4-16a}}{2a}=\frac{-1 \pm \sqrt{1-4a}}{a}$.

You have a condition for those solutions to be real ($1-4a\geq0$), then you need to ensure that it's a perfect square which is $\equiv 1[a]$ or$\equiv -1[a]$ .

For $\equiv 1[a]$, solutions are in the form $a=-\frac{4+2k}{k^2}$, $k\in \mathbb{Z}^*$

1
On

We interpret the question as asking for which integers $a$ does the equation have at least one integer solution. Of course there is $a=0$. Now look for non-zero $a$.

By the Rational Roots Theorem, any rational solution is of the form $\frac{p}{q}$, where $p$ divides $4$ and $q$ divides $a$. If this is to be an integer, it must be $\pm 1$, $\pm 2$, or $\pm 4$. Check for each of these whether it yields an integer value of $a$.

0
On

Hint $\,\ a,x,p\in\Bbb Z,\,\ p\,$ prime, $\,ax^2\!+px+p^2=0\,\Rightarrow\, x\mid p^2\,\Rightarrow\,x = \pm p^n,\ n\le 2.\,$ Therefore

$$ a \,=\, \dfrac{-p^2-px}{x^2} \,=\, \dfrac{-p^2\pm p^{n+1}}{p^{2n}} \,=\, \dfrac{-p^{2-n}\pm p}{p^n}\in\Bbb Z\iff n<2 \iff n = 0,1$$

Remark $\ $ That the factors of $\,p^2$ have said form follows from uniqueness of prime factorizations. In your special case $\,p = 2\,$ so we don't need such a powerful result. But generally we will.