Show that there are infinitely many pairs $(a,b)$ of relatively prime integers (not necessarily positive) such that both quadratic equations $x^2+ax+b=0$ and $x^2+2ax+b=0$ have integer roots.
I noticed the obvious relation that $(a^2-4b)$ and $(4a^2-4b)$ both are perfect squares. Can we do anything from this? Is there any elegant and GOOD solution for this question? I failed to do anything but spending three hours.
Please help me thank you
We want $a^2-4b$ and $4a^2-4b$ to both be perfect squares $m^2$ and $n^2$. So then, their difference is $3a^2$, and we know how to factor a perfect square: $n^2-m^2=(n+m)(n-m)$. Can we assign those to two factors of $3a^2$?
First, we try the pair $a$ and $3a$. Then $n+m=3a$ and $n-m=a$, so $n=2a$ and $m=a$. This gives $b=0$. Yes, the pairs $(a,0)$ and $(2a,0)$ lead to integer solutions - but they're not relatively prime. We'll need relatively prime factors to make things work.
Next, the pair $a^2$ and $3$. Then (assuming $|a|>1$), $n+m=a^2$ and $n-m=3$, so $n=\frac{a^2+3}{2}$ and $m=\frac{a^2-3}{2}$. We need $a$ odd for this to be an integer, but it looks good so far. From $a^2-4b=m^2=\frac{a^4-6a^2+9}{4}$, we get $b=\frac{-a^4+10a^2-9}{16}=\frac{-(a^2-1)(a^2-9)}{16}$. If $a$ is divisible by $3$, that will have a common factor $3$ with $a$; otherwise, it will be relatively prime.
So there it is: one infinite family. Choose $a$ to be an integer not divisible by $2$ or $3$, and set $b=\frac{-(a^2-1)(a^2-9)}{16}$. The roots of $x^2+ax+b=0$ are $\frac{(a-3)(a+1)}{4}$ and $\frac{-(a+3)(a-1)}{4}$, while the roots of $x^2+2ax+b=0$ are $\frac{(a-3)(a-1)}{4}$ and $\frac{-(a+3)(a+1)}{4}$. A table of the first few:
$$\begin{array}{cc|c|c}a & b & \text{Roots of }x^2+ax+b=0 & \text{Roots of }x^2+2ax+b=0\\ \hline 1 & 0 & -1,0 & 0,-2\\ 5 & 24 & 3,-8 & 2,-12 \\ 7 & 120 & 8,-15 & 6,-20 \\ 11 & 840 & 24,-35 & 20,-42 \\ 13 & 1680 & 35,-48 & 30,-56 \\ 17 & 5040 & 63,-80 & 56,-90 \\ 19 & 7920 & 80,-99 & 72,-110 \end{array}$$ Are there other solutions? Of course there are - but we don't need to find them. We have enough already.