# Math Help - Solving Primitive Pythagorean Triangle

1. ## Solving Primitive Pythagorean Triangle

How do you find a primitive pythagorean triangle that has a hypotenuse of 29?

$x^2+y^2=29^2$ or $x^2+y^2=841$

How do you determine that $x=20$ and $y=21$ ?

2. guess and check man, fortunately you only gotta check the things less than the square root of 841. I honestly do not know a better way to do it.

You could probably limit some of the possibilities by considering residues mod 10. Like to get a 1 for the ones place you know you are going to need something that will be 0+1, or 2+9, or 3+8 or 4+7 or 5+6, then figure out which integers squared give you those things and check those. Like I think nothing squared gives a ones digit of 2, 3, 7, or 8. So I think the only possible ways of ending in a 1 would be a 0+1 or a 5+6. So you need to look at the things ending in 0 and 1 (like $10^2 + 11^2 or 20^2 + 21^2$) or things when squared end in 5 and 6 (like $5^2=25, 15^2=225, 25^2=625$, and then $4^2=16, 14^2=196, 24^2=576, etc$)

but honestly I think it would be quicker to just get out a calculator and start cranking them out, especially because we were lucky that it ended in 1.

3. No calculators allowed. That is why I am trying to find an simple method.

4. Well then I suggest you do my suggestion above and consider reduction mod 10 is probably the easiest. Also it may be of use to you to know that every Pythagorean Triple is generated as follows.

Let $m,n\in \mathbb{N}$ with $m.
Then $(m^2-n^2,2mn,m^2+n^2)$ is a Pythagorean Triple. Of course this method takes a while and yields lots of non primitive ones. I suggest memorizing the squares of integers up to 20 or 25 before the exam, it could save you a lot of time. Take your c^2 and subtract some squares from it and see if you recognize it as a perfect square, that is how I did it when you sent me the question the first time.

Sorry to repeat a post, I accidentally put this on your other thread about pythag. triples when I meant to put it here, but really it fits in both places I guess.

5. You can begin by expressing $29$ as a sum of two squares, ie. $29=5^2+2^2$.

Next use the identity $(a^2+b^2)(c^2+d^2)=(ac\pm bd)^2+(ad\mp bc)^2$. You get $29^2=(5^2+2^2)(5^2+2^2)=(5\cdot5-2\cdot 2)^2+(5\cdot 2 + 5\cdot 2)^2 = 21^2+20^2$.

6. Bruno,
I thought of 5 and 2 immediately but then realized that 29 was equal to c not c^2. But I like your method. The more ways I can figure out to do it the smaller chance I will mess it up. Thanks.