I need the general form of integer solutions to this equation $$a^2+b^2=c^2+d^2=2x^2$$ Here is my partial solution:-
The parametrization of the integer solutions of the equation $$p^2+q^2=2y^2$$ is the following:- $$p=k(m^2-n^2+2mn)$$ $$q=k(m^2-n^2-2mn)$$ $$y=k(m^2+n^2)$$ where $k,m,n\in\mathbb Z$. The proof can be seen here.
If we have two triplets of that satisfy the equations $p^2+q^2=2y^2$ and $r^2+s^2=2z^2$, we can multiply $p$, $q$ and $y$ with $z$ to get $$(pz)^2+(qz)^2=2(yz)^2$$ Similarly we can multiply $c$, $d$ and $z$ with $y$ to get $$(ry)^2+(sy)^2=2(yz)^2$$ Combining the two equations, we get $$(pz)^2+(qz)^2=(ry)^2+(sy)^2=2(yz)^2$$ If we set it like the following:- $$a=pz$$ $$b=qz$$ $$c=ry$$ $$d=sy$$ $$x=yz$$ we get integer solutions to $a^2+b^2=c^2+d^2=2x^2$ We can replace $p$ with $k(m^2-n^2+2mn)$, $q$ with $k(m^2-n^2-2mn)$ and $y$ with $k(m^2+n^2)$. Similarly, we can replace $r$ with $l(u^2-v^2+2uv)$, $s$ with $l(u^2-v^2-2uv)$ and $z$ with $l(u^2+v^2)$ and adding a scale factor $t$ to get $$a=k(m^2-n^2+2mn)l(u^2+v^2)t$$ $$b=k(m^2-n^2-2mn)l(u^2+v^2)t$$ $$c=k(u^2-v^2+2uv)l(m^2+n^2)t$$ $$d=k(u^2-v^2-2uv)l(m^2+n^2)t$$ $$x=k(u^2+v^2)l(m^2+n^2)t$$ This is a nice set of integer solutions to the equation $a^2+b^2=c^2+d^2=2x^2$. But I don't know if every integer solution will be in the form given above. If not, what is the parametrization of integer solutions to the equation that doesn't miss any integer solution? I also want the proof too, just to convince myself that the answer is true.
Edit:I have found from the comments that my set of equations misses a lot of solutions. So can somebody come up with a parametrization for this? (Where it is guaranteed that $a,b,c,d,x\in\mathbb Z$)
Update:I realized that my set of equations would miss some solutions where $k(m^2+n^2)$ and $l(u^2+v^2)$ are not relatively prime. So, instead of multiplying $p$, $q$ and $y$ with $z$ to get $(pz)^2+(qz)^2=2(yz)^2$ and multiplying $c$, $d$ and $z$ with $y$ to get $(ry)^2+(sy)^2=2(yz)^2$, we should multiply $p$, $q$ and $y$ with $\frac{LCM(y, z)}{y}$ and multiply $c$, $d$ and $z$ with $\frac{LCM(y, z)}{z}$ to get $$\left(\frac{pLCM(y, z)}{y}\right)^2+\left(\frac{qLCM(y, z)}{y}\right)^2=2(LCM(y, z))^2$$ and $$\left(\frac{rLCM(y, z)}{z}\right)^2+\left(\frac{sLCM(y, z)}{z}\right)^2=2(LCM(y, z))^2$$ Putting everything in terms of $m, n, u$ and $v$, we get
$$a=tk(m^2-n^2+2mn)\left(\frac{LCM(k(m^2+n^2),l(u^2+v^2))}{k(m^2+n^2)}\right)$$
$$b=tk(m^2-n^2-2mn)\left(\frac{LCM(k(m^2+n^2),l(u^2+v^2))}{k(m^2+n^2)}\right)$$
$$c=tl(u^2-v^2+2uv)\left(\frac{LCM(k(m^2+n^2),l(u^2+v^2))}{l(u^2+v^2)}\right)$$
$$d=tl(u^2-v^2-2uv)\left(\frac{LCM(k(m^2+n^2),l(u^2+v^2))}{l(u^2+v^2)}\right)$$
$$x=t(LCM(k(m^2+n^2),l(u^2+v^2)))$$
Now, these set of equations include solutions like $(|a|,|b|,|c|,|d|,|x|)=(5,35,17,31,25)$ and $(|a|,|b|,|c|,|d|,|x|)=(1,7,5,5,5)$ which were missing with my earlier set of equations. But, I am still not sure if this set of equations misses any solutions. So, if this set of equation misses any solutions, I need the true parametrization of the integer solutions of the equation that doesn't miss any solution and its proof. Or if this is an actual parametrization of the equation that includes every integer solution, I need the proof for that.