# Thread: Primitive Pyth. triples: Solutions of x^2 + y^2 = 2 z^2

1. Originally Posted by kingwinner
I also think that (i) is correct.

Is (ii) wrong?
i.e. not all Pythagorean triple is of the form $\displaystyle x = r^2 - s^2, y = 2rs, z = r^2 + s^2$, r>s>0?
For example, 6,8,10 is a Pythagorean triple, but I think it cannot be written in the above form?
right, (ii) will always generate a triple, but not all of them:

Suppose $\displaystyle r=nd$ and $\displaystyle s=md$, then can you see that $\displaystyle d^2\mid x,y,z$? So we'll always have a square dividing $\displaystyle x,y,z$ but this isn't always the case in (i).

Therefore using (ii), we can't get all possible Pythagorean triples.

2. Originally Posted by chiph588@
right, (ii) will always generate a triple, but not all of them:

Suppose $\displaystyle r=nd$ and $\displaystyle s=md$, then can you see that $\displaystyle d^2\mid x,y,z$? So we'll always have a square dividing $\displaystyle x,y,z$ but this isn't always the case in (i).

Therefore using (ii), we can't get all possible Pythagorean triples.
Then I think maybe there is some problem with the method you suggested earlier?
The triple x+y,x-y,2z is not necessarily primitive, so I think we should use (i) rather than the theorem in my first post?

$\displaystyle x^2+y^2=2z^2\iff(x+y)^2+(x-y)^2=(2z)^2$
<=> x+y,x-y,2z is a Pythagorean triple (but it's not necessarily primitive)
$\displaystyle \begin{cases} x+y=(m^2-n^2)d\\x-y=2mnd\\2z=(m^2+n^2)d \end{cases}$
where d is natural number, m and n are integers of opposite parity with m>n>0 and gcd(m,n)=1.

Now how can we characterize ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$? Is there any restriction on "d"?

Thanks!

3. Originally Posted by kingwinner
Then I think maybe there is some problem with the method you suggested earlier?
The triple x+y,x-y,2z is not necessarily primitive, so I think we should use (i) rather than the theorem in my first post?

$\displaystyle x^2+y^2=2z^2\iff(x+y)^2+(x-y)^2=(2z)^2$
<=> x+y,x-y,2z is a Pythagorean triple (but it's not necessarily primitive)
$\displaystyle \begin{cases} x+y=(m^2-n^2)d\\x-y=2mnd\\2z=(m^2+n^2)d \end{cases}$
where d is natural number, m and n are integers of opposite parity with m>n>0 and gcd(m,n)=1.

Now how can we characterize ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$? Is there any restriction on "d"?

Thanks!
Solve for $\displaystyle x,y,z$ and see if $\displaystyle d$ is in the denominator or anything like that. I'll let you take it from here since you're nearing the finish line.

4. Originally Posted by chiph588@
Solve for $\displaystyle x,y,z$ and see if $\displaystyle d$ is in the denominator or anything like that. I'll let you take it from here since you're nearing the finish line.
Hi,

Sovling, I get:
$\displaystyle x = d(r^2 - s^2 + 2rs) / 2$
$\displaystyle y = d(r^2 - s^2 - 2rs) / 2$
$\displaystyle z = d(r^2 + s^2) / 2$

I think we're supposed to find all INTEGER solutions, but these are not integers??

5. Originally Posted by kingwinner
Hi,

Sovling, I get:
$\displaystyle x = d(r^2 - s^2 + 2rs) / 2$
$\displaystyle y = d(r^2 - s^2 - 2rs) / 2$
$\displaystyle z = d(r^2 + s^2) / 2$

I think we're supposed to find all INTEGER solutions, but these are not integers??
So choose $\displaystyle d$ accordingly i.e. you found the restriction on $\displaystyle d$ you were after.

6. Originally Posted by chiph588@
So choose $\displaystyle d$ accordingly i.e. you found the restriction on $\displaystyle d$ you were after.
OK, since r and s are of opposite parity, $\displaystyle r^2 + s^2$ must be odd, so $\displaystyle z=d(r^2 + s^2) / 2$ is an integer if and only if d is EVEN. Also, if d is even, then this also guarantees that x and y are integers.

So I think the following characterizes ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$.
$\displaystyle x = d(r^2 - s^2 + 2rs) / 2$
$\displaystyle y = d(r^2 - s^2 - 2rs) / 2$
$\displaystyle z = d(r^2 + s^2) / 2$
where d is any EVEN natural number, r and s are any integers of opposite parity with r>s>0 and gcd(r,s)=1?
Does this include ALL solutions?

7. Originally Posted by kingwinner
I also think that (i) is correct.

Is (ii) wrong?
i.e. not all Pythagorean triple is of the form $\displaystyle x = r^2 - s^2, y = 2rs, z = r^2 + s^2$, r>s>0?
For example, 6,8,10 is a Pythagorean triple, but I think it cannot be written in the above form?
$\displaystyle r=3,s=1$

8. Originally Posted by Drexel28
$\displaystyle r=3,s=1$
I see.
What is an example of a Pythagorean triple that cannot be written in the form $\displaystyle x = r^2 - s^2, y = 2rs, z = r^2 + s^2$, r,s E Z, r>s>0?

9. Originally Posted by kingwinner
I see.
What is an example of a Pythagorean triple that cannot be written in the form $\displaystyle x = r^2 - s^2, y = 2rs, z = r^2 + s^2$, r,s E Z, r>s>0?
Don't ask me, I know virtually nothing of even semi-advanced number theory.

10. hi, I think 9,12,15 is an example of a Pythagorean triple that cannot be written in the form $\displaystyle x = r^2 - s^2, y = 2rs, z = r^2 + s^2$, r,s E Z, r>s>0, right??

11. Originally Posted by kingwinner
OK, since r and s are of opposite parity, $\displaystyle r^2 + s^2$ must be odd, so $\displaystyle z=d(r^2 + s^2) / 2$ is an integer if and only if d is EVEN. Also, if d is even, then this also guarantees that x and y are integers.

So I think the following characterizes ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$.
$\displaystyle x = d(r^2 - s^2 + 2rs) / 2$
$\displaystyle y = d(r^2 - s^2 - 2rs) / 2$
$\displaystyle z = d(r^2 + s^2) / 2$
where d is any EVEN natural number, r and s are any integers of opposite parity with r>s>0 and gcd(r,s)=1?
Does this include ALL solutions?
Actually, still I think this answer is incomplete and we're MISSING some solutions. (since the problem was asking us to find ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$.)
For example, x=y=z=0 is a solution, but it's not included in the above formula. As another example, some x<0,y<0,z<0 can also be solutions of $\displaystyle x^2 + y^2 = 2z^2$, but it's not included in the above formula as well. So we're definitely missing some solutions.

So how can we correctly and completely specify ALL solutions of $\displaystyle x^2 + y^2 = 2z^2$?

12. OK, now I've thought about it more, and I think that is even more serious problems. We're actually missing A LOT of solutions. For example, x=y=z is a solution for any integer (e.g. x=y=z=6 is a solution), but it's definitely not a Pythagorean triple, the formula above misses all of those. Also, all the negative solutions are missing from the above formula because by definition a Pythagorean triple is positive while solutions to the equation can be positive or negative.

So the above formula certainly does not include all solutions, how can we fix this problem? How can we correctly write down a formula that includes all the solutions?

Can someone kindly explain how we can summarize our final answer that includes all solutions into a compact formula?
Thanks a million!

13. Originally Posted by kingwinner
OK, now I've thought about it more, and I think that is even more serious problems. We're actually missing A LOT of solutions. For example, x=y=z is a solution for any integer (e.g. x=y=z=6 is a solution), but it's definitely not a Pythagorean triple, the formula above misses all of those.
Try $\displaystyle d=12, \; r=\pm1, s=0$

We get $\displaystyle x=y=z=6$.

14. Originally Posted by chiph588@
Try $\displaystyle d=12, \; r=\pm1, s=0$

We get $\displaystyle x=y=z=6$.
OK, that works, so the solutions x=y=z are actually included in it.

We want to solve $\displaystyle x^2 + y^2 = 2z^2$ in the integers (rather than in the natural numbers), i.e. x,y,z E Z.

Integer solutions of $\displaystyle x^2 + y^2 = 2z^2$: (?)
$\displaystyle x = d(r^2 - s^2 + 2rs) / 2$
$\displaystyle y = d(r^2 - s^2 - 2rs) / 2$
$\displaystyle z = d(r^2 + s^2) / 2$
where d is any EVEN integer, r and s are any integers of opposite parity with r>s>0 and gcd(r,s)=1

(*) $\displaystyle X^2+Y^2=Z^2$
(**) $\displaystyle x^2+y^2=2z^2$
Above we discussed the solutions of (*) in positive integers, and we observed that for any integer solution (x,y,z) to (**) the triple (x+y,x-y,2z) is an integer solution to (*). (When we say that x+y,x-y,2z is a Pythagorean triple, x+y,x-y, and 2z are assumed to be positive integers.) But it is not true that positive solutions to (**) correspond to positive solutions to (*) and vice versa. For example, if r=3, s=2, d=2, then x=17, y= -7, z=13, y is negative. So will our analysis above still give the correct formula for all integer solutions?

15. If we want to solve in in the integers, then how would you actually describe all the integer solutions? Does anyone happen to know the correct answer of this problem?

I am solving it in the integers, so the question should say:
Find all INTEGER solutions of $\displaystyle x^2 + y^2 = 2z^2$.

Attempt:
$\displaystyle x^2 + y^2 = 2z^2$
<=> $\displaystyle (x+y)^2 + (x-y)^2 = (2z)^2$

<=>
x+y = +/- $\displaystyle (m^2 - n^2)d$
x-y = +/- $\displaystyle 2mnd$
2z = +/- $\displaystyle (m^2 + n^2)d$
where d=0,2,4,6,...,
m and n are any integers of opposite parity with m>n>0 and gcd(m,n)=1
[I say +/- because x+y,x-y,2z may be a Pythagorean triple which requires x+y,x-y,2z to be positive, or some of x+y,x-y,2z may simply be the negatives of it]

<=>
x = +/- $\displaystyle d(m^2 - n^2 + 2mn) / 2$
y = +/- $\displaystyle d(m^2 - n^2 - 2mn) / 2$
z = +/- $\displaystyle d(m^2 + n^2) / 2$
where d=0,2,4,6,...,
m and n are any integers of opposite parity with m>n>0 and gcd(m,n)=1

<=>
x = $\displaystyle d(m^2 - n^2 + 2mn) / 2$
y = $\displaystyle d(m^2 - n^2 - 2mn) / 2$
z = $\displaystyle d(m^2 + n^2) / 2$
where d is any EVEN INTEGER, m and n are any integers of opposite parity with m>n>0 and gcd(m,n)=1

Is this the right way to analyze this problem? Is this the correct description of ALL (up to a reordering of x and y of course) integer solutions of $\displaystyle x^2 + y^2 = 2z^2$?? Did I miss any?
My textbook doesn't give the answer at the back, so there is no way for me to check my work. Can someone confirm that this is correct (or point out any mistake), please?

Thank you very much!

Page 2 of 3 First 123 Last