# Finding all solutions to a Diophantine equation

• Oct 10th 2006, 06:24 AM
beta12
Finding all solutions to a Diophantine equation
Parameterize the solutions in integers to x^2 + 5y^2 = z^2 in Pythagorean triples.

To make it easier, consider only the solutions such that (x,y,z)=1. Also assume that x, y, and z are positive, and that x is odd. Your analysis will probably give you two cases, but you can combine them into one by use of absolute values. Naturally, prove that your analysis is correct.

Can anyone solve the above question?
• Oct 10th 2006, 07:59 AM
ThePerfectHacker
Quote:

Originally Posted by beta12
Parameterize the solutions in integers to x^2 + 5y^2 = z^2 in Pythagorean triples.

To make it easier, consider only the solutions such that (x,y,z)=1. Also assume that x, y, and z are positive, and that x is odd.

I solved the problem (I think) but LaTeX is down and with these Diophantine Equations things get messy.

Let me speak about it than respond back later.

We note that if gcd(x,y,z)=d then, gcd(x/d,y/d,z/d)=1
Thus, dividing out by d we obtain,
(x/d)^2+5(y/d)^2=(z/d)^2
This is the reason why we work with relative primeness because it reduces to find a solution when all are relatively prime.

Here are some useful observations, (which I will use).

Lemma 1: Given the diophantine equations
x^2+5y^2=z^2
Then, gcd(x,y)=gcd(y,z)=1.

Proof: Simple, we see that z^2=5y^2+x^2 thus if gcd(x,y)>1 then the right hand side is divisible by it thus z is divisble by it, then gcd(x,y,z)>1 which is not possible.

The other way around we can write,
z^2-5y^2=x^2 thus if gcd(z,y)>1 then the left hand side is divisible by it which means the right hand side it too. Thus, gcd(x,y,z)>1 which is not possible.
Q.E.D.

Lemma 2: In the Diophantine Equation,
x^2+5y^2=z^2
x,y have opposite parity.

Proof If both x,y are even then gcd(x,y)>1 which violate the lemma before :eek: . If both are odd then x and y have form of 4k+1 or 4k+3 in any case they lead to a sum of form 4k+2 which is not possible to obtain from squaring a positive integer (z in this case):eek: .
Thus one is even and one is odd.
Q.E.D.

Note, you ignore the case when y is odd. Yes it is simpler through it. But it can still be odd. Since you asked for that I will base my proof on that fact that y is even.

Lemma 3: If gcd(x,y)=1 and x,y>0 are odd then gcd(x-y,x+y)=2.
Proof: We write, gcd(x+y,[x+y]-2y)=d
Then,
d|(x+y) and d|[(x+y)-2y]
Thus,
d|(x+y) or d|(2y)
Thus,
d|(x+y) or d|y or d|2
If, d>1 and d|y
Then, d|x which is not possible.
Thus, d does not divide y.
d|2 thus, d=1 or d=2
But d not equal to 1
Because d=gcd(x-y,x+y) and x-y and x+y are both odd.
Thus, d=2.
Q.E.D.

Hopefully more to come.
• Oct 10th 2006, 01:10 PM
ThePerfectHacker
Let me continue from where I stopped.

You have,
x^2+5y^2=z^2
And y is even. Thus, x and z must be odd by lemma 2.

You can write this as,
5y^2=z^2-x^2=(z-x)(z+x)
Since z and x are odd by lemma 2 and y is even we have that, (divide by 4)
5(y/2)^2=[(z-x)/2][(z+x)/2]
Since the LHS is divisible by 5 so too the right. Since it is prime it divides one of those two factors thus,
(y/2)^2=[(z-x)/10][(z+x)/2]

(Note that it can be [(z-x)/2][(z+x)/10] but I assumed it the other way. And you will see it makes no difference)

Now by lemma 3 we now that gcd[(z-x)/2,(z+x)/2]=1
Thus, for certainly the product of those two are relatively prime. Since we have the product of relatively prime integers is a square each one must be a square!
(z-x)/10=u^2
(z+x)/2=v^2
Thus,
z-x=10u^2
z+x=2v^2
Solving for z and x, (and immediatelty for y since we have an equation for it)
z=v^2+5u^2
x=v^2-5u^2
y=2uv

Thus, this says that if x,y,z are solutions to that diophantine equation we can find positive integers u,v that satisfies those. The other way around is also true if z,x,y are obtained from u and v then it must be a solution to the differencial equation (substitute and check method). [Altough it might not be primitive solution if gcd(u,v)>1 and even negative solution.]

If we assumed,
(y/2)^2=[(z-x)/2][(z+x)/10]
Then using similar reasoning we would have obtianed.
z=u^2+5v^2
x=u^2-5v^2
y=2uv

But that makes no difference because we do not lose generality.
Q.E.D.