Find all positive integer solutions to the equation $x^2 + 3y^2 = z^2$
So here's what I've done thus far: I know that if a solution exists, then there's a solution where (x,y,z) = 1, because if there is one where $(x,y,z) = d$, then $\frac{x}{d}, \frac{y}{d}, \frac{z}{d}$. is also a solution.
I'm trying to mimic the pythagorean triple proof where they have that $x = u^2 - v^2$ and $y = 2uv$ and $z = u^2 + v^2$
So, looking at the original equation mod 4, I can see that it's in the form: $(0 or 1) - (0 or 1) = 3(0 or 1)$. Thus we for sure know that $3y^2$ is congruent to 0 mod 4 and that $y$ is even. We also learned that $z$ and $x$ are either both even or both odd.
From there I'm guessing I need to handle each case, but I'm stuck as to where to go from here.
The "right" way to find the parametrization of all Pythagorean triples is to realize that primitive Pythagorean triples are in one-to-one correspondence (with a couple of easy exceptions) with lines of rational slope through a given rational point on the circle $s^2+t^2=1$. Proofs of this type are easy to find once you know what you're looking for. The reason I call this the "right" proof is that you don't have to make any clever decisions, consider cases modulo $4$, or anything like that. Once you convert the problem to lines of rational slope, you just do some algebra and that's that.
Happily, the exact same method works for any plane conic, and hence any homogeneous quadratic equation in three variables. You will start with a fixed rational point on the ellipse $s^2+3t^2=1$ (I recommend $(-1,0)$), write down the general equation of a line with rational slope through that point, and solve for the second point of intersection with the ellipse. That gives (once denominators are cleared) a formula for all primitive integer solutions to $x^2+3y^2=z^2$, and you can obtain all integer solutions by multiplying through by any integer $d$.