If \(x\), \(y\), \(z\) are coprime, the \(gcd(x^2+y^2,x^2-y^2)=2\), and \((x^2+y^2)(x^2-y^2)=z^2\), then \(x\) and \(y\) are odd while \(z\) is even.
Proof:
By hypothesis, \(2\mid (x^2+y^2)\) and \(2\mid(x^2-y^2)\). This implies \(x^2+y^2\) is even and \(x^2-y^2\) is even.
Let’s start by showing \(x\) and \(y\) must be odd. We proceed with 3 cases: \(x\) and \(y\) are odd, \(x\) and \(y\) are even, and WLOG \(x\) is even and \(y\) is odd.
Case 1: \(x\) and \(y\) are odd
By hypothesis, \(2\mid (x^2+y^2)\) and \(2\mid (x^2-y^2)\). This implies \(x^2+y^2\) is even and \(x^2-y^2\) is even.
Let \(x=2k+1\) and \(y=2j+1\) for \(k,j\in\mathbb{Z}\). We need to check both \(x^2+y^2\) and \(x^2-y^2\) are even and their greatest common factor is 2 when \(x\) and \(y\) are odd. Proceeding by substitution we see:
\[\begin{aligned} x^2 &+ y^2 & x^2 &- y^2\\ (2k+1)^2 &+ (2j+1)^2 & (2k+1)^2&-(2j+1)^2\\ 4k^2+4k&+1+4j^2+4j+1 & 4k^2+4k+1&-(4j^2+4j+1)\\ 4k^2+4j^2&+4k+4j+2 & 4k^2+4k+1&-4j^2-4j-1\\ 4k^2+4j^2&+4k+4j+2 & 4k^2-4j^2&+4k-4j\\ 2(2k^2+2j^2&+2k+2j+1) & 2(2k^2-2j^2&+2k-2j) \end{aligned}\]
Since both can be represented as 2 times an integer value, both are even numbers. Further, the greatest common factor is 2, maintaining with our hypothesis.
Case 2: \(x\) and \(y\) are both even
Let \(x=2k\) and \(y=2j\) for \(k,j\in\mathbb{Z}\). We need to check both \(x^2+y^2\) and \(x^2-y^2\) are even and their greatest common factor is 2 when \(x\) and \(y\) are even. Proceeding by substitution we see:
\[\begin{aligned} x^2 &+ y^2 & x^2 &- y^2\\ (2k)^2 &+ (2j)^2 & (2k)^2&-(2j)^2\\ 4k^2&+4j^2 & 4k^2&-(4j^2)\\ 4k^2&+4j^2 & 4k^2&-4j^2\\ 4(k^2&+j^2) & 4(k^2&-j^2) \end{aligned}\]
While both \(x^2+y^2\) and \(x^2-y^2\) can be written in the form of an even integer, their greatest common factor is 4, which contradicts with our original hypothesis. So \(x\) and \(y\) can not both be even.
Case 3: WLOG \(x\) is odd and \(y\) is even
Let \(x=2k\) and \(y=2j\) for \(k,j\in\mathbb{Z}\). We need to check both \(x^2+y^2\) and \(x^2-y^2\) are even and their greatest common factor is 2 when \(x\) and \(y\) are even. Proceeding by substituting into just \(x^2+y^2\). We see:
\[\begin{aligned} x^2 &+ y^2\\ (2k+1)^2 &+ (2j)^2\\ 4k^2+4k &+ 1+4j^2\\ 4k^2+4j^2&+4k+1\\ 2(2k^2+2j^2&+2k)+1 \end{aligned}\]
For this case, we assumed \(x\) was odd and \(y\) was even WLOG. However, in doing so we found that \(x^2+y^2\) is odd, which contradicts our hypothesis. Hence, we can not have \(x\) and \(y\) of different parity as both \(x^2+y^2\) and \(x^2-y^2\) must be even. While we could expand this case to \(x^2-y^2\), but due to our preconditions this is sufficient to conclude the case.
Having now shown \(x\) and \(y\) must both be off, we seek to prove \(z\) is even. Recall that \((x^2+y^2)(x^2-y^2)=z^2\) and both \(x^2+y^2\) and \(x^2-y^2\) are even.
Let \(a=x^2+y^2\) and \(b=x^2-y^2\). Now, since \(a\) and \(b\) are even by our definition, let \(a=2k\) and \(b=2j\) for \(k,j\in\mathbb{Z}\). Through substitution, we see: \[a\cdot b=z^2\] \[2k\cdot 2j=z^2\] Through factoring we see: \[2(kj)=z^2\] This implies \(z^2\) is even since it can be written as 2 times an integer, the general form of an even number. This also suggests \(2\mid z^2\).
Now, in knowing \(2\mid z^2\), we need to show \(2\mid z\). \(z^2\) must be even, and \(z\) can be either even or odd. Assume for the sake of contradiction that \(z\) is odd. It follows \(z=2l+1\) for \(l\in\mathbb{Z}\). Through substitution we see: \[z^2\] \[(2l+1)^2\] \[4l^2+4l+1\] \[2(2l^2+2l)+1\] This is the form of an odd number, implying \(z^2\) is odd. But, we said that \(z^2\) must be even. Thus, we have a contradiction and are left to believe that our original assumption was wrong. This means \(z\) must be even.
Therefore, we have shown \(x\) and \(y\) must be odd and \(z\) must be even. Q.E.D.