If $x^2+px-q=0$ and $x^2+px+q=0$ have integer roots for real $p$ and $q$, then $p^2=a^2+b^2$ for some integers $a$ and $b$

265 Views Asked by At

Two equations $x^2+px-q=0$ and $x^2+px+q=0$ have integer roots, where $p$ and $q$ are real numbers. Prove that for some integers $a$ and $b$, $p^2 = a^2 + b^2$. In other words, have $\{a,b,p\}$ be a Pythagorean triple.

I used the quadratic equation and found that $p^2-4q$ and $p^2+4q$ are both perfect squares, and thus $2p^2 = m^2+k^2$, but I'm stuck and not sure how to continue.

1

There are 1 best solutions below

2
On

We observe that,

$$ \begin{align}&\begin{cases}p^2+4q=m^2,\thinspace m\in\mathbb Z_{>0}\\ p^2-4q=n^2,\thinspace n\in\mathbb Z_{>0}\end{cases}\\\\ \implies &2p^2=m^2+n^2,\thinspace {\color{#c00}{p\in\mathbb Z_{>0}}}\tag {*}\end{align} $$

This implies that, $m$ and $n$ have the same parities. This means, there exist $(a,b)\in\mathbb Z^2$ such that,

$$ \begin{align}&\begin{cases}m=a+b\\ n=a-b\end{cases}\implies \begin{cases}a=\frac {m+n}{2}\\ b=\frac {m-n}{2}\end{cases}\end{align} $$

holds .

This leads to :

$$ \begin{align}&2p^2=2(a^2+b^2)\\ \implies &p^2=a^2+b^2\end{align} $$

where $a=\frac {m+n}{2}$ and $b=\frac {|m-n|}{2}\thinspace .$


${(^*)}\thinspace\thinspace$We assume that $\thinspace p\in\mathbb Z^{+}$, since $(a,b,p)$ is a Pythagorean triple .