2

Question: Do we have positive integers $a,b,c$, s.t. each of the following equations \begin{aligned} &ax^2+bx+c=0\\ &ax^2-bx+c=0\\ &ax^2+bx-c=0\\ &ax^2-bx-c=0 \end{aligned} has two integer roots?

My Attempt:

To determine whether there exist positive integers $a, b, c$ such that each of the equations:

\begin{align*} ax^2 + bx + c &= 0, \\ ax^2 - bx + c &= 0, \\ ax^2 + bx - c &= 0, \\ ax^2 - bx - c &= 0 \end{align*}

has two integer roots, we analyze each equation using the quadratic formula.

The roots of a quadratic equation $ax^2 + bx + c = 0$ are given by:

\begin{equation} x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \end{equation}

For the roots to be integers, the discriminant $b^2 - 4ac$ must be a perfect square, say $k^2$, so:

\begin{equation} b^2 - 4ac = k^2 \end{equation}

Similarly, for the equation $ax^2 - bx + c = 0$, the discriminant is:

\begin{equation} (-b)^2 - 4ac = b^2 - 4ac = k^2 \end{equation}

which is the same as the previous condition.

For $ax^2 + bx - c = 0$, the discriminant is:

\begin{equation} b^2 + 4ac = m^2 \end{equation}

for some integer $m$, meaning $b^2 + 4ac$ is also a perfect square.

Similarly, for $ax^2 - bx - c = 0$, the discriminant is:

\begin{equation} b^2 + 4ac = m^2 \end{equation}

which is the same condition.

Thus, we must find positive integers $a, b, c$ such that both:

\begin{equation} b^2 - 4ac \text{ and } b^2 + 4ac \end{equation}

are perfect squares. This leads to:

\begin{equation} b^2 - 4ac = k^2, \quad b^2 + 4ac = m^2 \end{equation}

Adding these,

\begin{equation} 2b^2 = k^2 + m^2 \end{equation}

which requires that $k^2 + m^2$ be an even integer and that $b^2$ is half of a sum of two perfect squares.

After this, I don't know how to proceed. Please give me some ideas. Thanks!

Travis Willse
  • 108,056
  • Welcome to Math SE. Since $k$ and $m$ must have the same parity, we can define the integers $d=\frac{k+m}{2}$ and $e=\frac{k-m}{2}$, so $k=d+e$ and $m=d-e$. This gives $2b^2=k^2+m^2;\to;2b^2=(d+e)^2+(d-e)^2;\to;b^2=d^2+e^2$, i.e., $b$ must the largest of a Pythagorean triple. – John Omielan Feb 14 '25 at 16:46

3 Answers3

3

This has lots of solutions.

We assume that the roots will be integers if $a=1$ and the discriminant is a perfect square for all the sign choices given.

The discriminant is $b^2\pm4ac$, and this is to be a square along with, of course, $b^2$. Thus we have a problem of three squares in arithmetic progression. This has been solved elsewhere and I will not reinvent that wheel here. Suffice it to say that in all cases the common difference of the squares is always a multiple of $24$, so solutions with $a=1$ exist by making $b$ the square root of the middle square in the progression and $c$ a multiple of $6$.

For instance, we choose the arithmetic progression $1^2,5^2,7^2$. This gives $b=5$ and a common difference of $24$, so $4ac=24$ and $a=1$ from which $c=6$. Thus

$x^2\pm5x\pm6=0$

will have integer roots for all choices of the $\pm$ signs.

Oscar Lanzi
  • 48,208
0

I propose another method without using number theory just for reference.

First note that WLOG we can set $a=1$ because $b/a,c/a$ has to be integers. Then observe that $x^2+bx\pm c=0$ has integer roots iff $x^2-bx\pm c=0$. So it suffices to consider $x^2+bx+c=0$ and $x^2+bx-c=0$. Then it is not hard to see $4+6=12-2$ and $-4(-6)=-\left(12(-2)\right)$, so we get $b=10$ and $c=24$.

Angae MT
  • 2,206
0

Note that $k$ and $m$ have to have the same parity, which you can prove by reducing modulo $4$. We can also always scale down the polynomial so that $b$, $k$, and $m$ are relatively prime. This means there exist integers $x$ and $y$ such that $k = x+y$ and $m = x-y$, and $\gcd(x, y) = 1$. Then, $2b^2 = k^2 + m^2$ reduces to $b^2 = x^2 + y^2$, at which point you can use the parametrization of Pythagorean triples to find some valid $(b, k, m)$ triples, which at least gets you all the triples with rational solutions (i.e. you can recover all $(a, b, c)$ such that the discriminants are both integers).

I'm not sure how to determine just the ones that give integer roots, but, starting from the fact that $a$ has to divide $b\pm k$ and $b\pm m$, you can use the Pythagorean triple parametrization $b = r^2 + s^2$, $x = r^2 - s^2$, $y = 2rs$ for relatively prime integers $r$, $s$ with differing parities to conclude that $2a$ divides each of $2r(r \pm s)$ and $2s(r\pm s)$, but since $r$ and $s$ are relatively prime, $a$ can divide at most one of $r$ and $s$, which forces $a\mid r + s$ or $a\mid r - s$.

If you are looking for some examples of working triples, you can just pick a working $(b, k, m)$ pair and then force $a = 1$; for example, picking $(b, k, m) = (5, 1, 7)$ lets you get $(a, b, c) = (1, 5, 6)$, which you can check gives you four quadratics with integer roots.

edit: The other answer on this thread points out that having integer roots implies that you can always divide out the leading coefficient, so actually just the $a=1$ triples give you everything up to scaling. Whoops.