Using a program I found one pair only x1=-1 x2=-1008, maybe there are more, but I need a step by step mathematical solution.
2026-04-06 12:39:11.1775479151
On
$x^2+px+q=0$ where $p+q=2017$, find integers only $x_1$ and $x_2$
100 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
There are 3 best solutions below
0
On
The discriminant is $$p^2-4q=p^2-4(2017-p)=(p+2)^2-4\cdot2018$$ which needs to be perfect square.
If $(p+2)^2-4\cdot2018=r^2\iff(p+2+r)(p+2-r)=4\cdot2018$
Now as $(p+2+r)\pm(p+2-r)$ are even and the Right Hand Side, both $(p+2+r),(p+2-r)$ have to be even
$$\dfrac{p+2+r}2\cdot\dfrac{p+2-r}2=2018=2\cdot1009$$
By Vieta: $x_1+x_2=-p$ and $x_1x_2=q$ so:
$x_1x_2-x_1-x_2+1=p+q+1=2018$
$(x_1-1)(x_2-1)=2018$
So you can get $x_1$ and $x_2$ by factoring $2018$.
The prime factoring of $2018$ is $2\cdot 1009$
So $2018=(\pm 1)\cdot(\pm2018)=(\pm 2)\cdot (\pm 1009)$
Which gives you $8$ solutions:
$(-1,-2017),(-2017,-1),(2,2019),(2019,2),(-1,-1008),(-1008,-1),(3,1010),(1010,3)$