My friend has written a nonconstructive proof of the following:
Given two quadratics with integer coefficients,
$$y = x^2 + bx + c, \text{ and } y = x^2 + bx - c,$$
If both quadratics factor to integer roots, then $b$ is the hypotenuse of a Pythagorean Triple.
His proof is thus:
If the roots are integers, then the discriminants of both must perfect squares, i.e. for integers $n,m$, $b^2 -4c = n^2$ and $b^2 +4c = m^2$
Adding the two lines, we get $2b^2 = m^2 + n^2$, where $m^2 + n^2$ is an even hypotenuse of a Pythagorean Triple (by Euclid's method of generating right triangles). (It is even since both discriminants are either both even or both odd.)
So, $2b^2 = m^2 + n^2 = 2h^2$ for some P.T. hypotenuse $h$, such that $b^2 = h^2$
So now I'm curious about the following,
Is the converse of this proof also true?
And if so, given any P.T. hypotenuse, is there a direct construction of all four roots of the above quadratics? E.g. for $b=13$, the roots are $3, 10$, and $-2, 15$. Can we generate those roots given only the Pythagorean Triple $(5,12,13)$?
In general, what is the pattern to the roots?
Note
One interesting thing I've found is that, if $(x-p_1)(x-p_2)$ are factors of the first and $(x-q_1)(x-q_2)$ are factors of the second quadratic, then $b = \frac{p^2 +q^2}{p+q}$ for all permutations of $p$ and $q$.
Let $p_{\pm}(x)=x^2+bx\pm c\in\mathbb Z[x]$, with discriminant $b^2\mp4c$. As you observed, if $p_{\pm}$ have integer roots, then for integers $m,n$ we have $b^2+4c=m^2,b^2-4c=n^2$ so that $m^2+n^2=2b^2$. This does not prove that $b$ is the hypotenuse in a pythagorean triple. For example, the degenerate case $m=n=b$ always solves the equation $m^2+n^2=2b^2$, but obviously not every positive integer is the hypotenuse in a pythagorean triple.