What's the best technique to find integer solutions for $x$ & $y$ to equations in the form $x^2-yx+ay+b = 0$ where $\space(a,b)\space$ are known integers (or even just to find the number of solutions that exist)?
2026-05-03 11:09:09.1777806549
On
Finding integer solutions to $x^2-yx+ay+b = 0$
100 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
Give $\quad x^2-yx+ay+b = 0\quad$ we know we can get integer $(y)$ solutions for any integer $x\ne a$.
$$y =\frac {-b + x^2}{a - x} \land a \ne x$$
If we then solve for $x$, we can use any of the resulting $y$-values to get an $x$
$$x = \frac{y - \sqrt{y (y - 4 a) - 4 b}}{2}$$
but this is a round-robin thing. We have seen above that there are infinitely many solutions: $$a,b,y\in\mathbb{Z}\quad\land\quad x\in\mathbb{Z}-\{a\}$$
Let $u=x-a$. The equation becomes
$$uy=(u+a)^2+b=u(u+2a)+a^2+b$$
If $a^2+b\not=0$, we must have $u\mid a^2+b$, in which case there are only finitely many solutions. If $a^2+b=0$, the equation to solve is $uy=u(u+2a)$, with infinitely many solutions of the form $(u,y)=(0,y)$ and $(u,y)=(u,u+2a)$.