Find all the triples $(x,y,z)$ such that $ax+by=cz$ Let $a,b,c,x,y,z >1$ if $\gcd(a,b,c)=1$, find all the non-trivial triples of positive integers $(x,y,z)$ such that $ax+by=cz$.
Progress
I have been struggling finding the solutions. At first, I attempted to use Bezout's identity but I realized this approach cannot be right. Other approach such as $x=p c$, $y=q c$ only provides a partial solution set. Any hint?
 A: Let $g=gcd(a,b)$. Whenever $ax+by=cz$ we have $g|cz$, but since $gcd(g,c)=1$, $g|z$. So if $a=a'g$, $b=b'g$, $z=rg$, we are looking for solutions of
$$ a'x + b'y = cr,$$
where $gcd(a',b')=1$. This problem is solved in most elementary number theory textbooks.
You know there exist numbers $m$ and $n$ such that $a'm-b'n=1$. Let's fix such a solution with $m$,$n$>0 (this is always possible). one solution of the equation is then $x_0=mcr$, $y_0=-ncr$. Now if $x$, $y$ were any other solution, we would have
$$ a'(x-x_0) + b'(y-y_0) = 0,$$
but $gcd(a',b')=1$, so $a' | (y-y_0)$ and $b'|(x-x_0)$. Now setting $y-y_0 = a'k$ and $x-x_0 = b'l$, and plugging back in the above we see that $a'b'(l+k)=0 \Rightarrow l=-k$. Furthermore, any choice of $k$ leads to such a solution, therefore
$$x = mcr -(b/g)k,\ \ \  y = -ncr + (a/g)k,\ \ \  z = gr,$$
where $g=gcd(a,b)$, $am-bn=g$, and $r,k$ are arbitrary.
Now you want only positive solutions, so there must be some bounds. Since $z$ must be positive, so must $r$. Then for each such $r>0$,
$$ x>0 \Longleftrightarrow (b/gk)<mcr \Longleftrightarrow k < (g/b)mcr,$$
and 
$$ y>0 \Longleftrightarrow ncr < (a/g)k \Longleftrightarrow k > (g/a)ncr.$$
