Parameterization to the Diophantine equation $x^2+4y^2=5z^2$ I'd like to ask how to obtain all integer solutions to the Diophantine equation $x^2+4y^2=5z^2$ using parameterization? Thanks.
 A: Assume that you want the primitive solutions.  I shall determine integer solutions up to sign changes.  
Note that $x\equiv \pm y\pmod{5}$.  We may assume that $x\equiv y\pmod{5}$ (otherwise, just flip the sign of $y$).  Now, write
$$z^2=\frac{x^2+4y^2}{5}=\left(\frac{x+4y}{5}\right)^2+\left(\frac{2x-2y}{5}\right)^2\,.$$
That is, using the knowledge from Pythagorian triples, we get that 
$$\frac{x+4y}{5}=m^2-n^2\,,\,\,\frac{2x-2y}{5}=2mn\,,\text{ and }z=m^2+n^2$$
for some coprime $m,n\in\mathbb{Z}$ with different parity.  Thus,
$$x=m^2+4mn-n^2\,,\,\,y=m^2-mn-n^2\,,\text{ and }z=m^2+n^2\,.$$
Note that, if you set $m:=u$ and $n:=u+v$, then you will get the same thing as in Will Jagy's answer (up to sign changes).
A: Do you know how to do this for Pythagorean triples?  That is, do you know how to find solutions to $x^2 + y^2 = z^2$?  This is equivalent to finding rational points on the circle $X^2 + Y^2 = 1$, and then taking $(x/z,y/z) = (X,Y)$.  The way to find rational points on the circle is as follows: for a point on the circle $(X,Y)$, consider the line from $(-1,0)$ to $(X,Y)$.  If this line has rational slope, then the equation for where the line meets the circle has rational coefficients and has the rational root at $(-1,0)$.  The rational root test then tells you that the other root must be rational, i.e. $(X,Y)$ is rational.  
Conversely, if $(X,Y)$ is rational, then the line from $(-1,0)$ to $(X,Y)$ has rational slope as well.   Therefore, finding rational points on the unit circle are equivalent to looking at where the lines of rational slope at $(-1,0)$ intersect the circle; this can be done using the quadratic formula.
The same can be used for your equation.  Simply consider all lines of rational slope starting at some fixed rational point of $X^2 / 5 + 4 Y^2 / 5 = 1$, e.g. $(1,1)$.
