```

wu :: forums
(http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)

riddles >> medium >> Pythagorean triples
(Message started by: Christine on Jun 7th, 2014, 12:20pm)

```

Title: Pythagorean triples
Post by Christine on Jun 7th, 2014, 12:20pm
Pythagorean triples (a, b, c)
then a^2 + b^2 = c^2

How to prove that
c^2 - a*b and c^2 + a*b can both be expressed as a sum of two squares?

Title: Re: Pythagorean triples
Post by 0.999... on Jun 8th, 2014, 5:49am
[hide]c^2-ab=( 1/2(c+(b-a)) )^2 + ( 1/2(c-(b-a)) )^2 and c^2+ab=( 1/2(c+(b+a)) )^2 + ( 1/2(c-(b+a)) )^2[/hide]

I really only examined two cases and extrapolated. Perhaps someone else will be able to offer more insight.

Title: Re: Pythagorean triples
Post by rloginunix on Jun 10th, 2014, 8:14pm
The search for all the positive integer solutions of the algebraic equation x^2 + y^2 = z^2 has the geometric equivalent of finding all the right triangles with the integral side lengths. If I remember correctly early on the Babylonians raised that question which also interested the Greek geometers of the time. Pythagoras himself is credited with the following solution:

a = 2n + 1, b = 2n^2 + 2n, c = 2n^2 + 2n + 1

for his a^2 + b^2 = c^2 triple (n is an arbitrary positive integer).

My idea leads to lots of writing but is simple:

a*b = (2n + 1)(2n^2 + 2n) = 4n^3 + 4n^2 + 2n^2 + 2n = 4n^3 + 6n^2 + 2n

c^2 = (2n^2 + 2n + 1)^2 = 4n^4 + 4n^2(2n + 1) + 4n^2 + 4n + 1 = 4n^4 + 8n^3 + 8n^2 + 4n + 1

Rearrangement of your difference, for example:

c^2 - a*b =  4n^4 + 8n^3 + 8n^2 + 4n + 1 - 4n^3 - 6n^2 - 2n = 4n^4 + 4n^3 + 2n^2 + 2n + 1 = 4n^4 + 4n^3 + n^2 + (n^2 + 2n + 1) =

=  4n^4 + 4n^3 + n^2  + (n + 1)^2 = n^2(4n^2 + 4n + 1) + (n + 1)^2 = n^2(2n + 1)^2 + (n + 1)^2 =

= (n(2n + 1))^2 + (n + 1)^2

You can rename the terms "n(2n + 1)" and "n + 1" as some other integers of your liking and you have your sum of two squares.

Perhaps now you can try your hand at "c^2 + a*b".

Title: Re: Pythagorean triples
Post by 0.999... on Jun 11th, 2014, 5:03am
rloginlinux, while it is an infinite class of solutions, the parametrization does not cover all primitive solutions. An example of one that is missed is (8,15,17).

In the textbook on Number Theory by Ireland and Rosen, excercise 1.23, one shows that the following two-variable paramatrization, covers all primitive pythagorean triples (a,b,c) up to a permutation of a and b:
a = 2uv, b = v^2-u^2, c = v^2+u^2.

Using this parametrization, the calculations are rather nice:
[hide]c^2-ab=v^4+u^4+2u^2v^2-2uv^3+2u^3v=v^4-2uv^3+u^2v^2+u^4+2u^3v+u^2v^2=v^2(v-u)^2+u^2(v+u)^2. The calculation in the case c^2+ab is the same, except with u and v reversed.[/hide]

Title: Re: Pythagorean triples
Post by Immanuel_Bonfils on Jul 30th, 2014, 8:14pm

on 06/08/14 at 05:49:19, 0.999... wrote:
 [hide]c^2-ab=( 1/2(c+(b-a)) )^2 + ( 1/2(c-(b-a)) )^2 and c^2+ab=( 1/2(c+(b+a)) )^2 + ( 1/2(c-(b+a)) )^2[/hide]