i know that there is a formula for the integer solutions to the equation $x^2+y^2-z^2=0$ and it is: $x=k*(a^2-b^2)$
$y=k*2*a*b$
$z=k*(a^2-b^2)$
Is there a similar solution for $x^2+y^2-2z^2=0$?
i know that there is a formula for the integer solutions to the equation $x^2+y^2-z^2=0$ and it is: $x=k*(a^2-b^2)$
$y=k*2*a*b$
$z=k*(a^2-b^2)$
Is there a similar solution for $x^2+y^2-2z^2=0$?
Observe first that nonzero integral solutions to $x^2+y^2-2z^2=0$ are in bijective correspondence with rational solutions to $X^2+Y^2-2=0$ (just divide through by $z^2$).
Second, observe that $(1,1)$ is a solution to $X^2+Y^2-2=0$.
Combining these two facts, you can use the standard line-trick for Pythagorean triples to find other solutions. In particular, if $(a,b)$ is a rational solution to the equation $X^2+Y^2-2=0$, then the slope of the line between $(a,b)$ and $(1,1)$ is rational. On the other hand, if you consider a line with rational slope passing through the point $(1,1)$, then the other point where it intersects $X^2+Y^2-2=0$ will have rational coordinates.
Putting in a few more details, let $Y=m(X-1)+1$ be a line passing through $(1,1)$ with rational slope. Then, substituting this into the equation gives $$ X^2+m^2(X-1)^2+2m(X-1)+1-2=0. $$ Simplifying, we get $$ (1+m^2)X^2+(2m-2m^2)X+(m^2-2m-1)=0. $$ Now, $X=1$ is a solution to this equation, resulting in a factorization of $$ (X-1)((1+m^2)X+(-m^2+2m+1))=0. $$ Therefore, the other solution has $X=\frac{m^2-2m-1}{1+m^2}$.
From here, you can solve for $Y$ using $Y=m(X-1)+1$. Finally, write $m$ as a rational number $\left(\frac{p}{q}\right)$ and take a common denominator for $z$.