6

How do I find all rational values of $x$ such that $\sqrt{x^2 +ax +b}$ is a rational number with a and b being fixed rational values and given that $a^2<4b$ ? This is a competition problem and according to the official solution:

$$\sqrt{x^2 +ax +b}\in\mathbb{Q}$$ $$\implies\sqrt{x^2 +ax +b}-x\in\mathbb{Q}$$ $$\implies\sqrt{x^2 +ax +b}-x=r,\quad r\in\mathbb{Q}$$ $$\implies\sqrt{x^2 +ax +b}=x+r$$ $$\implies x^2 +ax +b={(x+r)}^2$$ $$\implies x^2 +ax +b=x^2 +2xr + r^2$$ $$\implies x=\frac{r^2 -b}{a-2r}$$ and so on. While I don't have any problems with the solution, I think that the trick used is somewhat unintuitive. Are there any more straightforward and intuitive ways to solve this problem?

Jyrki Lahtonen
  • 140,891
  • 3
    Which "trick" are you referring to? All the steps seem straightforward to me. – Calvin Lin Dec 30 '23 at 21:20
  • @CalvinLin Taking the difference in the beginning. I agree that when presented like that it is really simple. But, I believe that someone trying to solve this problem with no experience on similar problems would not be able to come up with it easily. – MushroomTea Dec 30 '23 at 21:38
  • One possible motivation is to observe that $ \sqrt{ x^2 + ax + b } $ looks like $ x + c$, and so we (wishful thinking) work from there. – Calvin Lin Dec 30 '23 at 21:41
  • @CalvinLin This solution I found previously, even though it is far less elegant seems much more easily motivated. However, I do not know if it is correct. – MushroomTea Dec 30 '23 at 21:53
  • @OM $r$ here is simply a rational parameter which varies to give different rational values of $x$. Thus by substituting $x=\frac{r^2 -b}{a-2r}$ we get that $x^2 +ax +b = \frac{(r^2 -ar +b)^2}{(a-2r)^2}$ – MushroomTea Jan 01 '24 at 14:33

1 Answers1

3

I found another solution, which, while much longer and complex uses some common relevant problem-solving tactics. We start by setting:

$$\sqrt{x^2 +ax +b} = r, r\in{\mathbb{Q}}$$ $$x^2 +ax +b = r^2$$ $$\implies x^2 +ax +b -r^2=0$$

But we must have: $\Delta=m^2\iff a^2 -4b +4r^2=m^2\iff a^2 -4b =m^2 -(2r)^2$ $\\$ $\iff a^2 -4b = (m-2r)(m+2r),$ for some $m\in{\mathbb{Q}}$.

Setting: $m-2r=q$ and $m+2r=\frac{a^2 -4b}{q}$, for some non-zero $q\in{\mathbb{Q}}$, we obtain: $$(m-2r)+(m+2r)=\frac{a^2 -4b}{q} + q$$ $$\implies 2m=\frac{a^2 -4b+q^2}{q}$$ $$\implies m=\frac{a^2 -4b+q^2}{2q}$$ Using the previous result we solve for $r$: $$m-2r = q$$ $$\implies \frac{a^2 -4b+q^2}{2q}-2r = q$$ $$\implies 2r=\frac{a^2 -4b+q^2}{2q}-q$$ $$\implies 2r=\frac{a^2 -4b-q^2}{2q}$$ $$\implies r=\frac{a^2 -4b-q^2}{4q}$$ It is now easy to verify that $\Delta \geq 0$, for every non-zero value of $q$. As such we solve for $x$ and get: $$x_{1,2}=\frac{-a \pm\sqrt{m^2}}{2}$$ $$\implies x_{1,2}=\frac{-a \pm m}{2}$$ $$\implies x_{1,2}=\frac{-a \pm \frac{a^2 -4b+q^2}{2q}}{2}$$ $$\implies x_{1,2}=\frac{-2aq}{4q} \pm \frac{a^2 -4b+q^2}{4q}$$ $$\implies x_1 = \frac{(a^2 -2aq +q^2) -4b}{4q}, x_2 = \frac{4b-(a^2 +2aq+q^2)}{4q}$$ $$\implies x_1 = \frac{(a-q)^2 -4b}{4q}, x_2 = \frac{4b-(a+q)^2}{4q}$$ which satisfy the equation. We will also show that if $r\in{\mathbb{Q}}$ produces a rational solution to the equation $\sqrt{x^2 +ax+b}=c$, then $r$ is of the form $\frac{a^2 -4b-q^2}{4q}, q\in{\mathbb{Q}}$.

If there are any rational solutions to the equation $x^2 +ax+b -r^2 = 0$, then we must at least have: $\Delta\geq0\iff a^2 -4b +4r^2\geq0\iff r \leq -\frac{\sqrt{4b - a^2}}{2}$ or $r\geq\frac{\sqrt{4b - a^2}}{2}$ and, also $\Delta=m^2\iff a^2 -4b +4r^2=m^2$, as in the first part. If additionally, they are of the form $\frac{a^2 -4b-q^2}{4q}, q\in{\mathbb{Q}}$, then it follows that:

$$\frac{a^2 -4b-q^2}{4q} = r$$ $$\implies a^2 -4b-q^2 = 4rq$$ $$\implies q^2 + 4rq +4b -a^2 = 0$$

But we must have: $\Delta\geq0\iff (4r)^2 -4(4b-a^2)\geq0\iff 4(4r^2 -4b +a^2)\geq0$ $\\$ $\iff 4r^2 -4b +a^2\geq0$$\iff r \leq -\frac{\sqrt{4b - a^2}}{2}$ or $r\geq\frac{\sqrt{4b - a^2}}{2}$ and also, for $n=2m$, $\Delta=n^2\iff 4(a^2 -4b +4r^2)=n^2\iff a^2 -4b +4r^2=(\frac{n}{2})^2\iff a^2 -4b +4r^2=m^2$, as in the first part.

Thus we have shown that the two conditions are identical, and therefore all rational values of $r$ which produce a rational solution in the equation are of the form $\frac{a^2 -4b-q^2}{4q}$.$\square$