Find all solutions in positive integers of each Diophantine equation below.
a)
Let $\displaystyle x^2 + 2y^2 = z^2$ be positive integers.
We can consider the case when $\displaystyle \gcd(x,y,z)=1$.
In such a case we require that $\displaystyle x,z \text{ odd }$ and $\displaystyle y \text{ even}$.
Another observation is that $\displaystyle \gcd(x,z)=1$.
Given two positive odd integers $\displaystyle x<z$ it turns out that either $\displaystyle 4|(z+x)$ or $\displaystyle 4|(z-x)$.
These will be our two cases to consider.
Case 1 $\displaystyle z+x \equiv 0 (\bmod 4)$: We can write $\displaystyle 2y^2 = (z+x)(z-x)$ and so $\displaystyle 2(\tfrac{y}{2})^2 = \left( \tfrac{z+x}{2} \right)\left( \tfrac{z-x}{2} \right)$
Notice that, $\displaystyle \gcd\left( \tfrac{z+x}{2},\tfrac{z-x}{2} \right) = 1$
Now write, $\displaystyle (\tfrac{y}{2})^2 = \left( \tfrac{z+x}{4} \right) \left( \tfrac{z-x}{2} \right)$ with $\displaystyle \gcd \left( \tfrac{z+x}{4}, \tfrac{z-x}{2} \right) = 1$
We have a situation when product of two relatively prime integers is a square, so each integer is a square.
This gives, $\displaystyle \tfrac{z+x}{4} = a^2 \text{ and }\tfrac{z-x}{2} = b^2 \implies z+x = 4a^2 \text{ and }z-x = 2b^2 \text{ with }\gcd(a,b)=1$
Solving this we get, $\displaystyle x = 2a^2 - b^2, ~ y=2ab, ~ z = 2a^2 + b^2$
Also, $\displaystyle (2a^2 - b^2)^2 + 2(2ab)^2 = (2a^2 + b^2)^2$
This shows that the parametric description of the equations above give us a complete list for solutions.
Case 2: $\displaystyle z-x\equiv 0(\bmod 4)$: We can write $\displaystyle 2y^2 = (z+x)(z-x)$ and so $\displaystyle 2(\tfrac{y}{2})^2 = \left( \tfrac{z+x}{2} \right)\left( \tfrac{z-x}{2} \right)$
Notice that, $\displaystyle \gcd\left( \tfrac{z+x}{2},\tfrac{z-x}{2} \right) = 1$
Now write, $\displaystyle (\tfrac{y}{2})^2 = \left( \tfrac{z+x}{2} \right) \left( \tfrac{z-x}{4} \right)$ with $\displaystyle \gcd \left( \tfrac{z+x}{2}, \tfrac{z-x}{4} \right) = 1$
This gives, $\displaystyle \tfrac{z+x}{2} = a^2 \text{ and }\tfrac{z-x}{4} = b^2 \implies z+x =2a^2 \text{ and }z-x=4b^2 \text{ with }\gcd(a,b)=1$
Solving this we get, $\displaystyle x= a^2 - 2b^2, ~ y=2ab, ~ z = a^2 + 2b^2$
Also, $\displaystyle (a^2 - 2b^2)^2 + 2(2ab)^2 = (a^2 + 2b^2)^2$
This shows that the parametric description of the equations above give us a complete list for solutions.
Case 1 and Case 2 can be combined by saying: $\displaystyle x=|a^2 - 2b^2|, ~ y=2ab, ~ z = a^2 + 2b^2$ as a complete list