For $\mathbf{coprime}$ $p,q \in \mathbb{N}$, how can I prove that:
if equation
$$px^2 - (p+q)x + p = 0$$
has a root $x \in \mathbb{Z}$,
$$px^2 + qx + p^2 - q = 0$$
has an integer root as well?
Couldn't get a working idea.
For $\mathbf{coprime}$ $p,q \in \mathbb{N}$, how can I prove that:
if equation
$$px^2 - (p+q)x + p = 0$$
has a root $x \in \mathbb{Z}$,
$$px^2 + qx + p^2 - q = 0$$
has an integer root as well?
Couldn't get a working idea.
On
From the first equation, the product of the roots is 1. So they are both 1 or both -1. If they are both 1, substituting x=1 into the first equation gives q=p. Since p and q are co-prime, p=1,q=1 or p=-1,q=-1 If they are both -1, substituting x=-1 into the first equatio gives q=-3p. Since p and q are co-prime, p=1, q=-3 or p=-1, q=3 In all four cases for p and q, substituting the values for p and q into the second equation gives solutions for x that are integers.
In this answer, $p$ and $q$ are coprime integers such that $q\geq 0$ (and $p$ can be zero or negative). We want to show that if $px^2-(p+q)x+p=0$ has an integer solution, then so does $px^2+qx+p^2-q=0$.
If $x=t$ is an integer root of $px^2-(p+q)x+p=0$, then $$t(p+q-pt)=p.$$ If $t=0$, then $p=0$. Because $\gcd(p,q)=1$, this means $q=1$. Then, the equation $px^2+qx+p^2-q=0$, which is equivalent to $x-1=0$, has an integer solution $x=1$.
From now on, suppose that $t\neq 0$. That is, $p=st$ for some integer $s$. Hence, $$p+q-pt=\frac{p}{t}=s.$$ Therefore, $$q=s+p(t-1)=s+st(t-1)=s(t^2-t+1).$$ Therefore, $s$ divides $p$ and $q$, which implies $s=\pm1$ as $p$ and $q$ are coprime. Since $q\geq 0$, we get $s=1$.
Therefore, $p=t$ and $q=t^2-t+1$. Hence, $$px^2+qx+p^2-q=tx^2+(t^2-t+1)x+\big(t^2-(t^2-t+1)\big)$$ so that $$px^2+qx+p^2-q=tx^2+(t^2-t+1)x+(t-1)=(tx+1)(x+t-1).$$ That is, $x=1-t$ is an integer solution to the quation $px^2+qx+p^2-q=0$.
The condition $q\geq 0$ is necessary. Note that $p=-2$ and $q=-3$ satisfies the condition that $px^2-(p+q)x+p=0$ has an integer solution, but $px^2+qx+p^2-q=0$ does not have an integer solution.